Plugin Directory

Changeset 3445686


Ignore:
Timestamp:
01/23/2026 04:00:43 PM (2 months ago)
Author:
mathewt
Message:

new version

Location:
add-as-preferred-source
Files:
33 added
8 edited

Legend:

Unmodified
Added
Removed
  • add-as-preferred-source/trunk/add-as-preferred-source.php

    r3358556 r3445686  
    11<?php
    22/**
    3  * Plugin Name: Add as Preferred Source
     3 * Plugin Name: Add as Preferred Source on Google
    44 * Description: Display a banner that encourages users to add your website as a preferred source on Google.
    5  * Version: 1.0.1
     5 * Version: 1.1
    66 * Author: Mathew
    77 * License: GPL-2.0+
     
    1818 * Currently plugin version.
    1919 */
    20 define('ADASPRSO_VERSION', '1.0.1');
     20define('ADASPRSO_VERSION', '1.1');
    2121define('ADASPRSO_PLUGIN_NAME', 'add-as-preferred-source');
    2222define('ADASPRSO_PLUGIN_PATH', plugin_dir_path(__FILE__));
     
    131131        // Add banner to footer
    132132        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'));
    133136    }
    134137
  • add-as-preferred-source/trunk/admin/class-add-as-preferred-source-admin.php

    r3358556 r3445686  
    260260            'adasprso_device_section'
    261261        );
     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        );
    262335    }
    263336
     
    293366        $sanitized_input['show_on_desktop'] = isset($input['show_on_desktop']) ? 1 : 0;
    294367
     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       
    295391        // Google button image (keep the local image path)
    296392        $sanitized_input['google_button_image'] = ADASPRSO_PLUGIN_URL . 'public/images/google-preferred-source-button.png';
     
    419515        echo '<label for="adasprso_show_on_desktop">' . esc_html__('Display banner on desktop devices', 'add-as-preferred-source') . '</label>';
    420516    }
     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
    421612}
  • add-as-preferred-source/trunk/admin/css/add-as-preferred-source-admin.css

    r3358556 r3445686  
    143143        flex-direction: column;
    144144    }
    145    
     145
    146146    .add-as-preferred-source-settings-content,
    147147    .add-as-preferred-source-preview,
     
    151151    }
    152152}
     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  
    88 */
    99
    10 (function($) {
     10(function ($) {
    1111    'use strict';
    1212
    13     $(document).ready(function() {
     13    $(document).ready(function () {
    1414        // 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) {
    1817                updateBannerPreview();
    1918            }
    2019        });
    2120
     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
    2249        // 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 () {
    2451            updateBannerPreview();
     52        });
     53
     54        // Update inline preview on input change
     55        $('#adasprso_inline_text, #adasprso_inline_subtitle').on('input change', function () {
     56            updateInlinePreview();
    2557        });
    2658
     
    3062            var websiteName = $('#adasprso_website_name').val();
    3163            var bannerPosition = $('#adasprso_banner_position').val();
    32            
     64
    3365            // Get colors using the color picker API
    3466            var bannerBgColor = $('#adasprso_banner_bg_color').wpColorPicker('color');
     
    4375            $('.banner-text').css('color', textColor);
    4476            $('.close-button').css('color', textColor);
    45            
     77
    4678            $('.banner-text').text(processedText);
    47            
     79
    4880            // Update banner position
    4981            if (bannerPosition === 'top') {
     
    6799            }
    68100        }
     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        }
    69125    });
    70126
  • add-as-preferred-source/trunk/admin/partials/add-as-preferred-source-admin-display.php

    r3358556 r3445686  
    2727    <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>
    2828
     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
    2934    <div class="add-as-preferred-source-settings-wrapper">
    3035        <div class="add-as-preferred-source-settings-content">
     
    3237                <?php
    3338                settings_fields('adasprso_settings');
    34                 do_settings_sections('adasprso_settings');
    35                 submit_button();
    3639                ?>
     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(); ?>
    3757            </form>
    3858        </div>
    3959       
    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">
    4162            <h2><?php esc_html_e('Banner Preview', 'add-as-preferred-source'); ?></h2>
    4263            <div class="preview-container">
  • add-as-preferred-source/trunk/public/class-add-as-preferred-source-public.php

    r3358556 r3445686  
    125125        return $processed_text;
    126126    }
     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
    127183}
  • add-as-preferred-source/trunk/public/css/add-as-preferred-source-public.css

    r3358556 r3445686  
    4545        transform: translateY(-100%);
    4646    }
     47
    4748    100% {
    4849        transform: translateY(0);
     
    5455        transform: translateY(100%);
    5556    }
     57
    5658    100% {
    5759        transform: translateY(0);
     
    133135        margin-right: 8px;
    134136    }
    135    
     137
    136138    .google-button-image img {
    137139        height: 24px;
    138140    }
    139    
     141
    140142    .close-button {
    141143        font-size: 18px;
     
    148150        padding: 8px 12px;
    149151    }
    150    
     152
    151153    .banner-text {
    152154        font-size: 12px;
    153155    }
    154    
     156
    155157    .google-button-image img {
    156158        height: 22px;
    157159    }
    158160}
     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 ===
    22Contributors: mathewt
    33Tags: google preferred source, add as trusted source, google trusted source, google search, preferred news source
    44Requires at least: 5.0
    5 Tested up to: 6.8
    6 Stable tag: 1.0.1
     5Tested up to: 6.9
     6Stable tag: 1.1
    77Requires PHP: 7.2
    88License: GPLv2 or later
     
    1313== Description ==
    1414
    15 This plugin displays a banner 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.
     15Add 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.
    1616
    1717**What it does:**
     
    2727Google'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.
    2828
    29 **DISCLAIMER:** This plugin is not affiliated 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.
    3030
    3131**Plugin Features:**
     
    117117== Frequently Asked Questions ==
    118118
     119= Is this plugin affiliated with Google? =
     120
     121No. 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
    119123= What are Google preferred sources? =
    120124
     
    164168
    1651691. 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
     1702. Banner display on website frontend as top
     1713. Inline button card settings page with customization options and live preview
     172. Inline button display on website frontend
    170173
    171174== 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.
    172184
    173185= 1.0.0 =
Note: See TracChangeset for help on using the changeset viewer.