Changeset 3280416
- Timestamp:
- 04/24/2025 02:12:03 AM (10 months ago)
- Location:
- daisy-titles
- Files:
-
- 4 added
- 2 edited
-
assets/screenshot-1.png (added)
-
tags/1.0.4 (added)
-
tags/1.0.4/daisy-titles.php (added)
-
tags/1.0.4/readme.txt (added)
-
trunk/daisy-titles.php (modified) (28 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
daisy-titles/trunk/daisy-titles.php
r3277788 r3280416 3 3 * Plugin Name: Daisy Titles 4 4 * Plugin URI: https://wordpress.org/plugins/daisy-titles 5 * Description: Customize titles with colors, sizes, and fonts. Hide titles on posts and pages.6 * Version: 1.0. 35 * Description: Customize titles with colors, sizes, and fonts. Optionally hide titles on posts and pages. 6 * Version: 1.0.4 7 7 * Requires at least: 5.2 8 8 * Requires PHP: 7.2 … … 20 20 21 21 // Define constants 22 define('DAISY_TITLES_VERSION', '1.0. 3');22 define('DAISY_TITLES_VERSION', '1.0.4'); 23 23 define('DAISY_TITLES_PLUGIN_URL', plugin_dir_url(__FILE__)); 24 24 define('DAISY_TITLES_PLUGIN_PATH', plugin_dir_path(__FILE__)); … … 27 27 add_action('admin_menu', 'daisy_titles_add_admin_menu'); 28 28 function daisy_titles_add_admin_menu() { 29 add_options_page( 30 __('Daisy Titles Settings', 'daisy-titles'), 31 __('Daisy Titles', 'daisy-titles'), 32 'manage_options', 33 'daisy-titles', 34 'daisy_titles_options_page' 35 ); 29 // Add main menu page 30 add_menu_page( 31 __('Daisy Titles Settings', 'daisy-titles'), // Page title 32 __('Daisy Titles', 'daisy-titles'), // Menu title 33 'manage_options', // Capability 34 'daisy-titles', // Menu slug 35 'daisy_titles_options_page', // Callback function 36 'dashicons-edit', // Icon (using dashicon) 37 80 // Position (below Settings) 38 ); 39 40 // Remove the duplicate submenu that WordPress adds by default 41 remove_submenu_page('daisy-titles', 'daisy-titles'); 36 42 } 37 43 … … 48 54 ); 49 55 50 51 52 56 // Title visibility section 53 57 add_settings_section( 54 58 'daisy_titles_visibility_section', 55 __('Title Visibility Options', 'daisy-titles'),59 __('Title Visibility (on Single View)', 'daisy-titles'), 56 60 'daisy_titles_visibility_section_callback', 57 61 'daisy_titles_plugin' … … 76 80 ); 77 81 78 79 80 81 82 // Main settings section 82 83 add_settings_section( 83 84 'daisy_titles_main_section', 84 __('<hr><br>Title Styling Options', 'daisy-titles'),85 __('<hr><br>Title Styling (on Single View)', 'daisy-titles'), 85 86 'daisy_titles_section_callback', 86 87 'daisy_titles_plugin' 88 ); 89 90 // Title Styling Toggle 91 add_settings_field( 92 'daisy_titles_enable_styling', 93 __('Enable Styling', 'daisy-titles'), 94 'daisy_titles_enable_styling_render', 95 'daisy_titles_plugin', 96 'daisy_titles_main_section' 87 97 ); 88 98 … … 114 124 ); 115 125 126 // // Font weight field 127 // add_settings_field( 128 // 'daisy_titles_font_weight', 129 // __('Font Weight', 'daisy-titles'), 130 // 'daisy_titles_font_weight_render', 131 // 'daisy_titles_plugin', 132 // 'daisy_titles_main_section' 133 // ); 134 135 // // Text transform field 136 // add_settings_field( 137 // 'daisy_titles_text_transform', 138 // __('Text Transform', 'daisy-titles'), 139 // 'daisy_titles_text_transform_render', 140 // 'daisy_titles_plugin', 141 // 'daisy_titles_main_section' 142 // ); 143 144 // Letter spacing field 145 // add_settings_field( 146 // 'daisy_titles_letter_spacing', 147 // __('Letter Spacing (px)', 'daisy-titles'), 148 // 'daisy_titles_letter_spacing_render', 149 // 'daisy_titles_plugin', 150 // 'daisy_titles_main_section' 151 // ); 152 153 // // Line height field 154 // add_settings_field( 155 // 'daisy_titles_line_height', 156 // __('Line Height', 'daisy-titles'), 157 // 'daisy_titles_line_height_render', 158 // 'daisy_titles_plugin', 159 // 'daisy_titles_main_section' 160 // ); 161 116 162 // Apply to field 117 163 add_settings_field( … … 122 168 'daisy_titles_main_section' 123 169 ); 124 125 126 170 } 127 171 128 172 // Section callback 129 173 function daisy_titles_section_callback() { 130 esc_html_e('Customize how your post titles appear on the front-end.', 'daisy-titles');174 esc_html_e('Customize how your post titles appear on the single view.', 'daisy-titles'); 131 175 } 132 176 133 177 // Visibility section callback 134 178 function daisy_titles_visibility_section_callback() { 135 esc_html_e('Control the visibility of titles globally. Individual post settings will override these options.', 'daisy-titles'); 179 esc_html_e('Control the visibility of titles globally. These options will override individual post settings.', 'daisy-titles'); 180 } 181 182 // Enable styling toggle render 183 function daisy_titles_enable_styling_render() { 184 $options = get_option('daisy_titles_settings'); 185 ?> 186 <label class="daisy-switch"> 187 <input type="checkbox" id="daisy_titles_enable_styling" name="daisy_titles_settings[daisy_titles_enable_styling]" value="1" <?php checked(isset($options['daisy_titles_enable_styling']) && $options['daisy_titles_enable_styling']); ?>> 188 <span class="daisy-slider daisy-round"></span> 189 </label> 190 <script> 191 jQuery(document).ready(function($) { 192 // Show/hide styling options based on toggle state 193 function toggleStylingOptions() { 194 if ($('#daisy_titles_enable_styling').is(':checked')) { 195 $('.daisy-styling-option').show(); 196 } else { 197 $('.daisy-styling-option').hide(); 198 } 199 } 200 201 // Initial state 202 toggleStylingOptions(); 203 204 // On change 205 $('#daisy_titles_enable_styling').change(function() { 206 toggleStylingOptions(); 207 }); 208 }); 209 </script> 210 <?php 136 211 } 137 212 … … 140 215 $options = get_option('daisy_titles_settings'); 141 216 ?> 142 <input type="color" name="daisy_titles_settings[daisy_titles_color]" value="<?php echo esc_attr($options['daisy_titles_color'] ?? '#333333'); ?>"> 217 <div class="daisy-styling-option"> 218 <input type="color" name="daisy_titles_settings[daisy_titles_color]" value="<?php echo esc_attr($options['daisy_titles_color'] ?? '#333333'); ?>"> 219 </div> 143 220 <?php 144 221 } … … 148 225 $options = get_option('daisy_titles_settings'); 149 226 ?> 150 <input type="number" name="daisy_titles_settings[daisy_titles_font_size]" min="10" max="72" value="<?php echo esc_attr($options['daisy_titles_font_size'] ?? '24'); ?>"> px 227 <div class="daisy-styling-option"> 228 <input type="number" name="daisy_titles_settings[daisy_titles_font_size]" min="10" max="100" value="<?php echo esc_attr($options['daisy_titles_font_size'] ?? '24'); ?>"> px 229 </div> 151 230 <?php 152 231 } … … 158 237 'Arial, sans-serif' => 'Arial', 159 238 'Helvetica, sans-serif' => 'Helvetica', 160 'Times New Roman, serif' => 'Times New Roman', 161 'Georgia, serif' => 'Georgia', 162 'Courier New, monospace' => 'Courier New', 163 'Verdana, sans-serif' => 'Verdana' 164 ); 165 ?> 166 <select name="daisy_titles_settings[daisy_titles_font_family]"> 167 <?php foreach ($fonts as $value => $label) : ?> 168 <option value="<?php echo esc_attr($value); ?>" <?php selected($options['daisy_titles_font_family'] ?? '', $value); ?>> 169 <?php echo esc_html($label); ?> 170 </option> 171 <?php endforeach; ?> 172 </select> 173 <?php 174 } 239 'Times New Roman, serif' => 'Times New Roman' 240 ); 241 ?> 242 <div class="daisy-styling-option"> 243 <select name="daisy_titles_settings[daisy_titles_font_family]"> 244 <?php foreach ($fonts as $value => $label) : ?> 245 <option value="<?php echo esc_attr($value); ?>" <?php selected($options['daisy_titles_font_family'] ?? '', $value); ?>> 246 <?php echo esc_html($label); ?> 247 </option> 248 <?php endforeach; ?> 249 </select> 250 </div> 251 <?php 252 } 253 254 // Font weight field render 255 function daisy_titles_font_weight_render() { 256 $options = get_option('daisy_titles_settings'); 257 $weights = array( 258 'normal' => 'Normal', 259 'bold' => 'Bold', 260 'bolder' => 'Bolder', 261 'lighter' => 'Lighter', 262 '100' => '100 (Thin)', 263 '200' => '200 (Extra Light)', 264 '300' => '300 (Light)', 265 '400' => '400 (Regular)', 266 '500' => '500 (Medium)', 267 '600' => '600 (Semi Bold)', 268 '700' => '700 (Bold)', 269 '800' => '800 (Extra Bold)', 270 '900' => '900 (Black)' 271 ); 272 ?> 273 <!-- <div class="daisy-styling-option"> 274 <select name="daisy_titles_settings[daisy_titles_font_weight]"> 275 <?php foreach ($weights as $value => $label) : ?> 276 <option value="<?php echo esc_attr($value); ?>" <?php selected($options['daisy_titles_font_weight'] ?? 'normal', $value); ?>> 277 <?php echo esc_html($label); ?> 278 </option> 279 <?php endforeach; ?> 280 </select> 281 </div> --> 282 <?php 283 } 284 285 // Text transform field render 286 function daisy_titles_text_transform_render() { 287 $options = get_option('daisy_titles_settings'); 288 $transforms = array( 289 'none' => 'None', 290 'capitalize' => 'Capitalize', 291 'uppercase' => 'Uppercase', 292 'lowercase' => 'Lowercase' 293 ); 294 ?> 295 <!-- <div class="daisy-styling-option"> 296 <select name="daisy_titles_settings[daisy_titles_text_transform]"> 297 <?php foreach ($transforms as $value => $label) : ?> 298 <option value="<?php echo esc_attr($value); ?>" <?php selected($options['daisy_titles_text_transform'] ?? 'none', $value); ?>> 299 <?php echo esc_html($label); ?> 300 </option> 301 <?php endforeach; ?> 302 </select> 303 </div> --> 304 <?php 305 } 306 307 // Letter spacing field render 308 function daisy_titles_letter_spacing_render() { 309 $options = get_option('daisy_titles_settings'); 310 ?> 311 <!-- <div class="daisy-styling-option"> 312 <input type="number" name="daisy_titles_settings[daisy_titles_letter_spacing]" min="-5" max="10" step="0.1" value="<?php echo esc_attr($options['daisy_titles_letter_spacing'] ?? '0'); ?>"> px 313 </div> --> 314 <?php 315 } 316 317 // Line height field render 318 function daisy_titles_line_height_render() { 319 $options = get_option('daisy_titles_settings'); 320 ?> 321 <!-- <div class="daisy-styling-option"> 322 <input type="number" name="daisy_titles_settings[daisy_titles_line_height]" min="0.5" max="3" step="0.1" value="<?php echo esc_attr($options['daisy_titles_line_height'] ?? '1.2'); ?>"> 323 </div> --> 324 <?php 325 } 175 326 176 327 // Apply to field render … … 179 330 $post_types = get_post_types(array('public' => true), 'objects'); 180 331 $current_types = isset($options['daisy_titles_apply_to']) ? (array)$options['daisy_titles_apply_to'] : array('post', 'page'); 181 182 foreach ($post_types as $post_type) { 183 if ($post_type->name === 'attachment') continue; 184 ?> 185 <label> 186 <input type="checkbox" name="daisy_titles_settings[daisy_titles_apply_to][]" value="<?php echo esc_attr($post_type->name); ?>" 187 <?php checked(in_array($post_type->name, $current_types)); ?>> 188 <?php echo esc_html($post_type->labels->name); ?> 189 </label><br> 190 <?php 191 } 332 ?> 333 <div class="daisy-styling-option"> 334 <?php foreach ($post_types as $post_type) : ?> 335 <?php if ($post_type->name === 'attachment') continue; ?> 336 <label> 337 <input type="checkbox" name="daisy_titles_settings[daisy_titles_apply_to][]" value="<?php echo esc_attr($post_type->name); ?>" 338 <?php checked(in_array($post_type->name, $current_types)); ?>> 339 <?php echo esc_html($post_type->labels->name); ?> 340 </label><br> 341 <?php endforeach; ?> 342 </div> 343 <?php 192 344 } 193 345 … … 222 374 ?> 223 375 <div class="wrap daisy-titles-admin"> 224 <div class="daisy-header"> 225 <h1><span class="daisy-icon">🌼</span> <?php echo esc_html(get_admin_page_title()); ?></h1> 226 <p class="daisy-description"><?php esc_html_e('Customize your titles with beautiful styles and visibility options', 'daisy-titles'); ?></p> 376 377 378 <div class="daisy-titles-header"> 379 <div class="daisy-titles-title-section"> 380 <h1><?php esc_html_e('Daisy Titles', 'daisy-titles'); ?></h1> 381 </div> 382 <div class="daisy-titles-logo"> 383 <span class="dashicons dashicons-edit-large"></span> 384 </div> 227 385 </div> 386 387 228 388 229 389 <div class="daisy-content-wrap"> 230 390 <div class="daisy-settings-card"> 391 <div class="daisy-titles-card-header"> 392 <h3><span class="dashicons dashicons-edit-large"></span> <?php esc_html_e('Setting Options', 'daisy-titles'); ?></h3> 393 </div> 394 <div class="daisy-titles-card-body"> 231 395 <form action="options.php" method="post"> 232 396 <?php … … 237 401 </form> 238 402 </div> 403 </div> 239 404 240 <div class="daisy-sidebar"> 241 <div class="daisy-card"> 242 <h3><?php esc_html_e('Need Help?', 'daisy-titles'); ?></h3> 243 <p><?php esc_html_e('Check out our documentation or contact support if you have any questions.', 'daisy-titles'); ?></p> 244 <a href="https://wordpress.org/support/plugin/daisy-titles/" class="button" target="_blank"><?php esc_html_e('Get Support', 'daisy-titles'); ?></a> 405 <div class="daisy-titles-sidebar"> 406 407 408 409 <div class="daisy-titles-card"> 410 <div class="daisy-titles-card-header"> 411 <h3><span class="dashicons dashicons-info"></span> <?php esc_html_e('About Plugin', 'daisy-titles'); ?></h3> 412 </div> 413 <div class="daisy-titles-card-body"> 414 <div class="daisy-titles-info-item"> 415 <h4><span class="dashicons dashicons-admin-plugins"></span> <?php esc_html_e('Version', 'daisy-titles'); ?></h4> 416 <p>1.0.4</p> 417 </div> 418 <div class="daisy-titles-info-item"> 419 <h4><span class="dashicons dashicons-calendar-alt"></span> <?php esc_html_e('Release Date', 'daisy-titles'); ?></h4> 420 <p>April 24, 2025</p> 421 </div> 422 <div class="daisy-titles-info-item"> 423 <h4><span class="dashicons dashicons-admin-users"></span> <?php esc_html_e('Author', 'daisy-titles'); ?></h4> 424 <p><a href="https://profiles.wordpress.org/daisyplugins/" target="_blank" style="text-decoration: none;">DaisyPlugins</a></p> 425 </div> 426 <div class="daisy-titles-info-item"> 427 <h4><span class="dashicons dashicons-admin-site-alt3"></span> <?php esc_html_e('Blog', 'daisy-titles'); ?></h4> 428 <p><a href="https://daisywp.com" target="_blank" style="text-decoration: none;">DaisyWP</a></p> 429 </div> 430 </div> 431 </div> 432 433 434 <div class="daisy-titles-card"> 435 <div class="daisy-titles-card-header"> 436 <h3><span class="dashicons dashicons-testimonial"></span> <?php esc_html_e('Need Help?', 'daisy-titles'); ?></h3> 437 </div> 438 <div class="daisy-titles-card-body"> 439 <p><?php esc_html_e('Check out our documentation or contact support if you have any questions.', 'daisy-titles'); ?></p> 440 <a href="https://wordpress.org/support/plugin/daisy-titles/" class="button" target="_blank"><?php esc_html_e('Get Support', 'daisy-titles'); ?></a> 441 </div> 245 442 </div> 246 443 247 <div class="daisy-card"> 248 <h3><?php esc_html_e('Like This Plugin?', 'daisy-titles'); ?></h3> 249 <p><?php esc_html_e('Please consider leaving a review on WordPress.org.', 'daisy-titles'); ?></p> 250 <a href="https://wordpress.org/support/plugin/daisy-titles/reviews/" class="button" target="_blank"><?php esc_html_e('Leave a Review', 'daisy-titles'); ?></a> 444 <div class="daisy-titles-card"> 445 <div class="daisy-titles-card-header"> 446 <h3><span class="dashicons dashicons-thumbs-up"></span> <?php esc_html_e('Like This Plugin?', 'daisy-titles'); ?></h3> 447 </div> 448 449 <div class="daisy-titles-card-body"> 450 <p><?php esc_html_e('Please consider leaving a review on WordPress.org.', 'daisy-titles'); ?></p> 451 <a href="https://wordpress.org/support/plugin/daisy-titles/reviews/?filter=5#new-post" class="button" target="_blank"><?php esc_html_e('Leave a Review', 'daisy-titles'); ?></a> 452 </div> 251 453 </div> 454 455 456 457 458 252 459 </div> 253 460 </div> … … 261 468 $sanitized = array(); 262 469 470 // Sanitize enable styling toggle 471 if (isset($new_settings['daisy_titles_enable_styling'])) { 472 $sanitized['daisy_titles_enable_styling'] = (bool)$new_settings['daisy_titles_enable_styling']; 473 } 474 263 475 // Sanitize color 264 476 if (isset($new_settings['daisy_titles_color'])) { … … 269 481 if (isset($new_settings['daisy_titles_font_size'])) { 270 482 $size = intval($new_settings['daisy_titles_font_size']); 271 $sanitized['daisy_titles_font_size'] = max(10, min( 72, $size)); // Clamp between 10 and 72483 $sanitized['daisy_titles_font_size'] = max(10, min(100, $size)); // Clamp between 10 and 100 272 484 } 273 485 … … 280 492 'Georgia, serif', 281 493 'Courier New, monospace', 282 'Verdana, sans-serif' 494 'Verdana, sans-serif', 495 'system-ui, sans-serif', 496 'Impact, sans-serif', 497 'Palatino, serif', 498 'Tahoma, sans-serif' 283 499 ); 284 500 $sanitized['daisy_titles_font_family'] = in_array($new_settings['daisy_titles_font_family'], $allowed_fonts) … … 286 502 : 'Arial, sans-serif'; 287 503 } 504 505 // // Sanitize font weight 506 // if (isset($new_settings['daisy_titles_font_weight'])) { 507 // $allowed_weights = array('normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900'); 508 // $sanitized['daisy_titles_font_weight'] = in_array($new_settings['daisy_titles_font_weight'], $allowed_weights) 509 // ? $new_settings['daisy_titles_font_weight'] 510 // : 'normal'; 511 // } 512 513 // // Sanitize text transform 514 // if (isset($new_settings['daisy_titles_text_transform'])) { 515 // $allowed_transforms = array('none', 'capitalize', 'uppercase', 'lowercase'); 516 // $sanitized['daisy_titles_text_transform'] = in_array($new_settings['daisy_titles_text_transform'], $allowed_transforms) 517 // ? $new_settings['daisy_titles_text_transform'] 518 // : 'none'; 519 // } 520 521 // // Sanitize letter spacing 522 // if (isset($new_settings['daisy_titles_letter_spacing'])) { 523 // $spacing = floatval($new_settings['daisy_titles_letter_spacing']); 524 // $sanitized['daisy_titles_letter_spacing'] = max(-5, min(10, $spacing)); // Clamp between -5 and 10 525 // } 526 527 // // Sanitize line height 528 // if (isset($new_settings['daisy_titles_line_height'])) { 529 // $height = floatval($new_settings['daisy_titles_line_height']); 530 // $sanitized['daisy_titles_line_height'] = max(0.5, min(3, $height)); // Clamp between 0.5 and 3 531 // } 288 532 289 533 // Sanitize apply to … … 322 566 add_meta_box( 323 567 'daisy_titles_visibility', 324 __(' Title Visibility', 'daisy-titles'),568 __('Daisy Titles', 'daisy-titles'), 325 569 'daisy_titles_meta_box_callback', 326 570 $post_type, … … 339 583 <div class="daisy-meta-box"> 340 584 <label for="daisy_titles_hide_title" class="daisy-toggle-label"> 341 <?php esc_html_e('Hide T itle on Single View', 'daisy-titles'); ?>585 <?php esc_html_e('Hide The Title', 'daisy-titles'); ?> 342 586 </label> 343 587 <label class="daisy-switch"> … … 345 589 <span class="daisy-slider daisy-round"></span> 346 590 </label> 347 <p class="description"><?php esc_html_e('This will hide the title only on the single post/page view.', 'daisy-titles'); ?></p>348 591 </div> 592 593 <p class="description"><?php esc_html_e('This will hide the title only on the single view of this post/page.', 'daisy-titles'); ?></p> 349 594 <?php 350 595 } … … 418 663 } 419 664 420 // Apply styling if not hidden 665 // Apply styling if not hidden and styling is enabled 421 666 $options = get_option('daisy_titles_settings'); 422 if (empty($options) ) {667 if (empty($options) || !isset($options['daisy_titles_enable_styling']) || !$options['daisy_titles_enable_styling']) { 423 668 return $title; 424 669 } … … 445 690 if (!empty($options['daisy_titles_font_family'])) { 446 691 $style[] = 'font-family: ' . esc_attr($options['daisy_titles_font_family']); 692 } 693 694 if (!empty($options['daisy_titles_font_weight'])) { 695 $style[] = 'font-weight: ' . esc_attr($options['daisy_titles_font_weight']); 696 } 697 698 if (!empty($options['daisy_titles_text_transform'])) { 699 $style[] = 'text-transform: ' . esc_attr($options['daisy_titles_text_transform']); 700 } 701 702 if (!empty($options['daisy_titles_letter_spacing'])) { 703 $style[] = 'letter-spacing: ' . esc_attr($options['daisy_titles_letter_spacing']) . 'px'; 704 } 705 706 if (!empty($options['daisy_titles_line_height'])) { 707 $style[] = 'line-height: ' . esc_attr($options['daisy_titles_line_height']); 447 708 } 448 709 … … 461 722 } 462 723 463 // Enqueue admin styles 464 add_action('admin_enqueue_scripts', 'daisy_titles_admin_ styles');465 function daisy_titles_admin_ styles() {724 // Enqueue admin styles and scripts 725 add_action('admin_enqueue_scripts', 'daisy_titles_admin_assets'); 726 function daisy_titles_admin_assets() { 466 727 $screen = get_current_screen(); 467 728 468 729 // Only load on our settings page and post edit screens 469 if ($screen->id === 'settings_page_daisy-titles' || $screen->base === 'post') { 730 if ($screen->id === 'toplevel_page_daisy-titles' || $screen->base === 'post') { 731 // CSS 470 732 echo '<style> 471 733 /* Daisy Titles Admin Styles */ 472 734 .daisy-titles-admin { 473 735 max-width: 1200px; 474 } 475 476 .daisy-header { 477 background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); 478 padding: 20px; 736 margin: 0 auto; 737 padding: 20px; 738 } 739 740 .daisy-titles-header { 741 background: #e49b0f; 742 /* padding: 20px; */ 479 743 border-radius: 8px; 480 744 margin-bottom: 20px; 481 border-left: 5px solid #9b59b6; 482 } 483 484 .daisy-header h1 { 485 color: #333; 486 margin: 0; 487 display: flex; 488 align-items: center; 489 font-size: 28px; 490 } 491 492 .daisy-header .daisy-icon { 493 margin-right: 10px; 494 font-size: 32px; 495 } 496 497 .daisy-header .daisy-description { 498 margin: 5px 0 0; 499 color: #555; 500 font-size: 15px; 501 } 745 border-left: 5px solid #e49b0f; 746 747 748 display: flex; 749 justify-content: space-between; 750 align-items: center; 751 padding: 15px; 752 box-shadow: 0 1px 3px rgba(0,0,0,0.1); 753 754 } 755 756 757 .daisy-titles-title-section h1 { 758 margin: 0!important; 759 color: #ffffff; 760 display: flex; 761 align-items: center; 762 font-weight: bolder!important; 763 font-size: 36px!important; 764 line-height: 60px!important; 765 padding: 0!important; 766 } 767 768 769 .daisy-titles-logo .dashicons-edit-large { 770 color: #e49b0f; 771 background: #ffffff; 772 width: 60px; 773 height: 60px; 774 font-size: 32px; 775 line-height: 60px; 776 text-align: center; 777 border-radius: 50%; 778 } 502 779 503 780 .daisy-content-wrap { 504 781 display: flex; 782 783 505 784 gap: 20px; 506 785 } 786 787 788 507 789 508 790 .daisy-settings-card { 509 791 flex: 1; 792 box-shadow: 0 2px 10px rgba(0,0,0,0.05); 793 794 795 background: #fff; 796 border-radius: 8px; 797 box-shadow: 0 1px 3px rgba(0,0,0,0.1); 798 overflow: hidden; 799 } 800 801 .daisy-titles-sidebar { 802 width: 300px; 803 } 804 805 .daisy-titles-card { 510 806 background: #fff; 511 padding: 20px;512 border-radius: 8px;513 box-shadow: 0 2px 10px rgba(0,0,0,0.05);514 }515 516 .daisy-sidebar {517 width: 300px;518 }519 520 .daisy-card {521 background: #fff;522 padding: 20px;523 807 border-radius: 8px; 524 808 box-shadow: 0 2px 10px rgba(0,0,0,0.05); 525 809 margin-bottom: 20px; 526 } 527 528 .daisy-card h3 { 810 /* padding: 20px; */ 811 overflow: hidden; 812 } 813 814 815 .daisy-titles-card-header { 816 background: #e49b0f; 817 padding: 15px 20px; 818 } 819 820 .daisy-titles-card-header h3 821 /*.daisy-titles-card h3*/ { 822 823 824 margin: 0; 825 font-size: 18px; 826 display: flex; 827 align-items: center; 828 gap: 10px; 829 color: #FFFFFF; 830 } 831 832 .daisy-titles-card-body { 833 padding: 20px; 834 } 835 836 .daisy-titles-card p { 837 color: #666; 529 838 margin-top: 0; 530 color: #333;531 }532 533 .daisy-card p {534 color: #666;535 839 margin-bottom: 15px; 536 840 } 841 842 /* Info Items */ 843 .daisy-titles-info-item { 844 margin-bottom: 15px; 845 } 846 847 .daisy-titles-info-item:last-child { 848 margin-bottom: 0; 849 } 850 851 .daisy-titles-info-item h4 { 852 margin: 0 0 5px; 853 font-size: 15px; 854 display: flex; 855 align-items: center; 856 gap: 8px; 857 color: #1d2327; 858 } 859 .daisy-titles-info-item p { 860 margin: 0; 861 color: #646970; 862 font-size: 14px; 863 padding-left: 28px; 864 } 537 865 538 866 /* Toggle switch styles */ … … 577 905 578 906 input:checked + .daisy-slider { 579 background-color: # 9b59b6;907 background-color: #e49b0f; 580 908 } 581 909 … … 592 920 593 921 /* Meta box styles */ 922 923 #daisy_titles_visibility .postbox-header { 924 background-color: #e49b0f; 925 color: #ffffff; 926 } 927 928 #daisy_titles_visibility .order-higher-indicator, 929 #daisy_titles_visibility .order-lower-indicator, 930 #daisy_titles_visibility .toggle-indicator { 931 color: #ffffff; 932 } 933 934 935 594 936 .daisy-meta-box { 595 937 padding: 10px 0; … … 603 945 } 604 946 947 /* Styling options */ 948 .daisy-styling-option { 949 margin: 1px 0; 950 } 951 605 952 @media (max-width: 782px) { 606 953 .daisy-content-wrap { … … 608 955 } 609 956 610 .daisy- sidebar {957 .daisy-titles-sidebar { 611 958 width: 100%; 612 959 } 613 960 } 961 962 963 964 965 966 967 968 .daisy-meta-box { 969 display: flex; 970 justify-content: space-between; 971 align-items: center; 972 } 973 974 .daisy-toggle-label { 975 /* Left aligned by default */ 976 margin-right: auto; 977 } 978 979 .daisy-switch { 980 /* Right aligned by default */ 981 margin-left: auto; 982 } 614 983 </style>'; 984 985 // JavaScript 986 wp_enqueue_script('jquery'); 615 987 } 616 988 } … … 634 1006 } 635 1007 } 1008 1009 1010 // Migration notice for old plugin 1011 add_action('admin_notices', 'daisy_titles_show_cleanup_notice'); 1012 1013 function daisy_titles_show_cleanup_notice() { 1014 if (!is_plugin_active('hide-titles/hide-titles.php')) { 1015 return; 1016 } 1017 1018 $deactivate_url = wp_nonce_url( 1019 add_query_arg([ 1020 'action' => 'deactivate', 1021 'plugin' => 'hide-titles/hide-titles.php' 1022 ], admin_url('plugins.php')), 1023 'deactivate-plugin_hide-titles/hide-titles.php' 1024 ); 1025 1026 $delete_url = wp_nonce_url( 1027 add_query_arg([ 1028 'action' => 'delete-selected', 1029 'checked[]' => 'hide-titles/hide-titles.php', 1030 'plugin_status' => 'all' 1031 ], admin_url('plugins.php')), 1032 'bulk-plugins' 1033 ); 1034 ?> 1035 <div class="notice notice-warning"> 1036 <h3><?php esc_html_e('Plugin Cleanup Recommended', 'daisy-titles'); ?></h3> 1037 <p> 1038 <?php esc_html_e('You now have "Daisy Titles" active which replaces the old "Hide Titles" plugin. The old plugin is no longer needed and should be removed to prevent potential conflicts.', 'daisy-titles'); ?> 1039 </p> 1040 <p> 1041 <a href="<?php echo esc_url($deactivate_url); ?>" class="button"> 1042 <?php esc_html_e('Deactivate Hide Titles', 'daisy-titles'); ?> 1043 </a> 1044 <a href="<?php echo esc_url($delete_url); ?>" class="button button-danger" onclick="return confirm('<?php esc_attr_e('Are you sure you want to delete the old plugin?', 'daisy-titles'); ?>')"> 1045 <?php esc_html_e('Delete Hide Titles', 'daisy-titles'); ?> 1046 </a> 1047 </p> 1048 </div> 1049 <?php 1050 } -
daisy-titles/trunk/readme.txt
r3277788 r3280416 1 === Daisy Titles – Designand Hide Titles, Hide Page Titles, Hide Post Titles, Hide Page And Post Titles ===1 === Daisy Titles – Style and Hide Titles, Hide Page Titles, Hide Post Titles, Hide Page And Post Titles === 2 2 Contributors: daisyplugins 3 3 Tags: titles, hide titles, hide post titles, hide page titles, hide page and post titles 4 4 Requires at least: 5.2 5 5 Tested up to: 6.8 6 Stable tag: 1.0. 36 Stable tag: 1.0.4 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Customize the appearance of your post titles with colors, font sizes, and font families. Hide titles on posts and pages.11 Customize the appearance of your post titles with colors, font sizes, and font families. 12 12 13 13 == Description == 14 14 15 Daisy Titles is a simple WordPress plugin that allows you to customize how your post titles appear on the front-end of your website. With this plugin, you can: 15 Daisy Titles is a simple WordPress plugin that allows you to customize how your page and post titles appear on the front-end of your website. 16 17 With this plugin, you can control over the visibility of titles of pages and single posts on your WordPress website. Whether you want to show or hide titles, ‘Daisy Titles’ has got you covered. 18 19 Visibility Features: 20 21 * hide post titles 22 * hide page titles 23 * hide all titles 24 * hide specific post/page titles 25 26 Styling Features: 16 27 17 28 * Change the color of post titles 18 29 * Adjust the font size of titles 19 30 * Select from several common web fonts 20 * Choose which post types to apply the styling to (posts, pages, custom post types)31 * Choose which post types to apply the styling to (posts, pages, etc.) 21 32 22 33 The plugin includes a user-friendly settings panel in the WordPress admin area and follows all WordPress coding standards for security and performance. … … 43 54 44 55 == Screenshots == 45 1. Daisy Titles settings page showing color picker, font size, and font family options. 46 2. Example of styled titles on the front-end of a website. 56 57 1. screenshot-1.png 47 58 48 59 == Changelog == 49 60 50 = 1.0.3 - Apr 21, 2025= 61 = 1.0.4 — Apr 24, 2025 = 62 * [add] cleanup after migration 63 * [imp] user interface 64 65 = 1.0.3 — Apr 21, 2025 = 51 66 * [add] new feature: hide titles 52 67 * [imp] user interface 53 68 54 = 1.0.2 - Apr 20, 2025=69 = 1.0.2 — Apr 20, 2025 = 55 70 * Second release 56 71 57 = 1.0.1 - Apr 20, 2025=72 = 1.0.1 — Apr 20, 2025 = 58 73 * Initial release 59 74 60 = 1.0.0 -Apr 13, 2025 =75 = 1.0.0 — Apr 13, 2025 = 61 76 * Initial submission 62 77
Note: See TracChangeset
for help on using the changeset viewer.