Files
rangerhq-logbook/inc/wp-notes-styles.php
T
ranger 0c20833fe5 release: 3.1.0 → 3.2.0 — rebrand A-WP-Notes → WP Logbook
The plugin's identity has shifted over the day's work — from a notes
pad to a work-logbook with time tracking, earnings, and a Wallet
tile on the v4 roadmap. "WP Notes" undersold what it had become and
collided semantically with WordPress's notes-as-memos connotation;
"WP Logbook" matches both the freelancer use case ("logbook for
clients") and the student use case ("logbook for teachers"), and
matches the exact word the plugin's own About-page intro had been
using all day.

USER-FACING CHANGES
- Plugin Name header: A-WP-Notes → WP Logbook
- Description header rewritten to reflect the work-logbook framing
- Admin menu top-level: WP Notes → WP Logbook
- Admin sidebar submenu: My Notes → My Log (matches new parent —
  reads cleanly as "WP Logbook → My Log")
- Admin bar count menu: WP Notes (N) → WP Logbook (N)
- Dashboard widget title: WP Notes → WP Logbook
- Settings page H1: WP Notes Settings → WP Logbook Settings
- Main page H1: WP Notes → WP Logbook
- About page: every brand mention updated; "Go to WP Notes →" CTA
  now reads "Go to My Log →" to match the new submenu
- About page version history now leads with v3.2.0 (this release)
  as latest, demotes v3.1.0 to the previous entry
- CPT menu_name label: WP Notes → WP Logbook (cosmetic only — CPT
  hidden from admin UI since the duplicate-form fix in v3.1.0)
- Migration notice text updated
- Email-feedback subject + body intro updated
- Legacy feedback.php subjects (WP Notes Feedback / Help Request)
  → WP Logbook variants
- error_log() prefix [WP Notes] → [WP Logbook]

ZERO-MIGRATION COMMITMENT — these stay unchanged
- All wp_notes_* function names
- All WP_NOTES_* constants
- All DB option keys (wp_notes, wp_done_notes, wp_notes_settings,
  wp_notes_migration_completed, wp_notes_version,
  wp_notes_dismissed_empty_active|completed)
- All user_meta keys
- Admin page slug 'wp-notes' (preserves bookmarks, admin-bar
  #new-note anchor, and the legacy ?page=wp-notes-create redirect)
- Plugin text domain 'a-wp-notes'
- File and directory names (wp-notes.php, inc/wp-notes-*.php,
  assets/wp-notes-banner.jpg)
- Gitea repo name (ranger/a-wp-notes-v3) — David can rename on the
  Gitea side separately if he wants

The rename is purely user-facing strings. Existing installs see the
new name appear after a plugin file refresh, with zero behaviour
change. No re-activation needed.

VERSION BUMP
- wp-notes.php header Version: 3.1.0 → 3.2.0
- WP_NOTES_VERSION constant: 3.1.0 → 3.2.0
- CHANGELOG: new [3.2.0] section that bundles the rename with the
  post-3.1.0 unreleased work (About-page rewrite, feedback form)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 08:28:50 +01:00

220 lines
5.0 KiB
PHP

<?php
// inc/wp-notes-styles.php
if (!defined('ABSPATH')) {
exit;
}
/**
* Add required styles for WP Logbook
*/
function wp_notes_admin_styles() {
?>
<style>
/* Footer "buy me a coffee" — lives at the BOTTOM of the page */
.wp-notes-footer-support {
text-align: center;
margin: 32px 0 8px;
}
/* Notes List Container */
.wp-notes-active,
.wp-notes-completed {
margin: 20px 0;
}
/* Section Headers */
.wp-notes-section {
margin-bottom: 2em;
}
.wp-notes-section-title {
display: flex;
align-items: center;
gap: 10px;
color: #23282d;
font-size: 1.3em;
margin: 1.5em 0 1em;
padding-bottom: 0.5em;
border-bottom: 1px solid #ccd0d4;
}
/* Status Indicators */
.status-active,
.status-completed {
padding: 4px 8px;
border-radius: 4px;
font-size: 0.9em;
font-weight: normal;
}
.status-active {
background: #e5f5fa;
color: #0071a1;
}
.status-completed {
background: #dff0d8;
color: #3c763d;
}
.note-count {
color: #666;
font-size: 0.8em;
font-weight: normal;
}
/* Note Items */
.wp-notes-list table {
border-spacing: 0;
width: 100%;
margin-bottom: 2em;
border: 1px solid #ccd0d4;
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
border-radius: 4px;
}
/* Table Hover Effects */
.wp-notes-list table.has-hover tr:hover td {
background-color: #f8f9fa;
}
/* Table Header */
.wp-notes-list th {
font-weight: 600;
text-align: left;
padding: 8px 10px;
}
/* Table Cells */
.wp-notes-list td {
padding: 12px 10px;
vertical-align: top;
}
/* Actions Column */
.wp-notes-list .column-actions {
text-align: right;
white-space: nowrap;
}
/* Edit Form */
.wp-notes-edit-form {
background: #f8f9fa;
padding: 15px;
border: 1px solid #e2e4e7;
border-radius: 4px;
margin-top: 10px;
}
/* Form Fields */
.wp-notes-formatting {
display: flex;
gap: 15px;
flex-wrap: wrap;
align-items: center;
margin: 10px 0;
padding: 12px;
background: #f8f9fa;
border-radius: 4px;
border: 1px solid #e2e4e7;
}
.wp-notes-formatting input[type="color"] {
padding: 0;
width: 40px;
height: 30px;
border: 1px solid #ddd;
}
.wp-notes-formatting input[type="number"] {
width: 70px;
}
.wp-notes-formatting select {
min-width: 120px;
}
.format-option {
display: flex;
align-items: center;
gap: 5px;
}
/* Emoji Picker */
.emoji-picker-container {
position: relative;
display: inline-block;
}
.emoji-picker-dropdown {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
background: white;
border: 1px solid #ccd0d4;
border-radius: 4px;
padding: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.emoji-list {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 5px;
}
.emoji-option {
font-size: 20px;
padding: 5px;
cursor: pointer;
background: none;
border: none;
border-radius: 4px;
transition: background-color 0.2s;
}
.emoji-option:hover {
background-color: #f0f0f1;
}
/* Note Status Indicators */
.note-status {
display: inline-block;
padding: 2px 8px;
border-radius: 12px;
font-size: 12px;
line-height: 1.4;
}
.note-status-active {
background: #e5f5fa;
color: #0071a1;
}
.note-status-completed {
background: #dff0d8;
color: #3c763d;
}
/* Responsive Design */
@media screen and (max-width: 782px) {
.wp-notes-formatting {
flex-direction: column;
align-items: flex-start;
}
.wp-notes-list td {
padding: 8px 10px;
}
.column-actions {
text-align: left;
}
}
</style>
<?php
}
add_action('admin_head', 'wp_notes_admin_styles');