Changeset 3378863
- Timestamp:
- 10/15/2025 11:53:29 AM (2 months ago)
- Location:
- xml-sitemap-feed
- Files:
-
- 111 added
- 13 edited
-
tags/5.5.8 (added)
-
tags/5.5.8/LICENSE (added)
-
tags/5.5.8/assets (added)
-
tags/5.5.8/assets/admin.css (added)
-
tags/5.5.8/assets/donate.png (added)
-
tags/5.5.8/assets/sitemap-author.xsl (added)
-
tags/5.5.8/assets/sitemap-custom.xsl (added)
-
tags/5.5.8/assets/sitemap-news.xsl (added)
-
tags/5.5.8/assets/sitemap-posttype.xsl (added)
-
tags/5.5.8/assets/sitemap-taxonomy.xsl (added)
-
tags/5.5.8/assets/sitemap.xsl (added)
-
tags/5.5.8/assets/sitemapxml.gif (added)
-
tags/5.5.8/inc (added)
-
tags/5.5.8/inc/admin (added)
-
tags/5.5.8/inc/admin/class-fields.php (added)
-
tags/5.5.8/inc/admin/class-main.php (added)
-
tags/5.5.8/inc/admin/class-sanitize.php (added)
-
tags/5.5.8/inc/admin/class-sitemap-news.php (added)
-
tags/5.5.8/inc/admin/class-sitemap.php (added)
-
tags/5.5.8/inc/class-sitemap-core.php (added)
-
tags/5.5.8/inc/class-sitemap-news.php (added)
-
tags/5.5.8/inc/class-sitemap-plugin.php (added)
-
tags/5.5.8/inc/class-sitemap.php (added)
-
tags/5.5.8/inc/class-sitemaps-provider-custom.php (added)
-
tags/5.5.8/inc/class-sitemaps-provider-external.php (added)
-
tags/5.5.8/inc/class-sitemaps-provider-news.php (added)
-
tags/5.5.8/inc/class-xmlsitemapfeed.php (added)
-
tags/5.5.8/inc/compat (added)
-
tags/5.5.8/inc/compat/class-aioseo.php (added)
-
tags/5.5.8/inc/compat/class-bbpress.php (added)
-
tags/5.5.8/inc/compat/class-catch-box-pro.php (added)
-
tags/5.5.8/inc/compat/class-gs-generator.php (added)
-
tags/5.5.8/inc/compat/class-jetpack.php (added)
-
tags/5.5.8/inc/compat/class-polylang.php (added)
-
tags/5.5.8/inc/compat/class-rank-math.php (added)
-
tags/5.5.8/inc/compat/class-seo-framework.php (added)
-
tags/5.5.8/inc/compat/class-seopress.php (added)
-
tags/5.5.8/inc/compat/class-slim-seo.php (added)
-
tags/5.5.8/inc/compat/class-squirrly-seo.php (added)
-
tags/5.5.8/inc/compat/class-wp-seo.php (added)
-
tags/5.5.8/inc/compat/class-wpml.php (added)
-
tags/5.5.8/inc/compat/class-xmlsm.php (added)
-
tags/5.5.8/inc/functions-debugging.php (added)
-
tags/5.5.8/inc/functions-pluggable.php (added)
-
tags/5.5.8/inc/functions.php (added)
-
tags/5.5.8/inc/translations.php (added)
-
tags/5.5.8/readme.txt (added)
-
tags/5.5.8/uninstall.php (added)
-
tags/5.5.8/upgrade.php (added)
-
tags/5.5.8/views (added)
-
tags/5.5.8/views/admin (added)
-
tags/5.5.8/views/admin/field-bulk-edit.php (added)
-
tags/5.5.8/views/admin/field-meta-box-news.php (added)
-
tags/5.5.8/views/admin/field-meta-box.php (added)
-
tags/5.5.8/views/admin/field-news-categories.php (added)
-
tags/5.5.8/views/admin/field-news-hierarchical.php (added)
-
tags/5.5.8/views/admin/field-news-keywords.php (added)
-
tags/5.5.8/views/admin/field-news-labels.php (added)
-
tags/5.5.8/views/admin/field-news-name.php (added)
-
tags/5.5.8/views/admin/field-news-post-type.php (added)
-
tags/5.5.8/views/admin/field-news-stocktickers.php (added)
-
tags/5.5.8/views/admin/field-quick-edit.php (added)
-
tags/5.5.8/views/admin/field-robots.php (added)
-
tags/5.5.8/views/admin/field-sitemap-author-settings.php (added)
-
tags/5.5.8/views/admin/field-sitemap-authors.php (added)
-
tags/5.5.8/views/admin/field-sitemap-custom.php (added)
-
tags/5.5.8/views/admin/field-sitemap-disable.php (added)
-
tags/5.5.8/views/admin/field-sitemap-post-type-settings.php (added)
-
tags/5.5.8/views/admin/field-sitemap-post-types-limit.php (added)
-
tags/5.5.8/views/admin/field-sitemap-post-types.php (added)
-
tags/5.5.8/views/admin/field-sitemap-server.php (added)
-
tags/5.5.8/views/admin/field-sitemap-slug.php (added)
-
tags/5.5.8/views/admin/field-sitemap-taxonomies.php (added)
-
tags/5.5.8/views/admin/field-sitemap-taxonomy-settings.php (added)
-
tags/5.5.8/views/admin/field-sitemap-urls.php (added)
-
tags/5.5.8/views/admin/field-sitemaps.php (added)
-
tags/5.5.8/views/admin/help-tab-advanced.php (added)
-
tags/5.5.8/views/admin/help-tab-authors.php (added)
-
tags/5.5.8/views/admin/help-tab-news-categories.php (added)
-
tags/5.5.8/views/admin/help-tab-news-hierarchical.php (added)
-
tags/5.5.8/views/admin/help-tab-news-keywords.php (added)
-
tags/5.5.8/views/admin/help-tab-news-name.php (added)
-
tags/5.5.8/views/admin/help-tab-news-post-types.php (added)
-
tags/5.5.8/views/admin/help-tab-news-sidebar.php (added)
-
tags/5.5.8/views/admin/help-tab-news-stocktickers.php (added)
-
tags/5.5.8/views/admin/help-tab-news.php (added)
-
tags/5.5.8/views/admin/help-tab-post-types-general.php (added)
-
tags/5.5.8/views/admin/help-tab-post-types.php (added)
-
tags/5.5.8/views/admin/help-tab-robots.php (added)
-
tags/5.5.8/views/admin/help-tab-sidebar.php (added)
-
tags/5.5.8/views/admin/help-tab-sitemaps.php (added)
-
tags/5.5.8/views/admin/help-tab-support.php (added)
-
tags/5.5.8/views/admin/help-tab-taxonomies.php (added)
-
tags/5.5.8/views/admin/notice-xmlsf-advanced-news.php (added)
-
tags/5.5.8/views/admin/notice-xmlsf-advanced.php (added)
-
tags/5.5.8/views/admin/page-sitemap-news.php (added)
-
tags/5.5.8/views/admin/page-sitemap.php (added)
-
tags/5.5.8/views/admin/section-advanced-compat-message.php (added)
-
tags/5.5.8/views/admin/section-advanced-intro.php (added)
-
tags/5.5.8/views/admin/section-advanced-news-compat-message.php (added)
-
tags/5.5.8/views/admin/sidebar-contribute.php (added)
-
tags/5.5.8/views/admin/sidebar-help.php (added)
-
tags/5.5.8/views/admin/sidebar-links.php (added)
-
tags/5.5.8/views/admin/sidebar-news-links.php (added)
-
tags/5.5.8/views/feed-sitemap-author.php (added)
-
tags/5.5.8/views/feed-sitemap-custom.php (added)
-
tags/5.5.8/views/feed-sitemap-news.php (added)
-
tags/5.5.8/views/feed-sitemap-posttype.php (added)
-
tags/5.5.8/views/feed-sitemap-taxonomy.php (added)
-
tags/5.5.8/views/feed-sitemap.php (added)
-
tags/5.5.8/xml-sitemap.php (added)
-
trunk/inc/admin/class-sitemap-news.php (modified) (7 diffs)
-
trunk/inc/admin/class-sitemap.php (modified) (7 diffs)
-
trunk/inc/compat/class-squirrly-seo.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/views/admin/field-news-categories.php (modified) (1 diff)
-
trunk/views/admin/field-news-name.php (modified) (1 diff)
-
trunk/views/admin/field-news-post-type.php (modified) (1 diff)
-
trunk/views/admin/page-sitemap-news.php (modified) (1 diff)
-
trunk/views/admin/section-advanced-compat-message.php (modified) (2 diffs)
-
trunk/views/admin/section-advanced-news-compat-message.php (modified) (2 diffs)
-
trunk/views/admin/sidebar-contribute.php (modified) (1 diff)
-
trunk/views/feed-sitemap-news.php (modified) (2 diffs)
-
trunk/xml-sitemap.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
xml-sitemap-feed/trunk/inc/admin/class-sitemap-news.php
r3334262 r3378863 229 229 \do_action( 'xmlsf_news_add_settings', $active_tab ); 230 230 231 // prepare sitemap link url.232 $sitemap_url = \xmlsf()->sitemap_news->get_sitemap_url();233 234 231 // Sidebar actions. 235 232 \add_action( … … 308 305 'xmlsf_news_name', 309 306 '<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 }, 311 310 'xmlsf_news_general', 312 311 'news_sitemap_general_section' … … 315 314 'xmlsf_news_post_type', 316 315 __( '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 }, 318 319 'xmlsf_news_general', 319 320 'news_sitemap_general_section' … … 331 332 'xmlsf_news_categories', 332 333 \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 }, 334 337 'xmlsf_news_general', 335 338 'news_sitemap_general_section' … … 359 362 'xmlsf_news_general', 360 363 'xmlsf_news_tags', 361 array( __CLASS__, 'sanitize_news_tags')364 array( 'sanitize_callback' => array( __CLASS__, 'sanitize_news_tags' ) ) 362 365 ); 363 366 … … 490 493 491 494 /** 492 * News source name field493 */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 field508 */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 field545 */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 /**585 495 * Sanitize news tag settings 586 496 * … … 595 505 if ( empty( $sanitized['post_type'] ) || ! \is_array( $sanitized['post_type'] ) ) { 596 506 $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 ); 597 514 } 598 515 -
xml-sitemap-feed/trunk/inc/admin/class-sitemap.php
r3334262 r3378863 638 638 'xmlsf_general', 639 639 'xmlsf_server', 640 array( __NAMESPACE__ . '\Sanitize', 'server')640 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'server' ) ) 641 641 ); 642 642 \register_setting( 643 643 'xmlsf_general', 644 644 'xmlsf_disabled_providers', 645 array( __NAMESPACE__ . '\Sanitize', 'disabled_providers')645 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'disabled_providers' ) ) 646 646 ); 647 647 // post_types. … … 649 649 'xmlsf_post_types', 650 650 'xmlsf_post_types', 651 array( __NAMESPACE__ . '\Sanitize', 'post_types')651 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'post_types' ) ) 652 652 ); 653 653 // post_type settings. … … 655 655 'xmlsf_post_types', 656 656 'xmlsf_post_type_settings', 657 array( __NAMESPACE__ . '\Sanitize', 'post_type_settings')657 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'post_type_settings' ) ) 658 658 ); 659 659 // taxonomies. … … 661 661 'xmlsf_taxonomies', 662 662 'xmlsf_taxonomy_settings', 663 array( __NAMESPACE__ . '\Sanitize', 'taxonomy_settings')663 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'taxonomy_settings' ) ) 664 664 ); 665 665 \register_setting( 666 666 'xmlsf_taxonomies', 667 667 'xmlsf_taxonomies', 668 array( __NAMESPACE__ . '\Sanitize', 'taxonomies')668 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'taxonomies' ) ) 669 669 ); 670 670 // authors. … … 672 672 'xmlsf_authors', 673 673 'xmlsf_author_settings', 674 array( __NAMESPACE__ . '\Sanitize', 'author_settings')674 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'author_settings' ) ) 675 675 ); 676 676 \register_setting( 677 677 'xmlsf_authors', 678 678 'xmlsf_authors', 679 array( __NAMESPACE__ . '\Sanitize', 'authors')679 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'authors' ) ) 680 680 ); 681 681 // custom urls. … … 683 683 'xmlsf_advanced', 684 684 'xmlsf_urls', 685 array( __NAMESPACE__ . '\Sanitize', 'custom_urls_settings')685 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'custom_urls_settings' ) ) 686 686 ); 687 687 // custom sitemaps. … … 689 689 'xmlsf_advanced', 690 690 'xmlsf_custom_sitemaps', 691 array( __NAMESPACE__ . '\Sanitize', 'custom_sitemaps_settings')691 array( 'sanitize_callback' => array( __NAMESPACE__ . '\Sanitize', 'custom_sitemaps_settings' ) ) 692 692 ); 693 693 -
xml-sitemap-feed/trunk/inc/compat/class-squirrly-seo.php
r3334262 r3378863 16 16 */ 17 17 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' ) ) { 19 19 return; 20 20 } … … 26 26 // sitemap module on. 27 27 ?> 28 <div class="notice notice- warningfade is-dismissible">28 <div class="notice notice-error fade is-dismissible"> 29 29 <p> 30 < ?php30 <strong><?php 31 31 printf( /* translators: Conflicting Plugn name, Plugin name */ 32 32 \esc_html__( 'The %1$s XML Sitemap is not compatible with %2$s.', 'xml-sitemap-feed' ), … … 34 34 \esc_html__( 'XML Sitemap & Google News', 'xml-sitemap-feed' ) 35 35 ); 36 ?> 36 ?></strong> 37 37 <?php 38 38 printf( /* translators: Sitemap page name (linked to Squirrly SEO plugin settings), XML Sitemap Index, Reading Settings admin page (linked to Reading settings) */ 39 39 \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__( ' MiscellaneousFeatures', 'squirrly-seo' ) . '</a>',40 '<a href="' . \esc_url( \admin_url( 'admin.php' ) ) . '?page=sq_features">' . \esc_html__( 'All Features', 'squirrly-seo' ) . '</a>', 41 41 \esc_html__( 'XML Sitemap Index', 'xml-sitemap-feed' ), 42 42 '<a href="' . \esc_url( \admin_url( 'options-reading.php' ) ) . '#xmlsf_sitemaps">' . \esc_html( \translate( 'Reading Settings' ) ) . '</a>' … … 44 44 ?> 45 45 </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>53 46 </div> 54 47 <?php … … 60 53 */ 61 54 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 ) ) { 63 56 return; 64 57 } … … 66 59 $squirrly = \json_decode( \get_option( 'sq_options', '' ) ); 67 60 68 // check aioseopsitemap 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. 71 64 ?> 72 <div class="notice notice- warningfade is-dismissible">65 <div class="notice notice-error fade is-dismissible"> 73 66 <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 ?> 75 82 </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'; ?>82 83 </div> 83 84 <?php -
xml-sitemap-feed/trunk/readme.txt
r3375648 r3378863 142 142 == Upgrade Notice == 143 143 144 = 5.5. 7=145 Fix WPML Compatibility missing valid callback.144 = 5.5.8 = 145 Drop unused news tags and bugfixes. 146 146 147 147 == Changelog == 148 149 = 5.5.8 = 150 Date: 20251014 151 * Drop unused news tags & stylesheet columns 152 * FIX: failing sanitize callbacks 153 * FIX: Squirrly SEO incompatibility warnings 148 154 149 155 = 5.5.7 = -
xml-sitemap-feed/trunk/views/admin/field-news-categories.php
r3334262 r3378863 6 6 */ 7 7 8 $options = (array) get_option( 'xmlsf_news_tags', array() ); 9 $selected_categories = isset( $options['categories'] ) && is_array( $options['categories'] ) ? $options['categories'] : array(); 10 11 if ( 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 21 global $sitepress; 22 if ( $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 ); 8 40 ?> 9 41 <fieldset> -
xml-sitemap-feed/trunk/views/admin/field-news-name.php
r3334262 r3378863 6 6 */ 7 7 8 $options = (array) get_option( 'xmlsf_news_tags', array() ); 9 $name = ! empty( $options['name'] ) ? $options['name'] : ''; 10 11 if ( defined( 'XMLSF_GOOGLE_NEWS_NAME' ) && XMLSF_GOOGLE_NEWS_NAME ) { 12 $name = XMLSF_GOOGLE_NEWS_NAME; 13 $disabled = true; 14 } else { 15 $disabled = false; 16 } 8 17 ?> 9 18 <fieldset> 10 19 <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 ); ?>> 12 21 <p class="description"> 13 22 <?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>' ); ?> 14 23 <?php 15 if ( XMLSF_GOOGLE_NEWS_NAME ) {24 if ( defined( 'XMLSF_GOOGLE_NEWS_NAME' ) && XMLSF_GOOGLE_NEWS_NAME ) { 16 25 echo '<em>'; 17 26 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 5 5 * @package XML Sitemap & Google News 6 6 */ 7 8 global $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 25 if ( ! 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; 7 36 8 37 ?> -
xml-sitemap-feed/trunk/views/admin/page-sitemap-news.php
r3334262 r3378863 55 55 /* translators: Sitemap name with URL */ 56 56 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>' 58 58 ); 59 59 ?> -
xml-sitemap-feed/trunk/views/admin/section-advanced-compat-message.php
r3334262 r3378863 12 12 if ( current_user_can( 'update_plugins' ) ) { 13 13 ?> 14 <a href="https://premium.status301.com/account/ " target="_blank">14 <a href="https://premium.status301.com/account/downloads/" target="_blank"> 15 15 <?php esc_html_e( 'Please download and install the latest version.', 'xml-sitemap-feed' ); ?> 16 16 </a> … … 18 18 } else { 19 19 ?> 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' ); ?> 23 21 <?php 24 22 } -
xml-sitemap-feed/trunk/views/admin/section-advanced-news-compat-message.php
r3334262 r3378863 12 12 if ( current_user_can( 'update_plugins' ) ) { 13 13 ?> 14 <a href="https://premium.status301.com/account/ " target="_blank">14 <a href="https://premium.status301.com/account/downloads/" target="_blank"> 15 15 <?php esc_html_e( 'Please download and install the latest version.', 'xml-sitemap-feed' ); ?> 16 16 </a> … … 18 18 } else { 19 19 ?> 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' ); ?> 23 21 <?php 24 22 } -
xml-sitemap-feed/trunk/views/admin/sidebar-contribute.php
r3375648 r3378863 9 9 <h3><span class="dashicons dashicons-thumbs-up"></span> <?php esc_html_e( 'Contribute', 'xml-sitemap-feed' ); ?></h3> 10 10 <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;" 12 12 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> 15 15 </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 31 17 <?php 32 18 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 9 9 10 10 $options = get_option( 'xmlsf_news_tags' ); 11 12 if ( XMLSF_GOOGLE_NEWS_NAME ) {13 $options['name'] = XMLSF_GOOGLE_NEWS_NAME;14 }15 11 16 12 // Do xml tag via echo or SVN parser is going to freak out. … … 55 51 // The news tags. 56 52 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 ) ); 58 54 echo '</news:name>'; 59 55 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 4 4 * Plugin URI: https://status301.net/wordpress-plugins/xml-sitemap-feed/ 5 5 * Description: Feed the hungry spiders in compliance with the XML Sitemap and Google News protocols. 6 * Version: 5.5.8 -RC16 * Version: 5.5.8 7 7 * Text Domain: xml-sitemap-feed 8 8 * Requires at least: 4.4 … … 46 46 47 47 defined( 'WPINC' ) || die; 48 defined( 'XMLSF_GOOGLE_NEWS_NAME' ) || define( 'XMLSF_GOOGLE_NEWS_NAME', false );49 48 50 define( 'XMLSF_VERSION', '5.5. 7' );49 define( 'XMLSF_VERSION', '5.5.8' ); 51 50 define( 'XMLSF_ADV_MIN_VERSION', '0.1' ); 52 define( 'XMLSF_NEWS_ADV_MIN_VERSION', '1.3. 5' );51 define( 'XMLSF_NEWS_ADV_MIN_VERSION', '1.3.6' ); 53 52 define( 'XMLSF_DIR', __DIR__ ); 54 53 define( 'XMLSF_BASENAME', plugin_basename( __FILE__ ) ); … … 65 64 // Fire it up at plugins_loaded. 66 65 add_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' );66 add_filter( 'robots_txt', 'XMLSF\robots_txt', 11 ); 67 add_action( 'xmlsf_sitemap_loaded', 'XMLSF\sitemap_loaded' ); 68 add_action( 'xmlsf_news_sitemap_loaded', 'XMLSF\sitemap_loaded' ); 70 69 71 70 // 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' ) );71 add_action( 'admin_menu', array( 'XMLSF\Admin\Main', 'add_options_pages' ) ); 72 add_action( 'admin_init', array( 'XMLSF\Admin\Main', 'register_settings' ), 7 ); 73 add_action( 'admin_init', array( 'XMLSF\Admin\Main', 'init' ), 9 ); 74 add_action( 'admin_init', array( 'XMLSF\Admin\Main', 'compat' ) ); 76 75 77 register_deactivation_hook( __FILE__, array( ' \XMLSF\Admin\Main', 'deactivate' ) );78 register_activation_hook( __FILE__, array( ' \XMLSF\Admin\Main', 'activate' ) );76 register_deactivation_hook( __FILE__, array( 'XMLSF\Admin\Main', 'deactivate' ) ); 77 register_activation_hook( __FILE__, array( 'XMLSF\Admin\Main', 'activate' ) ); 79 78 80 79 /**
Note: See TracChangeset
for help on using the changeset viewer.