Changeset 3445686
- Timestamp:
- 01/23/2026 04:00:43 PM (2 months ago)
- Location:
- add-as-preferred-source
- Files:
-
- 33 added
- 8 edited
-
assets/banner-1544x500.png (added)
-
assets/banner-772x250.png (added)
-
assets/icon-128x128.png (added)
-
assets/icon-256x256.png (added)
-
assets/screenshot-1.png (added)
-
assets/screenshot-2.png (added)
-
assets/screenshot-3.png (added)
-
assets/screenshot-4.png (added)
-
tags/1.1 (added)
-
tags/1.1/add-as-preferred-source.php (added)
-
tags/1.1/admin (added)
-
tags/1.1/admin/class-add-as-preferred-source-admin.php (added)
-
tags/1.1/admin/css (added)
-
tags/1.1/admin/css/add-as-preferred-source-admin.css (added)
-
tags/1.1/admin/js (added)
-
tags/1.1/admin/js/add-as-preferred-source-admin.js (added)
-
tags/1.1/admin/partials (added)
-
tags/1.1/admin/partials/add-as-preferred-source-admin-display.php (added)
-
tags/1.1/admin/partials/add-as-preferred-source-admin-inline-preview.php (added)
-
tags/1.1/public (added)
-
tags/1.1/public/class-add-as-preferred-source-public.php (added)
-
tags/1.1/public/css (added)
-
tags/1.1/public/css/add-as-preferred-source-public.css (added)
-
tags/1.1/public/images (added)
-
tags/1.1/public/images/google-preferred-source-button.png (added)
-
tags/1.1/public/js (added)
-
tags/1.1/public/js/add-as-preferred-source-public.js (added)
-
tags/1.1/public/partials (added)
-
tags/1.1/public/partials/add-as-preferred-source-public-display.php (added)
-
tags/1.1/public/partials/add-as-preferred-source-public-inline.php (added)
-
tags/1.1/readme.txt (added)
-
trunk/add-as-preferred-source.php (modified) (3 diffs)
-
trunk/admin/class-add-as-preferred-source-admin.php (modified) (3 diffs)
-
trunk/admin/css/add-as-preferred-source-admin.css (modified) (2 diffs)
-
trunk/admin/js/add-as-preferred-source-admin.js (modified) (4 diffs)
-
trunk/admin/partials/add-as-preferred-source-admin-display.php (modified) (2 diffs)
-
trunk/admin/partials/add-as-preferred-source-admin-inline-preview.php (added)
-
trunk/public/class-add-as-preferred-source-public.php (modified) (1 diff)
-
trunk/public/css/add-as-preferred-source-public.css (modified) (4 diffs)
-
trunk/public/partials/add-as-preferred-source-public-inline.php (added)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
add-as-preferred-source/trunk/add-as-preferred-source.php
r3358556 r3445686 1 1 <?php 2 2 /** 3 * Plugin Name: Add as Preferred Source 3 * Plugin Name: Add as Preferred Source on Google 4 4 * Description: Display a banner that encourages users to add your website as a preferred source on Google. 5 * Version: 1. 0.15 * Version: 1.1 6 6 * Author: Mathew 7 7 * License: GPL-2.0+ … … 18 18 * Currently plugin version. 19 19 */ 20 define('ADASPRSO_VERSION', '1. 0.1');20 define('ADASPRSO_VERSION', '1.1'); 21 21 define('ADASPRSO_PLUGIN_NAME', 'add-as-preferred-source'); 22 22 define('ADASPRSO_PLUGIN_PATH', plugin_dir_path(__FILE__)); … … 131 131 // Add banner to footer 132 132 add_action('wp_footer', array($plugin_public, 'display_preferred_source_banner')); 133 134 // Add inline button to content 135 add_filter('the_content', array($plugin_public, 'add_inline_button_to_content')); 133 136 } 134 137 -
add-as-preferred-source/trunk/admin/class-add-as-preferred-source-admin.php
r3358556 r3445686 260 260 'adasprso_device_section' 261 261 ); 262 263 // Inline Button Settings Section 264 add_settings_section( 265 'adasprso_inline_section', 266 __('Inline Button Settings', 'add-as-preferred-source'), 267 array($this, 'inline_section_callback'), 268 'adasprso_settings_inline' 269 ); 270 271 // Inline Enabled 272 add_settings_field( 273 'adasprso_inline_enabled', 274 __('Enable Inline Button', 'add-as-preferred-source'), 275 array($this, 'inline_enabled_callback'), 276 'adasprso_settings_inline', 277 'adasprso_inline_section' 278 ); 279 280 // Inline Position 281 add_settings_field( 282 'adasprso_inline_position', 283 __('Button Position', 'add-as-preferred-source'), 284 array($this, 'inline_position_callback'), 285 'adasprso_settings_inline', 286 'adasprso_inline_section' 287 ); 288 289 290 291 // Inline Post Types 292 add_settings_field( 293 'adasprso_inline_post_types', 294 __('Post Types', 'add-as-preferred-source'), 295 array($this, 'inline_post_types_callback'), 296 'adasprso_settings_inline', 297 'adasprso_inline_section' 298 ); 299 300 // Inline Background Color 301 add_settings_field( 302 'adasprso_inline_bg_color', 303 __('Background Color', 'add-as-preferred-source'), 304 array($this, 'inline_bg_color_callback'), 305 'adasprso_settings_inline', 306 'adasprso_inline_section' 307 ); 308 309 // Inline Text Color 310 add_settings_field( 311 'adasprso_inline_text_color', 312 __('Text Color', 'add-as-preferred-source'), 313 array($this, 'inline_text_color_callback'), 314 'adasprso_settings_inline', 315 'adasprso_inline_section' 316 ); 317 318 // Inline Text (Title) 319 add_settings_field( 320 'adasprso_inline_text', 321 __('Inline Title', 'add-as-preferred-source'), 322 array($this, 'inline_text_callback'), 323 'adasprso_settings_inline', 324 'adasprso_inline_section' 325 ); 326 327 // Inline Subtitle 328 add_settings_field( 329 'adasprso_inline_subtitle', 330 __('Inline Subtitle', 'add-as-preferred-source'), 331 array($this, 'inline_subtitle_callback'), 332 'adasprso_settings_inline', 333 'adasprso_inline_section' 334 ); 262 335 } 263 336 … … 293 366 $sanitized_input['show_on_desktop'] = isset($input['show_on_desktop']) ? 1 : 0; 294 367 368 // Inline settings 369 $sanitized_input['inline_enabled'] = isset($input['inline_enabled']) ? 1 : 0; 370 371 $valid_positions = array('above', 'below', 'both'); 372 $sanitized_input['inline_position'] = (in_array($input['inline_position'], $valid_positions)) ? $input['inline_position'] : 'both'; 373 374 // Sanitize Post Types 375 $sanitized_input['inline_post_types'] = array(); 376 if (isset($input['inline_post_types']) && is_array($input['inline_post_types'])) { 377 foreach ($input['inline_post_types'] as $post_type) { 378 if (post_type_exists($post_type)) { 379 $sanitized_input['inline_post_types'][] = sanitize_text_field($post_type); 380 } 381 } 382 } 383 384 // Sanitize Colors 385 $sanitized_input['inline_bg_color'] = sanitize_hex_color($input['inline_bg_color']); 386 $sanitized_input['inline_text_color'] = sanitize_hex_color($input['inline_text_color']); 387 388 $sanitized_input['inline_text'] = sanitize_text_field($input['inline_text']); 389 $sanitized_input['inline_subtitle'] = sanitize_text_field($input['inline_subtitle']); 390 295 391 // Google button image (keep the local image path) 296 392 $sanitized_input['google_button_image'] = ADASPRSO_PLUGIN_URL . 'public/images/google-preferred-source-button.png'; … … 419 515 echo '<label for="adasprso_show_on_desktop">' . esc_html__('Display banner on desktop devices', 'add-as-preferred-source') . '</label>'; 420 516 } 517 518 /** 519 * Inline section callback 520 */ 521 public function inline_section_callback() { 522 echo '<p>' . esc_html__('Configure the inline "Add as Preferred Source" button that appears within your content.', 'add-as-preferred-source') . '</p>'; 523 } 524 525 /** 526 * Inline enabled callback 527 */ 528 public function inline_enabled_callback() { 529 $inline_enabled = isset($this->options['inline_enabled']) ? $this->options['inline_enabled'] : 0; 530 echo '<input type="checkbox" id="adasprso_inline_enabled" name="adasprso_options[inline_enabled]" value="1" ' . checked(1, $inline_enabled, false) . ' />'; 531 echo '<label for="adasprso_inline_enabled">' . esc_html__('Enable the inline button', 'add-as-preferred-source') . '</label>'; 532 } 533 534 /** 535 * Inline position callback 536 */ 537 public function inline_position_callback() { 538 $inline_position = isset($this->options['inline_position']) ? $this->options['inline_position'] : 'both'; 539 ?> 540 <select id="adasprso_inline_position" name="adasprso_options[inline_position]"> 541 <option value="above" <?php selected($inline_position, 'above'); ?>><?php esc_html_e('Above Content', 'add-as-preferred-source'); ?></option> 542 <option value="below" <?php selected($inline_position, 'below'); ?>><?php esc_html_e('Below Content', 'add-as-preferred-source'); ?></option> 543 <option value="both" <?php selected($inline_position, 'both'); ?>><?php esc_html_e('Both (Above & Below)', 'add-as-preferred-source'); ?></option> 544 </select> 545 <p class="description"><?php esc_html_e('Choose where the button should appear relative to your post content.', 'add-as-preferred-source'); ?></p> 546 <?php 547 } 548 549 /** 550 * Inline Post Types Callback 551 */ 552 public function inline_post_types_callback() { 553 $saved_types = isset($this->options['inline_post_types']) ? $this->options['inline_post_types'] : array('post'); 554 555 // Get all public post types 556 $args = array( 557 'public' => true, 558 '_builtin' => false 559 ); 560 $post_types = get_post_types($args, 'objects'); 561 562 // Add built-in types 563 $post_types['post'] = get_post_type_object('post'); 564 $post_types['page'] = get_post_type_object('page'); 565 566 echo '<fieldset>'; 567 foreach ($post_types as $post_file => $post_type) { 568 $checked = in_array($post_file, $saved_types) ? 'checked="checked"' : ''; 569 echo '<label style="margin-right: 15px;">'; 570 echo '<input type="checkbox" name="adasprso_options[inline_post_types][]" value="' . esc_attr($post_file) . '" ' . $checked . '> ' . esc_html($post_type->labels->name); 571 echo '</label><br>'; 572 } 573 echo '</fieldset>'; 574 echo '<p class="description">' . esc_html__('Select the post types where the button should appear.', 'add-as-preferred-source') . '</p>'; 575 } 576 577 /** 578 * Inline Background Color Callback 579 */ 580 public function inline_bg_color_callback() { 581 $bg_color = isset($this->options['inline_bg_color']) ? $this->options['inline_bg_color'] : '#ffffff'; 582 echo '<input type="text" id="adasprso_inline_bg_color" name="adasprso_options[inline_bg_color]" value="' . esc_attr($bg_color) . '" class="color-picker" data-default-color="#ffffff" />'; 583 } 584 585 /** 586 * Inline Text Color Callback 587 */ 588 public function inline_text_color_callback() { 589 $text_color = isset($this->options['inline_text_color']) ? $this->options['inline_text_color'] : '#1c1e21'; 590 echo '<input type="text" id="adasprso_inline_text_color" name="adasprso_options[inline_text_color]" value="' . esc_attr($text_color) . '" class="color-picker" data-default-color="#1c1e21" />'; 591 } 592 593 /** 594 * Inline text callback 595 */ 596 public function inline_text_callback() { 597 $inline_text = isset($this->options['inline_text']) ? $this->options['inline_text'] : 'Stay connected via Google News'; 598 echo '<input type="text" id="adasprso_inline_text" name="adasprso_options[inline_text]" value="' . esc_attr($inline_text) . '" class="regular-text" />'; 599 echo '<p class="description">' . esc_html__('The main title text.', 'add-as-preferred-source') . '</p>'; 600 } 601 602 /** 603 * Inline subtitle callback 604 */ 605 public function inline_subtitle_callback() { 606 $inline_subtitle = isset($this->options['inline_subtitle']) ? $this->options['inline_subtitle'] : 'Follow us for the latest travel updates and guides.'; 607 echo '<input type="text" id="adasprso_inline_subtitle" name="adasprso_options[inline_subtitle]" value="' . esc_attr($inline_subtitle) . '" class="regular-text" />'; 608 echo '<p class="description">' . esc_html__('The secondary text displayed below the title.', 'add-as-preferred-source') . '</p>'; 609 } 610 611 421 612 } -
add-as-preferred-source/trunk/admin/css/add-as-preferred-source-admin.css
r3358556 r3445686 143 143 flex-direction: column; 144 144 } 145 145 146 146 .add-as-preferred-source-settings-content, 147 147 .add-as-preferred-source-preview, … … 151 151 } 152 152 } 153 154 /* Tabs */ 155 .adasprso-nav-tab-wrapper { 156 margin-bottom: 20px !important; 157 padding-top: 10px; 158 } 159 160 /* Inline Preview */ 161 162 .adasprso-inline-preview-box { 163 margin-top: 30px; 164 background: #fff; 165 border: 1px solid #ccd0d4; 166 border-left: 4px solid #72aee6; 167 padding: 15px; 168 } 169 170 .adasprso-inline-preview-box h3 { 171 margin-top: 0; 172 padding-bottom: 10px; 173 border-bottom: 1px solid #eee; 174 } 175 176 .adasprso-inline-preview-container { 177 padding: 30px !important; 178 } 179 180 /* Layout 2 Preview Styles */ 181 .adasprso-inline-layout-2 { 182 /* Gradient Background */ 183 border: 1px solid #e5e7eb; 184 border-radius: 12px; 185 padding: 20px; 186 187 /* Flex box */ 188 display: inline-flex; 189 align-items: center; 190 justify-content: space-between; 191 gap: 16px; 192 max-width: 100%; 193 box-sizing: border-box; 194 width: 100%; 195 text-align: left; 196 } 197 198 .adasprso-inline-text-wrapper { 199 flex: 1; 200 text-align: left; 201 } 202 203 .adasprso-inline-title-mock { 204 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 205 font-size: 16px; 206 font-weight: 600; 207 color: #1c1e21; 208 line-height: 1.4; 209 margin-bottom: 4px; 210 } 211 212 .adasprso-inline-subtitle-mock { 213 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 214 font-size: 14px; 215 color: #515761; 216 } 217 218 .mock-google-btn-wrapper img { 219 height: 40px; 220 width: auto; 221 display: block; 222 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); 223 } -
add-as-preferred-source/trunk/admin/js/add-as-preferred-source-admin.js
r3358556 r3445686 8 8 */ 9 9 10 (function ($) {10 (function ($) { 11 11 'use strict'; 12 12 13 $(document).ready(function () {13 $(document).ready(function () { 14 14 // Initialize color pickers 15 $('.color-picker').wpColorPicker({ 16 change: function(event, ui) { 17 // Update the preview when color is changed 15 $('#adasprso_banner_bg_color, #adasprso_text_color').wpColorPicker({ 16 change: function (event, ui) { 18 17 updateBannerPreview(); 19 18 } 20 19 }); 21 20 21 // Initialize inline color pickers 22 $('#adasprso_inline_bg_color, #adasprso_inline_text_color').wpColorPicker({ 23 change: function (event, ui) { 24 updateInlinePreview(); 25 } 26 }); 27 28 // Tab Switching Logic 29 $('.adasprso-nav-tab-wrapper a').on('click', function (e) { 30 e.preventDefault(); 31 32 // Handle Tab Classes 33 $('.adasprso-nav-tab-wrapper a').removeClass('nav-tab-active'); 34 $(this).addClass('nav-tab-active'); 35 36 // Handle Content Visibility 37 var target = $(this).attr('href'); 38 $('.adasprso-tab-content').hide(); 39 $(target).show(); 40 41 // Handle Sidebar Visibility 42 if (target === '#tab-banner') { 43 $('#sidebar-banner-preview').show(); 44 } else { 45 $('#sidebar-banner-preview').hide(); 46 } 47 }); 48 22 49 // Update banner preview on input change 23 $('#adasprso_banner_text, #adasprso_website_name, #adasprso_banner_position').on('input change', function () {50 $('#adasprso_banner_text, #adasprso_website_name, #adasprso_banner_position').on('input change', function () { 24 51 updateBannerPreview(); 52 }); 53 54 // Update inline preview on input change 55 $('#adasprso_inline_text, #adasprso_inline_subtitle').on('input change', function () { 56 updateInlinePreview(); 25 57 }); 26 58 … … 30 62 var websiteName = $('#adasprso_website_name').val(); 31 63 var bannerPosition = $('#adasprso_banner_position').val(); 32 64 33 65 // Get colors using the color picker API 34 66 var bannerBgColor = $('#adasprso_banner_bg_color').wpColorPicker('color'); … … 43 75 $('.banner-text').css('color', textColor); 44 76 $('.close-button').css('color', textColor); 45 77 46 78 $('.banner-text').text(processedText); 47 79 48 80 // Update banner position 49 81 if (bannerPosition === 'top') { … … 67 99 } 68 100 } 101 102 // Update inline preview function 103 function updateInlinePreview() { 104 var text = $('#adasprso_inline_text').val(); 105 var subtitle = $('#adasprso_inline_subtitle').val(); 106 107 // Get colors 108 var bgColor = $('#adasprso_inline_bg_color').wpColorPicker('color'); 109 var textColor = $('#adasprso_inline_text_color').wpColorPicker('color'); 110 111 // Update Text 112 $('.adasprso-inline-title-mock').text(text); 113 $('.adasprso-inline-subtitle-mock').text(subtitle); 114 115 // Update Colors 116 $('.adasprso-inline-layout-2').css({ 117 'background-color': bgColor, 118 'background-image': 'none', 119 'border-color': (bgColor === '#ffffff' ? '#e5e7eb' : bgColor) 120 }); 121 122 $('.adasprso-inline-title-mock').css('color', textColor); 123 $('.adasprso-inline-subtitle-mock').css('color', textColor); 124 } 69 125 }); 70 126 -
add-as-preferred-source/trunk/admin/partials/add-as-preferred-source-admin-display.php
r3358556 r3445686 27 27 <h1><?php echo esc_html(get_admin_page_title()); ?> <sup style="font-size: 12px; color: #999; font-weight: normal; margin-left: 5px;">v<?php echo esc_html(adasprso_get_plugin_version()); ?></sup></h1> 28 28 29 <h2 class="nav-tab-wrapper adasprso-nav-tab-wrapper"> 30 <a href="#tab-banner" class="nav-tab nav-tab-active"><?php esc_html_e('Banner Settings', 'add-as-preferred-source'); ?></a> 31 <a href="#tab-inline" class="nav-tab"><?php esc_html_e('Inline Button', 'add-as-preferred-source'); ?></a> 32 </h2> 33 29 34 <div class="add-as-preferred-source-settings-wrapper"> 30 35 <div class="add-as-preferred-source-settings-content"> … … 32 37 <?php 33 38 settings_fields('adasprso_settings'); 34 do_settings_sections('adasprso_settings');35 submit_button();36 39 ?> 40 41 <div id="tab-banner" class="adasprso-tab-content active"> 42 <?php do_settings_sections('adasprso_settings'); ?> 43 </div> 44 45 <div id="tab-inline" class="adasprso-tab-content" style="display:none;"> 46 <?php 47 // Render the Inline Settings Section 48 do_settings_sections('adasprso_settings_inline'); 49 50 // Include Inline Preview 51 $options = is_array($this->options) ? $this->options : array(); 52 include ADASPRSO_PLUGIN_PATH . 'admin/partials/add-as-preferred-source-admin-inline-preview.php'; 53 ?> 54 </div> 55 56 <?php submit_button(); ?> 37 57 </form> 38 58 </div> 39 59 40 <div class="add-as-preferred-source-preview"> 60 <!-- Banner Preview Sidebar (Only visible on Banner Tab) --> 61 <div id="sidebar-banner-preview" class="add-as-preferred-source-preview"> 41 62 <h2><?php esc_html_e('Banner Preview', 'add-as-preferred-source'); ?></h2> 42 63 <div class="preview-container"> -
add-as-preferred-source/trunk/public/class-add-as-preferred-source-public.php
r3358556 r3445686 125 125 return $processed_text; 126 126 } 127 128 /** 129 * Add the inline button to the content. 130 * 131 * @since 1.0.0 132 * @param string $content The content. 133 * @return string The content with the inline button appended/prepended. 134 */ 135 public function add_inline_button_to_content($content) { 136 // Check if inline button is enabled 137 if (!isset($this->options['inline_enabled']) || !$this->options['inline_enabled']) { 138 return $content; 139 } 140 141 // Only display on single posts/pages and in the main query 142 if (!is_singular() || !is_main_query()) { 143 return $content; 144 } 145 146 // Check Post Type 147 $post_types = isset($this->options['inline_post_types']) ? $this->options['inline_post_types'] : array('post'); 148 if (!in_array(get_post_type(), $post_types)) { 149 return $content; 150 } 151 152 // Get Settings 153 $position = isset($this->options['inline_position']) ? $this->options['inline_position'] : 'both'; 154 $inline_text = isset($this->options['inline_text']) ? $this->options['inline_text'] : 'Stay connected via Google News'; 155 $inline_subtitle = isset($this->options['inline_subtitle']) ? $this->options['inline_subtitle'] : 'Follow us for the latest travel updates and guides.'; 156 $inline_bg_color = isset($this->options['inline_bg_color']) ? $this->options['inline_bg_color'] : '#ffffff'; 157 $inline_text_color = isset($this->options['inline_text_color']) ? $this->options['inline_text_color'] : '#1c1e21'; 158 159 $google_button_image = ADASPRSO_PLUGIN_URL . 'public/images/google-preferred-source-button.png'; 160 161 // Generate Google Preferences URL 162 $domain = wp_parse_url(home_url(), PHP_URL_HOST); 163 $google_url = 'https://www.google.com/preferences/source?q=' . urlencode($domain); 164 165 // Start Output Buffering 166 ob_start(); 167 include ADASPRSO_PLUGIN_PATH . 'public/partials/add-as-preferred-source-public-inline.php'; 168 $button_html = ob_get_clean(); 169 170 // Inject based on position 171 if ($position === 'above') { 172 $content = $button_html . $content; 173 } elseif ($position === 'below') { 174 $content = $content . $button_html; 175 } elseif ($position === 'both') { 176 $content = $button_html . $content . $button_html; 177 } 178 179 return $content; 180 } 181 182 127 183 } -
add-as-preferred-source/trunk/public/css/add-as-preferred-source-public.css
r3358556 r3445686 45 45 transform: translateY(-100%); 46 46 } 47 47 48 100% { 48 49 transform: translateY(0); … … 54 55 transform: translateY(100%); 55 56 } 57 56 58 100% { 57 59 transform: translateY(0); … … 133 135 margin-right: 8px; 134 136 } 135 137 136 138 .google-button-image img { 137 139 height: 24px; 138 140 } 139 141 140 142 .close-button { 141 143 font-size: 18px; … … 148 150 padding: 8px 12px; 149 151 } 150 152 151 153 .banner-text { 152 154 font-size: 12px; 153 155 } 154 156 155 157 .google-button-image img { 156 158 height: 22px; 157 159 } 158 160 } 161 162 /* Inline Button Styles */ 163 .adasprso-inline-container { 164 margin: 30px 0; 165 width: 100%; 166 clear: both; 167 box-sizing: border-box; 168 } 169 170 /* Layout 2: Gradient Card */ 171 .adasprso-inline-layout-2 { 172 /* Gradient Background */ 173 border: 1px solid #e5e7eb; 174 border-radius: 12px; 175 padding: 20px; 176 177 /* Flex Layout */ 178 display: flex; 179 align-items: center; 180 justify-content: space-between; 181 gap: 16px; 182 max-width: 100%; 183 } 184 185 .adasprso-inline-text-wrapper { 186 flex: 1; 187 text-align: left; 188 } 189 190 .adasprso-inline-title { 191 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 192 font-size: 16px; 193 font-weight: 600; 194 color: #1c1e21; 195 line-height: 1.4; 196 margin-bottom: 4px; 197 } 198 199 .adasprso-inline-subtitle { 200 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 201 font-size: 14px; 202 color: #515761; 203 line-height: 1.4; 204 } 205 206 .adasprso-inline-button { 207 display: flex; 208 align-items: center; 209 transition: transform 0.2s ease; 210 text-decoration: none !important; 211 border: none !important; 212 box-shadow: none !important; 213 background: transparent !important; 214 flex-shrink: 0; 215 } 216 217 .adasprso-inline-button:hover { 218 transform: scale(1.02); 219 } 220 221 .adasprso-inline-button img { 222 height: 40px; 223 width: auto; 224 display: block; 225 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); 226 margin: 0; 227 padding: 0; 228 max-width: 100%; 229 } 230 231 /* Responsive: Stack on mobile */ 232 @media screen and (max-width: 600px) { 233 .adasprso-inline-layout-2 { 234 flex-direction: column; 235 text-align: center; 236 } 237 238 .adasprso-inline-text-wrapper { 239 text-align: center; 240 margin-bottom: 15px; 241 } 242 243 .adasprso-inline-layout-2 .adasprso-inline-button { 244 width: auto; 245 justify-content: center; 246 } 247 } 248 249 @media screen and (max-width: 480px) { 250 .adasprso-inline-title { 251 font-size: 15px; 252 } 253 254 .adasprso-inline-button img { 255 height: 36px; 256 } 257 } 258 259 .adasprso-inline-content { 260 display: inline-flex; 261 flex-direction: column; 262 align-items: center; 263 gap: 15px; 264 max-width: 100%; 265 } 266 267 .adasprso-inline-text { 268 font-family: inherit; 269 font-size: 18px; 270 font-weight: 500; 271 color: inherit; 272 line-height: 1.4; 273 text-align: center; 274 } 275 276 .adasprso-inline-button:hover { 277 transform: scale(1.02); 278 } 279 280 .adasprso-inline-button img { 281 height: 40px; 282 width: auto; 283 display: block; 284 box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15); 285 margin: 0; 286 padding: 0; 287 max-width: 100%; 288 } 289 290 @media screen and (max-width: 480px) { 291 .adasprso-inline-text { 292 font-size: 16px; 293 } 294 295 .adasprso-inline-button img { 296 height: 36px; 297 } 298 } -
add-as-preferred-source/trunk/readme.txt
r3358556 r3445686 1 === Add as Preferred Source ===1 === Add as Preferred Source on Google === 2 2 Contributors: mathewt 3 3 Tags: google preferred source, add as trusted source, google trusted source, google search, preferred news source 4 4 Requires at least: 5.0 5 Tested up to: 6. 86 Stable tag: 1. 0.15 Tested up to: 6.9 6 Stable tag: 1.1 7 7 Requires PHP: 7.2 8 8 License: GPLv2 or later … … 13 13 == Description == 14 14 15 This plugin displays a banneron your website that directs visitors to Google's preferred sources feature. When clicked, the banner takes users to Google's preferences page where they can add your site as a preferred source for their personalized search results.15 Add as Preferred Source on Google plugin displays a banner and inline button on your website that directs visitors to Google's preferred sources feature. When clicked, the banner takes users to Google's preferences page where they can add your site as a preferred source for their personalized search results. 16 16 17 17 **What it does:** … … 27 27 Google's preferred sources is a feature that allows users to indicate which sources they want to see more of in their search results. This is a Google feature, not affiliated with this plugin. Users who add your site as a preferred source may see your content more frequently in their personalized search results. 28 28 29 **DISCLAIMER:** This plugin is not a ffiliated with, endorsed by, or connected to Google in any way. It is an independent tool created to help news publishing sites easily add a banner that links to Google's preferred sources feature.29 **DISCLAIMER:** This plugin is not associated with Google and was created to help website owners make a banner and inline card for adding their sites to Google's Preferred Source. The term "Google" is used solely to convey the plugin's function, and we are not related to Google in any way. 30 30 31 31 **Plugin Features:** … … 117 117 == Frequently Asked Questions == 118 118 119 = Is this plugin affiliated with Google? = 120 121 No. This plugin is not associated with Google. It was created to help website owners make a banner and inline card for adding their sites to Google's Preferred Source. The term "Google" is used solely to convey the plugin's function, and we are not related to Google in any way. 122 119 123 = What are Google preferred sources? = 120 124 … … 164 168 165 169 1. Plugin settings page with customization options and live preview 166 2. Banner display on website frontend 167 3. Color customization options 168 4. Position and device settings 169 5. Mobile responsive banner display 170 2. Banner display on website frontend as top 171 3. Inline button card settings page with customization options and live preview 172 . Inline button display on website frontend 170 173 171 174 == Changelog == 175 176 = 1.1 = 177 * New: Refactored Inline Button with a modern card design. 178 * New: Added "Post Types" selection for inline button (replacing Content Type). 179 * New: Added Background and Text Color pickers for the inline button. 180 * New: Added "Inline Subtitle" option. 181 * Improvement: Inline button now uses standard Flexbox layout (Layout 2). 182 * Improvement: Fixed image display issues. 183 * Cleanup: Removed "Alignment" settings. 172 184 173 185 = 1.0.0 =
Note: See TracChangeset
for help on using the changeset viewer.