Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bd8c5f2340 | |||
| ead5bbcd2c | |||
| e51b087545 | |||
| 1c93c82ef5 |
+103
@@ -9,6 +9,109 @@ Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) — versi
|
||||
|
||||
---
|
||||
|
||||
## [3.3.5] — 2026-05-25
|
||||
|
||||
### Changed — Admin-menu icon
|
||||
The WordPress admin sidebar icon for Logbook is now
|
||||
**`dashicons-book-alt`** (a closed book) instead of the generic
|
||||
cog wheel (`dashicons-admin-generic`). The closed-book glyph is the
|
||||
most literal possible match for the word "logbook" in the Dashicons
|
||||
set — reinforces the brand identity at the first place users see
|
||||
the plugin every day.
|
||||
|
||||
If you'd prefer a different icon, the line lives in
|
||||
`wp-notes.php → wp_notes_admin_menu()` as the 7th arg to
|
||||
`add_menu_page()`. Alternatives worth considering:
|
||||
`dashicons-edit` (pencil), `dashicons-clipboard` (clipboard),
|
||||
`dashicons-welcome-write-blog` (pencil over paper),
|
||||
`dashicons-format-aside` (notes glyph). Full list at
|
||||
https://developer.wordpress.org/resource/dashicons/
|
||||
|
||||
### Version bump
|
||||
- wp-notes.php header 3.3.4 → 3.3.5
|
||||
- WP_NOTES_VERSION constant 3.3.4 → 3.3.5
|
||||
- About page version-history leads with v3.3.5; v3.3.4 demoted.
|
||||
|
||||
---
|
||||
|
||||
## [3.3.4] — 2026-05-25
|
||||
|
||||
**Repo renamed on Gitea: `a-wp-notes-v3` → `a-logbook`.** Also the
|
||||
local working folder on M3: `/Users/ranger/scripts/Gitea/a-logbook`
|
||||
(was `a-wp-notes-v3-archive`). The old repo name was a holdover
|
||||
from the v3-of-A-WP-Notes archival era; with the plugin firmly
|
||||
identifying as Logbook now, the repo and folder names should match.
|
||||
|
||||
### Changed
|
||||
- **`inc/wp-notes-updater.php`** — `WP_NOTES_GITEA_REPO` constant
|
||||
updated from `a-wp-notes-v3` to `a-logbook`. The update checker
|
||||
now hits `https://git.davidtkeane.com/api/v1/repos/ranger/a-logbook/...`
|
||||
on every check. (The constant remains override-able via
|
||||
`define()` in `wp-config.php` if the repo ever moves again.)
|
||||
- **`inc/wp-notes-about.php`** — "View the full CHANGELOG.md →"
|
||||
link on the version-history card updated to the new repo path.
|
||||
- **Local working folder on M3** renamed to `a-logbook` to match
|
||||
the Gitea repo name. `.git/config` survived the move intact;
|
||||
remote URL updated separately.
|
||||
|
||||
### Unchanged (zero-migration commitment continues)
|
||||
- Plugin slug (`wp-notes`).
|
||||
- Plugin text domain (`a-wp-notes`).
|
||||
- All internal function names, constants (`WP_NOTES_*`), DB option
|
||||
keys, user_meta keys, file names inside the plugin
|
||||
(`wp-notes.php`, `inc/wp-notes-*.php`).
|
||||
- Historical CHANGELOG references to `a-wp-notes-v3` (e.g. in the
|
||||
v3.2.0 entry) stay as historical truth.
|
||||
|
||||
---
|
||||
|
||||
## [3.3.3] — 2026-05-25
|
||||
|
||||
**Verification bump.** Pure version increment to test the end-to-end
|
||||
"Check now" flow against the now-publicly-hosted Gitea repo. No
|
||||
functional changes. David's Local install (running v3.3.2) should
|
||||
now see *"v3.3.3 available — Download .zip"* in the Settings →
|
||||
Updates panel once "Check now" is clicked, confirming the update
|
||||
mechanism works against a real version delta. After the test, he
|
||||
can `git pull` to land on v3.3.3 and watch the same panel flip back
|
||||
to *"You are up to date (v3.3.3)"*.
|
||||
|
||||
---
|
||||
|
||||
## [3.3.2] — 2026-05-25
|
||||
|
||||
### Fixed — update checker now works with tag-only workflows
|
||||
The v3.3.0 update checker only queried Gitea's `/releases/latest`
|
||||
endpoint, which requires a **formal Release object** (created via
|
||||
the Gitea web UI with optional notes + zip assets). A plain
|
||||
`git tag v3.3.x && git push --tags` from the terminal doesn't
|
||||
create that Release object — so the checker kept returning *"No
|
||||
releases tagged on the Gitea repo yet"* even when tags clearly
|
||||
existed.
|
||||
|
||||
`wp_notes_fetch_latest_release()` now falls back to the
|
||||
`/tags?limit=1` endpoint when `/releases/latest` returns 404 (or
|
||||
any non-200). It synthesises a release-like payload from the
|
||||
newest tag — `tag_name`, an `html_url` pointing at the tag view,
|
||||
the tag message as the body, and an empty `assets[]` array so the
|
||||
existing download-URL logic falls through to Gitea's source-archive
|
||||
URL pattern (`/archive/<tag>.zip`).
|
||||
|
||||
**Net effect:** the "Check now" button now finds the latest version
|
||||
whether David creates formal Gitea Releases OR just pushes tags
|
||||
with `git push --tags`. No workflow change required.
|
||||
|
||||
### Known limitation (not a bug — flagged for awareness)
|
||||
The Gitea repo `ranger/a-wp-notes-v3` is currently **private**.
|
||||
Anonymous API requests get a 404 (Gitea's standard behaviour to
|
||||
avoid leaking the existence of private repos). The updater code is
|
||||
correct, but it can't actually reach the API on a private repo
|
||||
without authentication. **Fix:** change the repo visibility to
|
||||
public on Gitea (Settings → Visibility) — appropriate anyway for a
|
||||
GPL-licensed plugin headed for the WordPress.org marketplace.
|
||||
|
||||
---
|
||||
|
||||
## [3.3.1] — 2026-05-25
|
||||
|
||||
**Naming: dropped the `WP` prefix. The plugin is now just `Logbook`.**
|
||||
|
||||
+18
-2
@@ -125,7 +125,23 @@ function wp_notes_about_page() {
|
||||
<h2>Version history</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="ver">v3.3.1</span> — 25 May 2026 <span class="latest">latest</span><br>
|
||||
<span class="ver">v3.3.5</span> — 25 May 2026 <span class="latest">latest</span><br>
|
||||
New admin-menu icon: closed-book (<code>dashicons-book-alt</code>) replaces the generic cog wheel. Visually reinforces the “Logbook” identity in the WP sidebar.
|
||||
</li>
|
||||
<li>
|
||||
<span class="ver">v3.3.4</span> — 25 May 2026<br>
|
||||
Repo renamed on Gitea: <code>a-wp-notes-v3</code> → <code>a-logbook</code>. The plugin’s update checker and the “View on Gitea” / “View all releases” / “View full CHANGELOG” links now point at the new path. Local folder also renamed to <code>a-logbook</code>. The plugin’s internal storage and slugs are unchanged — no data migration.
|
||||
</li>
|
||||
<li>
|
||||
<span class="ver">v3.3.3</span> — 25 May 2026<br>
|
||||
Pure version bump to verify the end-to-end “Check now” flow against a publicly-hosted Gitea repo. No functional changes. If you can see this line, you successfully pulled the test release.
|
||||
</li>
|
||||
<li>
|
||||
<span class="ver">v3.3.2</span> — 25 May 2026<br>
|
||||
Update checker now falls back to Gitea's <code>/tags</code> endpoint when no formal Release object exists for the latest tag. Means a plain <code>git tag && git push --tags</code> is enough to make the “Check now” button report a new version — no need to manually create a Release in the Gitea web UI.
|
||||
</li>
|
||||
<li>
|
||||
<span class="ver">v3.3.1</span> — 25 May 2026<br>
|
||||
Dropped the <code>WP</code> prefix — the plugin is now just <strong>Logbook</strong>. Cleaner name, also clears a potential WordPress.org trademark-policy hurdle if/when the plugin ever lands on the marketplace.
|
||||
</li>
|
||||
<li>
|
||||
@@ -153,7 +169,7 @@ function wp_notes_about_page() {
|
||||
Basic note functionality with the dashboard widget and styling options.
|
||||
</li>
|
||||
</ul>
|
||||
<a class="wp-notes-about-changelog-link" href="https://git.davidtkeane.com/ranger/a-wp-notes-v3/src/branch/main/CHANGELOG.md" target="_blank" rel="noopener">View the full CHANGELOG.md →</a>
|
||||
<a class="wp-notes-about-changelog-link" href="https://git.davidtkeane.com/ranger/a-logbook/src/branch/main/CHANGELOG.md" target="_blank" rel="noopener">View the full CHANGELOG.md →</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
+32
-11
@@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) { exit; }
|
||||
// Gitea repo coordinates — change here if the repo ever moves.
|
||||
if ( ! defined( 'WP_NOTES_GITEA_HOST' ) ) { define( 'WP_NOTES_GITEA_HOST', 'https://git.davidtkeane.com' ); }
|
||||
if ( ! defined( 'WP_NOTES_GITEA_OWNER' ) ) { define( 'WP_NOTES_GITEA_OWNER', 'ranger' ); }
|
||||
if ( ! defined( 'WP_NOTES_GITEA_REPO' ) ) { define( 'WP_NOTES_GITEA_REPO', 'a-wp-notes-v3' ); }
|
||||
if ( ! defined( 'WP_NOTES_GITEA_REPO' ) ) { define( 'WP_NOTES_GITEA_REPO', 'a-logbook' ); }
|
||||
|
||||
/**
|
||||
* Convenience: full web URL of the repo / its releases page.
|
||||
@@ -48,18 +48,44 @@ function wp_notes_fetch_latest_release( $force_refresh = false ) {
|
||||
if ( is_array( $cached ) ) { return $cached; }
|
||||
}
|
||||
|
||||
$api_url = WP_NOTES_GITEA_HOST . '/api/v1/repos/' . WP_NOTES_GITEA_OWNER . '/' . WP_NOTES_GITEA_REPO . '/releases/latest';
|
||||
$response = wp_remote_get( $api_url, array( 'timeout' => 8 ) );
|
||||
$base_api = WP_NOTES_GITEA_HOST . '/api/v1/repos/' . WP_NOTES_GITEA_OWNER . '/' . WP_NOTES_GITEA_REPO;
|
||||
|
||||
// Try /releases/latest first — that's the canonical endpoint when David
|
||||
// has published a formal Gitea Release via the web UI (with notes + zip
|
||||
// assets attached).
|
||||
$response = wp_remote_get( $base_api . '/releases/latest', array( 'timeout' => 8 ) );
|
||||
if ( is_wp_error( $response ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$code = (int) wp_remote_retrieve_response_code( $response );
|
||||
$body = ( $code === 200 ) ? json_decode( wp_remote_retrieve_body( $response ), true ) : null;
|
||||
|
||||
// 404 = repo has no releases yet, OR private. Cache briefly and surface
|
||||
// a friendly status to the UI.
|
||||
if ( $code !== 200 ) {
|
||||
// Fallback: if no formal Release exists (typical for tag-only workflows
|
||||
// where you `git tag v3.3.1 && git push --tags` without using the web
|
||||
// UI), hit /tags instead and synthesise a release-like payload from the
|
||||
// newest tag. Gitea's /tags endpoint sorts by creation order, so [0] is
|
||||
// the most recent.
|
||||
if ( $code !== 200 || ! is_array( $body ) || empty( $body['tag_name'] ) ) {
|
||||
$tags_response = wp_remote_get( $base_api . '/tags?limit=1', array( 'timeout' => 8 ) );
|
||||
if ( ! is_wp_error( $tags_response )
|
||||
&& (int) wp_remote_retrieve_response_code( $tags_response ) === 200 ) {
|
||||
$tags = json_decode( wp_remote_retrieve_body( $tags_response ), true );
|
||||
if ( is_array( $tags ) && ! empty( $tags[0]['name'] ) ) {
|
||||
$body = array(
|
||||
'tag_name' => $tags[0]['name'],
|
||||
'html_url' => wp_notes_gitea_repo_url() . '/src/tag/' . rawurlencode( $tags[0]['name'] ),
|
||||
'body' => isset( $tags[0]['message'] ) ? $tags[0]['message'] : '',
|
||||
'published_at' => isset( $tags[0]['commit']['created'] ) ? $tags[0]['commit']['created'] : null,
|
||||
'assets' => array(),
|
||||
);
|
||||
$code = 200;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Still nothing usable? Surface a friendly status and short-cache.
|
||||
if ( $code !== 200 || ! is_array( $body ) || empty( $body['tag_name'] ) ) {
|
||||
$info = array(
|
||||
'version' => null,
|
||||
'html_url' => wp_notes_gitea_releases_url(),
|
||||
@@ -72,11 +98,6 @@ function wp_notes_fetch_latest_release( $force_refresh = false ) {
|
||||
return $info;
|
||||
}
|
||||
|
||||
$body = json_decode( wp_remote_retrieve_body( $response ), true );
|
||||
if ( ! is_array( $body ) || empty( $body['tag_name'] ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// "v3.3.0" → "3.3.0" so version_compare() against WP_NOTES_VERSION works cleanly.
|
||||
$version = ltrim( (string) $body['tag_name'], 'vV' );
|
||||
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
* Plugin Name: Logbook
|
||||
* Plugin URI: https://icanhelp.ie/wp-notes
|
||||
* Description: A lightweight task & logbook plugin for WordPress. Log your daily work, mark tasks done, and keep a tidy record inside the dashboard. Perfect for freelancers showing clients what's been delivered and students proving work to teachers.
|
||||
* Version: 3.3.1
|
||||
* Version: 3.3.5
|
||||
* Requires at least: 5.0
|
||||
* Requires PHP: 7.2
|
||||
* Author: IR240474
|
||||
@@ -33,7 +33,7 @@ if (!isset($wp_notes_init)) {
|
||||
$wp_notes_init = true;
|
||||
|
||||
// Plugin Constants
|
||||
if (!defined('WP_NOTES_VERSION')) define('WP_NOTES_VERSION', '3.3.1');
|
||||
if (!defined('WP_NOTES_VERSION')) define('WP_NOTES_VERSION', '3.3.5');
|
||||
if (!defined('WP_NOTES_FILE')) define('WP_NOTES_FILE', __FILE__);
|
||||
if (!defined('WP_NOTES_PATH')) define('WP_NOTES_PATH', plugin_dir_path(__FILE__));
|
||||
if (!defined('WP_NOTES_URL')) define('WP_NOTES_URL', plugin_dir_url(__FILE__));
|
||||
@@ -174,7 +174,7 @@ function wp_notes_admin_menu() {
|
||||
'manage_options',
|
||||
'wp-notes',
|
||||
'wp_notes_page_callback',
|
||||
'dashicons-admin-generic',
|
||||
'dashicons-book-alt', // closed book — reinforces the "logbook" identity
|
||||
3
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user