Plugin Directory

Changeset 3378863


Ignore:
Timestamp:
10/15/2025 11:53:29 AM (2 months ago)
Author:
RavanH
Message:

commit and tag v5.5.8

Location:
xml-sitemap-feed
Files:
111 added
13 edited

Legend:

Unmodified
Added
Removed
  • xml-sitemap-feed/trunk/inc/admin/class-sitemap-news.php

    r3334262 r3378863  
    229229        \do_action( 'xmlsf_news_add_settings', $active_tab );
    230230
    231         // prepare sitemap link url.
    232         $sitemap_url = \xmlsf()->sitemap_news->get_sitemap_url();
    233 
    234231        // Sidebar actions.
    235232        \add_action(
     
    308305                    'xmlsf_news_name',
    309306                    '<label for="xmlsf_news_name">' . \__( 'Publication name', 'xml-sitemap-feed' ) . '</label>',
    310                     array( __CLASS__, 'name_field' ),
     307                    function () {
     308                        include XMLSF_DIR . '/views/admin/field-news-name.php';
     309                    },
    311310                    'xmlsf_news_general',
    312311                    'news_sitemap_general_section'
     
    315314                    'xmlsf_news_post_type',
    316315                    __( 'Post types', 'xml-sitemap-feed' ),
    317                     array( __CLASS__, 'post_type_field' ),
     316                    function () {
     317                        include XMLSF_DIR . '/views/admin/field-news-post-type.php';
     318                    },
    318319                    'xmlsf_news_general',
    319320                    'news_sitemap_general_section'
     
    331332                            'xmlsf_news_categories',
    332333                            \translate( 'Categories' ), // phpcs:ignore WordPress.WP.I18n.LowLevelTranslationFunction
    333                             array( __CLASS__, 'categories_field' ),
     334                            function () {
     335                                include XMLSF_DIR . '/views/admin/field-news-categories.php';
     336                            },
    334337                            'xmlsf_news_general',
    335338                            'news_sitemap_general_section'
     
    359362            'xmlsf_news_general',
    360363            'xmlsf_news_tags',
    361             array( __CLASS__, 'sanitize_news_tags' )
     364            array( 'sanitize_callback' => array( __CLASS__, 'sanitize_news_tags' ) )
    362365        );
    363366
     
    490493
    491494    /**
    492      * News source name field
    493      */
    494     public static function name_field() {
    495         $options = (array) \get_option( 'xmlsf_news_tags', array() );
    496         $name    = ! empty( $options['name'] ) ? $options['name'] : '';
    497 
    498         if ( XMLSF_GOOGLE_NEWS_NAME ) {
    499             $name = XMLSF_GOOGLE_NEWS_NAME;
    500         }
    501 
    502         // The actual fields for data entry.
    503         include XMLSF_DIR . '/views/admin/field-news-name.php';
    504     }
    505 
    506     /**
    507      * Post type field
    508      */
    509     public static function post_type_field() {
    510         global $wp_taxonomies;
    511 
    512         $post_types = \apply_filters(
    513             'xmlsf_news_post_types',
    514             \get_post_types(
    515                 array(
    516                     'public'       => true,
    517                     'hierarchical' => false,
    518                 )
    519                 /*,'objects'*/
    520             )
    521         );
    522 
    523         // Make sure post types are allowed and publicly viewable.
    524         $post_types = \array_diff( $post_types, \xmlsf()->disabled_post_types() );
    525         $post_types = \array_filter( $post_types, 'is_post_type_viewable' );
    526 
    527         if ( ! \is_array( $post_types ) || empty( $post_types ) ) {
    528             // This should never happen.
    529             echo '<p class="description warning">' . \esc_html__( 'There appear to be no post types available.', 'xml-sitemap-feed' ) . '</p>';
    530             return;
    531         }
    532 
    533         $options        = (array) \get_option( 'xmlsf_news_tags', array() );
    534         $news_post_type = isset( $options['post_type'] ) && ! empty( $options['post_type'] ) ? (array) $options['post_type'] : array( 'post' );
    535         $type           = \apply_filters( 'xmlsf_news_post_type_field_type', 1 === \count( $news_post_type ) ? 'radio' : 'checkbox' );
    536         $allowed        = ( ! empty( $options['categories'] ) && isset( $wp_taxonomies['category'] ) ) ? $wp_taxonomies['category']->object_type : $post_types;
    537         $do_warning     = ( ! empty( $options['categories'] ) && \count( $post_types ) > 1 ) ? true : false;
    538 
    539         // The actual fields for data entry.
    540         include XMLSF_DIR . '/views/admin/field-news-post-type.php';
    541     }
    542 
    543     /**
    544      * Categories field
    545      */
    546     public static function categories_field() {
    547         $options             = (array) \get_option( 'xmlsf_news_tags', array() );
    548         $selected_categories = isset( $options['categories'] ) && \is_array( $options['categories'] ) ? $options['categories'] : array();
    549 
    550         if ( \function_exists( '\pll_languages_list' ) ) {
    551             \add_filter(
    552                 'get_terms_args',
    553                 function ( $args ) {
    554                     $args['lang'] = '';
    555                     return $args;
    556                 }
    557             );
    558         }
    559 
    560         global $sitepress;
    561         if ( $sitepress ) {
    562             \remove_filter( 'get_terms_args', array( $sitepress, 'get_terms_args_filter' ) );
    563             \remove_filter( 'get_term', array( $sitepress, 'get_term_adjust_id' ), 1 );
    564             \remove_filter( 'terms_clauses', array( $sitepress, 'terms_clauses' ) );
    565         }
    566 
    567         $cat_list = \str_replace(
    568             'name="post_category[]"',
    569             'name="xmlsf_news_tags[categories][]"',
    570             \wp_terms_checklist(
    571                 null,
    572                 array(
    573                     'taxonomy'      => 'category',
    574                     'selected_cats' => $selected_categories,
    575                     'echo'          => false,
    576                 )
    577             )
    578         );
    579 
    580         // The actual fields for data entry.
    581         include XMLSF_DIR . '/views/admin/field-news-categories.php';
    582     }
    583 
    584     /**
    585495     * Sanitize news tag settings
    586496     *
     
    595505        if ( empty( $sanitized['post_type'] ) || ! \is_array( $sanitized['post_type'] ) ) {
    596506            $sanitized['post_type'] = array( 'post' );
     507            // Add settings error.
     508            \add_settings_error(
     509                'xmlsf_news_tags',
     510                'xmlsf_news_post_type_error',
     511                __( 'At least one post type must be selected. Defaulting to "Posts".', 'xml-sitemap-feed' ),
     512                'error'
     513            );
    597514        }
    598515
  • xml-sitemap-feed/trunk/inc/admin/class-sitemap.php

    r3334262 r3378863  
    638638            'xmlsf_general',
    639639            'xmlsf_server',
    640             array( __NAMESPACE__ . '\Sanitize', 'server' )
     640            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'server' ) )
    641641        );
    642642        \register_setting(
    643643            'xmlsf_general',
    644644            'xmlsf_disabled_providers',
    645             array( __NAMESPACE__ . '\Sanitize', 'disabled_providers' )
     645            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'disabled_providers' ) )
    646646        );
    647647        // post_types.
     
    649649            'xmlsf_post_types',
    650650            'xmlsf_post_types',
    651             array( __NAMESPACE__ . '\Sanitize', 'post_types' )
     651            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'post_types' ) )
    652652        );
    653653        // post_type settings.
     
    655655            'xmlsf_post_types',
    656656            'xmlsf_post_type_settings',
    657             array( __NAMESPACE__ . '\Sanitize', 'post_type_settings' )
     657            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'post_type_settings' ) )
    658658        );
    659659        // taxonomies.
     
    661661            'xmlsf_taxonomies',
    662662            'xmlsf_taxonomy_settings',
    663             array( __NAMESPACE__ . '\Sanitize', 'taxonomy_settings' )
     663            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'taxonomy_settings' ) )
    664664        );
    665665        \register_setting(
    666666            'xmlsf_taxonomies',
    667667            'xmlsf_taxonomies',
    668             array( __NAMESPACE__ . '\Sanitize', 'taxonomies' )
     668            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'taxonomies' ) )
    669669        );
    670670        // authors.
     
    672672            'xmlsf_authors',
    673673            'xmlsf_author_settings',
    674             array( __NAMESPACE__ . '\Sanitize', 'author_settings' )
     674            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'author_settings' ) )
    675675        );
    676676        \register_setting(
    677677            'xmlsf_authors',
    678678            'xmlsf_authors',
    679             array( __NAMESPACE__ . '\Sanitize', 'authors' )
     679            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'authors' ) )
    680680        );
    681681        // custom urls.
     
    683683            'xmlsf_advanced',
    684684            'xmlsf_urls',
    685             array( __NAMESPACE__ . '\Sanitize', 'custom_urls_settings' )
     685            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'custom_urls_settings' ) )
    686686        );
    687687        // custom sitemaps.
     
    689689            'xmlsf_advanced',
    690690            'xmlsf_custom_sitemaps',
    691             array( __NAMESPACE__ . '\Sanitize', 'custom_sitemaps_settings' )
     691            array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'custom_sitemaps_settings' ) )
    692692        );
    693693
  • xml-sitemap-feed/trunk/inc/compat/class-squirrly-seo.php

    r3334262 r3378863  
    1616     */
    1717    public static function admin_notices() {
    18         if ( ! \current_user_can( 'manage_options' ) || \in_array( 'squirrly_seo_sitemap', (array) \get_user_meta( \get_current_user_id(), 'xmlsf_dismissed' ), true ) ) {
     18        if ( ! \current_user_can( 'manage_options' ) ) {
    1919            return;
    2020        }
     
    2626            // sitemap module on.
    2727            ?>
    28             <div class="notice notice-warning fade is-dismissible">
     28            <div class="notice notice-error fade is-dismissible">
    2929                <p>
    30                     <?php
     30                    <strong><?php
    3131                    printf( /* translators: Conflicting Plugn name, Plugin name */
    3232                        \esc_html__( 'The %1$s XML Sitemap is not compatible with %2$s.', 'xml-sitemap-feed' ),
     
    3434                        \esc_html__( 'XML Sitemap & Google News', 'xml-sitemap-feed' )
    3535                    );
    36                     ?>
     36                    ?></strong>
    3737                    <?php
    3838                    printf( /* translators: Sitemap page name (linked to Squirrly SEO plugin settings), XML Sitemap Index, Reading Settings admin page (linked to Reading settings) */
    3939                        \esc_html__( 'Please either disable the XML Sitemap under %1$s in your SEO settings or disable the option %2$s on %3$s.', 'xml-sitemap-feed' ),
    40                         '<a href="' . \esc_url( \admin_url( 'admin.php' ) ) . '?page=sq_features">' . \esc_html__( 'Miscellaneous Features', 'squirrly-seo' ) . '</a>',
     40                        '<a href="' . \esc_url( \admin_url( 'admin.php' ) ) . '?page=sq_features">' . \esc_html__( 'All Features', 'squirrly-seo' ) . '</a>',
    4141                        \esc_html__( 'XML Sitemap Index', 'xml-sitemap-feed' ),
    4242                        '<a href="' . \esc_url( \admin_url( 'options-reading.php' ) ) . '#xmlsf_sitemaps">' . \esc_html( \translate( 'Reading Settings' ) ) . '</a>'
     
    4444                    ?>
    4545                </p>
    46                 <form action="" method="post">
    47                     <?php \wp_nonce_field( XMLSF_BASENAME . '-notice', '_xmlsf_notice_nonce' ); ?>
    48                     <p>
    49                         <input type="hidden" name="xmlsf-dismiss" value="squirrly_seo_sitemap" />
    50                         <input type="submit" class="button button-small" name="xmlsf-dismiss-submit" value="<?php echo \esc_attr( \translate( 'Dismiss' ) ); ?>" />
    51                     </p>
    52                 </form>
    5346            </div>
    5447            <?php
     
    6053     */
    6154    public static function news_admin_notices() {
    62         if ( ! \current_user_can( 'manage_options' ) || \in_array( 'squirrly_seo_sitemap_news', (array) \get_user_meta( \get_current_user_id(), 'xmlsf_dismissed' ), true ) ) {
     55        if ( ! \current_user_can( 'manage_options' ) || \in_array( 'squirrly_news_sitemap', (array) \get_user_meta( \get_current_user_id(), 'xmlsf_dismissed' ), true ) ) {
    6356            return;
    6457        }
     
    6659        $squirrly = \json_decode( \get_option( 'sq_options', '' ) );
    6760
    68         // check aioseop sitemap module.
    69         if ( is_object( $squirrly ) && ! empty( $squirrly->sq_sitemap->{'sitemap-news'}[1] ) ) {
    70             // sitemap module on.
     61        // check squirrly news sitemap module.
     62        if ( is_object( $squirrly ) && $squirrly->sq_auto_sitemap && ! empty( $squirrly->sq_sitemap->{'sitemap-news'}[1] ) ) {
     63            // news sitemap module on.
    7164            ?>
    72             <div class="notice notice-warning fade is-dismissible">
     65            <div class="notice notice-error fade is-dismissible">
    7366                <p>
    74                     <strong><?php \esc_html_e( 'XML Sitemap & Google News', 'xml-sitemap-feed' ); ?></strong>
     67                    <strong><?php
     68                    printf( /* translators: Conflicting Plugn name, Plugin name */
     69                        \esc_html__( 'The %1$s Google News Sitemap is not compatible with %2$s.', 'xml-sitemap-feed' ),
     70                        \esc_html__( 'Squirrly SEO', 'squirrly-seo' ),
     71                        \esc_html__( 'XML Sitemap & Google News', 'xml-sitemap-feed' )
     72                    );
     73                    ?></strong>
     74                    <?php
     75                    printf( /* translators: Sitemap page name (linked to Squirrly SEO plugin settings), XML Sitemap Index, Reading Settings admin page (linked to Reading settings) */
     76                        \esc_html__( 'Please either disable the Google News Sitemap under %1$s in your SEO settings or disable the option %2$s on %3$s.', 'xml-sitemap-feed' ),
     77                        '<a href="' . \esc_url( \admin_url( 'admin.php' ) ) . '?page=sq_seosettings&tab=tweaks#tab=sitemap">' . \esc_html__( 'Tweaks And Sitemap', 'squirrly-seo' ) . '</a>',
     78                        \esc_html__( 'Google News Sitemap', 'xml-sitemap-feed' ),
     79                        '<a href="' . \esc_url( \admin_url( 'options-reading.php' ) ) . '#xmlsf_sitemaps">' . \esc_html( \translate( 'Reading Settings' ) ) . '</a>'
     80                    );
     81                    ?>
    7582                </p>
    76                 <form action="" method="post">
    77                     <?php \wp_nonce_field( XMLSF_BASENAME . '-notice', '_xmlsf_notice_nonce' ); ?>
    78                     <input type="hidden" name="xmlsf-dismiss" value="xmlsf_advanced_news" />
    79                     <input type="submit" class="button button-small alignright" name="xmlsf-dismiss-submit" value="<?php echo \esc_html( \translate( 'Dismiss' ) ); ?>" />
    80                 </form>
    81                 <?php include XMLSF_DIR . '/views/admin/section-advanced-news-compat-message.php'; ?>
    8283            </div>
    8384            <?php
  • xml-sitemap-feed/trunk/readme.txt

    r3375648 r3378863  
    142142== Upgrade Notice ==
    143143
    144 = 5.5.7 =
    145 Fix WPML Compatibility missing valid callback.
     144= 5.5.8 =
     145Drop unused news tags and bugfixes.
    146146
    147147== Changelog ==
     148
     149= 5.5.8 =
     150Date: 20251014
     151* Drop unused news tags & stylesheet columns
     152* FIX: failing sanitize callbacks
     153* FIX: Squirrly SEO incompatibility warnings
    148154
    149155= 5.5.7 =
  • xml-sitemap-feed/trunk/views/admin/field-news-categories.php

    r3334262 r3378863  
    66 */
    77
     8$options             = (array) get_option( 'xmlsf_news_tags', array() );
     9$selected_categories = isset( $options['categories'] ) && is_array( $options['categories'] ) ? $options['categories'] : array();
     10
     11if ( function_exists( '\pll_languages_list' ) ) {
     12    add_filter(
     13        'get_terms_args',
     14        function ( $args ) {
     15            $args['lang'] = '';
     16            return $args;
     17        }
     18    );
     19}
     20
     21global $sitepress;
     22if ( $sitepress ) {
     23    remove_filter( 'get_terms_args', array( $sitepress, 'get_terms_args_filter' ) );
     24    remove_filter( 'get_term', array( $sitepress, 'get_term_adjust_id' ), 1 );
     25    remove_filter( 'terms_clauses', array( $sitepress, 'terms_clauses' ) );
     26}
     27
     28$cat_list = str_replace(
     29    'name="post_category[]"',
     30    'name="xmlsf_news_tags[categories][]"',
     31    wp_terms_checklist(
     32        null,
     33        array(
     34            'taxonomy'      => 'category',
     35            'selected_cats' => $selected_categories,
     36            'echo'          => false,
     37        )
     38    )
     39);
    840?>
    941<fieldset>
  • xml-sitemap-feed/trunk/views/admin/field-news-name.php

    r3334262 r3378863  
    66 */
    77
     8$options = (array) get_option( 'xmlsf_news_tags', array() );
     9$name    = ! empty( $options['name'] ) ? $options['name'] : '';
     10
     11if ( defined( 'XMLSF_GOOGLE_NEWS_NAME' ) && XMLSF_GOOGLE_NEWS_NAME ) {
     12    $name = XMLSF_GOOGLE_NEWS_NAME;
     13    $disabled = true;
     14} else {
     15    $disabled = false;
     16}
    817?>
    918<fieldset>
    1019    <legend class="screen-reader-text"><?php esc_html_e( 'Publication name', 'xml-sitemap-feed' ); ?></legend>
    11     <input type="text" name="xmlsf_news_tags[name]" id="xmlsf_news_name" value="<?php echo esc_attr( $name ); ?>" class="regular-text" placeholder="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>"<?php disabled( false !== XMLSF_GOOGLE_NEWS_NAME ); ?>>
     20    <input type="text" name="xmlsf_news_tags[name]" id="xmlsf_news_name" value="<?php echo esc_attr( $name ); ?>" class="regular-text" placeholder="<?php echo esc_attr( get_bloginfo( 'name' ) ); ?>"<?php disabled( $disabled ); ?>>
    1221    <p class="description">
    1322        <?php printf( /* translators: Site Title linked to Options > General */ esc_html__( 'By default, the general %s setting will be used.', 'xml-sitemap-feed' ), '<a href="options-general.php">' . esc_html__( 'Site Title' ) . '</a>' ); ?>
    1423        <?php
    15         if ( XMLSF_GOOGLE_NEWS_NAME ) {
     24        if ( defined( 'XMLSF_GOOGLE_NEWS_NAME' ) && XMLSF_GOOGLE_NEWS_NAME ) {
    1625            echo '<em>';
    1726            esc_html_e( 'Your Publication name is currently overridden by the XMLSF_GOOGLE_NEWS_NAME constant, probably set in wp-config.php.', 'xml-sitemap-feed' );
  • xml-sitemap-feed/trunk/views/admin/field-news-post-type.php

    r3334262 r3378863  
    55 * @package XML Sitemap & Google News
    66 */
     7
     8global $wp_taxonomies;
     9
     10$post_types = apply_filters(
     11    'xmlsf_news_post_types',
     12    get_post_types(
     13        array(
     14            'public'       => true,
     15            'hierarchical' => false,
     16        )
     17        /*,'objects'*/
     18    )
     19);
     20
     21// Make sure post types are allowed and publicly viewable.
     22$post_types = array_diff( $post_types, xmlsf()->disabled_post_types() );
     23$post_types = array_filter( $post_types, 'is_post_type_viewable' );
     24
     25if ( ! is_array( $post_types ) || empty( $post_types ) ) {
     26    // This should never happen.
     27    echo '<p class="description warning">' . esc_html__( 'There appear to be no post types available.', 'xml-sitemap-feed' ) . '</p>';
     28    return;
     29}
     30
     31$options        = (array) \get_option( 'xmlsf_news_tags', array() );
     32$news_post_type = isset( $options['post_type'] ) && ! empty( $options['post_type'] ) ? (array) $options['post_type'] : array( 'post' );
     33$type           = apply_filters( 'xmlsf_news_post_type_field_type', 1 === count( $news_post_type ) ? 'radio' : 'checkbox' );
     34$allowed        = ( ! empty( $options['categories'] ) && isset( $wp_taxonomies['category'] ) ) ? $wp_taxonomies['category']->object_type : $post_types;
     35$do_warning     = ( ! empty( $options['categories'] ) && count( $post_types ) > 1 ) ? true : false;
    736
    837?>
  • xml-sitemap-feed/trunk/views/admin/page-sitemap-news.php

    r3334262 r3378863  
    5555                /* translators: Sitemap name with URL */
    5656                esc_html__( 'Open your %s', 'xml-sitemap-feed' ),
    57                 '<strong><a href="' . esc_url( $sitemap_url ) . '" target="_blank">' . esc_html__( 'Google News Sitemap', 'xml-sitemap-feed' ) . '</a></strong><span class="dashicons dashicons-external"></span>'
     57                '<strong><a href="' . esc_url( xmlsf()->sitemap_news->get_sitemap_url() ) . '" target="_blank">' . esc_html__( 'Google News Sitemap', 'xml-sitemap-feed' ) . '</a></strong><span class="dashicons dashicons-external"></span>'
    5858            );
    5959            ?>
  • xml-sitemap-feed/trunk/views/admin/section-advanced-compat-message.php

    r3334262 r3378863  
    1212    if ( current_user_can( 'update_plugins' ) ) {
    1313        ?>
    14     <a href="https://premium.status301.com/account/" target="_blank">
     14    <a href="https://premium.status301.com/account/downloads/" target="_blank">
    1515        <?php esc_html_e( 'Please download and install the latest version.', 'xml-sitemap-feed' ); ?>
    1616    </a>
     
    1818    } else {
    1919        ?>
    20     <a href="https://premium.status301.com/account/" target="_blank">
    21         <?php esc_html_e( 'Please contact your site administrator to install the update.', 'xml-sitemap-feed' ); ?>
    22     </a>
     20    <?php esc_html_e( 'Please contact your site administrator to install the update.', 'xml-sitemap-feed' ); ?>
    2321        <?php
    2422    }
  • xml-sitemap-feed/trunk/views/admin/section-advanced-news-compat-message.php

    r3334262 r3378863  
    1212    if ( current_user_can( 'update_plugins' ) ) {
    1313        ?>
    14     <a href="https://premium.status301.com/account/" target="_blank">
     14    <a href="https://premium.status301.com/account/downloads/" target="_blank">
    1515        <?php esc_html_e( 'Please download and install the latest version.', 'xml-sitemap-feed' ); ?>
    1616    </a>
     
    1818    } else {
    1919        ?>
    20     <a href="https://premium.status301.com/account/" target="_blank">
    21         <?php esc_html_e( 'Please contact your site administrator to install the update.', 'xml-sitemap-feed' ); ?>
    22     </a>
     20    <?php esc_html_e( 'Please contact your site administrator to install the update.', 'xml-sitemap-feed' ); ?>
    2321        <?php
    2422    }
  • xml-sitemap-feed/trunk/views/admin/sidebar-contribute.php

    r3375648 r3378863  
    99<h3><span class="dashicons dashicons-thumbs-up"></span> <?php esc_html_e( 'Contribute', 'xml-sitemap-feed' ); ?></h3>
    1010<p>
    11     <a target="_blank" href="https://www.paypal.com/donate/?hosted_button_id=5UVXZVN5HDKBS"
     11    <a target="_blank" href="https://www.paypal.com/donate/?hosted_button_id=5UVXZVN5HDKBS" style="text-decoration:none;"
    1212        title="<?php printf( /* translators: Plugin name */ esc_html__( 'Donate to keep the free %s plugin development & support going!', 'xml-sitemap-feed' ), esc_html__( 'XML Sitemap & Google News', 'xml-sitemap-feed' ) ); ?>">
    13         <img src="<?php trailingslashit( plugins_url( 'assets', XMLSF_BASENAME ) ); ?>donate.png" style="border:none;float:right;margin:4px 0 0 10px" width="92" height="26" />
    14         <img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" style="border:none;float:right;margin:4px 0 0 10px" width="92" height="26" />
     13        <img src="<?php echo trailingslashit( plugins_url( 'assets', XMLSF_BASENAME ) ); ?>donate.png" style="border:none;float:right;margin:4px 0 0 10px; float: right;" width="92" height="92" />
     14        <span style="display:block;float:right;width:fit-content;padding:4px 12px;background-color:#ffcc00;border:1px solid #555;border-radius:50px;color:black;text-decoration:none;font-weight:bold"><?php esc_html_e( 'Donate', 'xml-sitemap-feed' ); ?></span>
    1515    </a>
    16     <div id="donate-button-container">
    17 <div id="donate-button"></div>
    18 <script src="https://www.paypalobjects.com/donate/sdk/donate-sdk.js" charset="UTF-8"></script>
    19 <script>
    20 PayPal.Donation.Button({
    21 env:'production',
    22 hosted_button_id:'5UVXZVN5HDKBS',
    23 image: {
    24 src:'https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif',
    25 alt:'Donate with PayPal button',
    26 title:'PayPal - The safer, easier way to pay online!',
    27 }
    28 }).render('#donate-button');
    29 </script>
    30 </div>
     16
    3117    <?php
    3218    printf( /* translators: %1$s Review (linked to https://wordpress.org/support/plugin/xml-sitemap-feed/reviews/?filter=5#new-post) and %2$s Translating (linked to https://translate.wordpress.org/projects/wp-plugins/xml-sitemap-feed) */
  • xml-sitemap-feed/trunk/views/feed-sitemap-news.php

    r3375648 r3378863  
    99
    1010$options = get_option( 'xmlsf_news_tags' );
    11 
    12 if ( XMLSF_GOOGLE_NEWS_NAME ) {
    13     $options['name'] = XMLSF_GOOGLE_NEWS_NAME;
    14 }
    1511
    1612// Do xml tag via echo or SVN parser is going to freak out.
     
    5551            // The news tags.
    5652            echo '<news:news><news:publication><news:name>';
    57             echo esc_xml( apply_filters( 'xmlsf_news_publication_name', ( ! empty( $options['name'] ) ? $options['name'] : get_bloginfo( 'name' ) ), $post->ID, $post->post_type ) );
     53            echo esc_xml( apply_filters( 'xmlsf_news_publication_name', ( defined( 'XMLSF_GOOGLE_NEWS_NAME' ) && XMLSF_GOOGLE_NEWS_NAME ? XMLSF_GOOGLE_NEWS_NAME : get_bloginfo( 'name' ) ), $post->ID, $post->post_type ) );
    5854            echo '</news:name>';
    5955            echo '<news:language>' . esc_xml( apply_filters( 'xmlsf_news_language', get_bloginfo( 'language' ), $post->ID, $post->post_type ) ) . '</news:language>';
  • xml-sitemap-feed/trunk/xml-sitemap.php

    r3375648 r3378863  
    44 * Plugin URI: https://status301.net/wordpress-plugins/xml-sitemap-feed/
    55 * Description: Feed the hungry spiders in compliance with the XML Sitemap and Google News protocols.
    6  * Version: 5.5.8-RC1
     6 * Version: 5.5.8
    77 * Text Domain: xml-sitemap-feed
    88 * Requires at least: 4.4
     
    4646
    4747defined( 'WPINC' ) || die;
    48 defined( 'XMLSF_GOOGLE_NEWS_NAME' ) || define( 'XMLSF_GOOGLE_NEWS_NAME', false );
    4948
    50 define( 'XMLSF_VERSION', '5.5.7' );
     49define( 'XMLSF_VERSION', '5.5.8' );
    5150define( 'XMLSF_ADV_MIN_VERSION', '0.1' );
    52 define( 'XMLSF_NEWS_ADV_MIN_VERSION', '1.3.5' );
     51define( 'XMLSF_NEWS_ADV_MIN_VERSION', '1.3.6' );
    5352define( 'XMLSF_DIR', __DIR__ );
    5453define( 'XMLSF_BASENAME', plugin_basename( __FILE__ ) );
     
    6564// Fire it up at plugins_loaded.
    6665add_action( 'plugins_loaded', 'xmlsf', 9 );
    67 add_filter( 'robots_txt', '\XMLSF\robots_txt', 11 );
    68 add_action( 'xmlsf_sitemap_loaded', '\XMLSF\sitemap_loaded' );
    69 add_action( 'xmlsf_news_sitemap_loaded', '\XMLSF\sitemap_loaded' );
     66add_filter( 'robots_txt', 'XMLSF\robots_txt', 11 );
     67add_action( 'xmlsf_sitemap_loaded', 'XMLSF\sitemap_loaded' );
     68add_action( 'xmlsf_news_sitemap_loaded', 'XMLSF\sitemap_loaded' );
    7069
    7170// Admin.
    72 add_action( 'admin_menu', array( '\XMLSF\Admin\Main', 'add_options_pages' ) );
    73 add_action( 'admin_init', array( '\XMLSF\Admin\Main', 'register_settings' ), 7 );
    74 add_action( 'admin_init', array( '\XMLSF\Admin\Main', 'init' ), 9 );
    75 add_action( 'admin_init', array( '\XMLSF\Admin\Main', 'compat' ) );
     71add_action( 'admin_menu', array( 'XMLSF\Admin\Main', 'add_options_pages' ) );
     72add_action( 'admin_init', array( 'XMLSF\Admin\Main', 'register_settings' ), 7 );
     73add_action( 'admin_init', array( 'XMLSF\Admin\Main', 'init' ), 9 );
     74add_action( 'admin_init', array( 'XMLSF\Admin\Main', 'compat' ) );
    7675
    77 register_deactivation_hook( __FILE__, array( '\XMLSF\Admin\Main', 'deactivate' ) );
    78 register_activation_hook( __FILE__, array( '\XMLSF\Admin\Main', 'activate' ) );
     76register_deactivation_hook( __FILE__, array( 'XMLSF\Admin\Main', 'deactivate' ) );
     77register_activation_hook( __FILE__, array( 'XMLSF\Admin\Main', 'activate' ) );
    7978
    8079/**
Note: See TracChangeset for help on using the changeset viewer.