field-bulk-edit.php
9 months ago
field-meta-box-news.php
9 months ago
field-meta-box.php
7 months ago
field-news-categories.php
9 months ago
field-news-hierarchical.php
7 months ago
field-news-keywords.php
7 months ago
field-news-name.php
10 months ago
field-news-notifier.php
7 months ago
field-news-post-type.php
9 months ago
field-news-stocktickers.php
7 months ago
field-quick-edit.php
1 year ago
field-robots.php
1 year ago
field-sitemap-author-settings.php
7 months ago
field-sitemap-authors.php
9 months ago
field-sitemap-custom.php
1 year ago
field-sitemap-disable.php
1 year ago
field-sitemap-notifier.php
3 months ago
field-sitemap-post-type-settings.php
3 months ago
field-sitemap-post-types-limit.php
1 year ago
field-sitemap-post-types.php
9 months ago
field-sitemap-server.php
7 months ago
field-sitemap-slug.php
9 months ago
field-sitemap-taxonomies.php
9 months ago
field-sitemap-taxonomy-settings.php
7 months ago
field-sitemap-urls.php
1 year ago
field-sitemaps.php
1 year ago
help-tab-advanced.php
7 months ago
help-tab-authors.php
7 months ago
help-tab-news-categories.php
1 year ago
help-tab-news-hierarchical.php
9 months ago
help-tab-news-keywords.php
1 year ago
help-tab-news-name.php
1 year ago
help-tab-news-notifier.php
7 months ago
help-tab-news-post-types.php
1 year ago
help-tab-news-sidebar.php
1 year ago
help-tab-news-stocktickers.php
1 year ago
help-tab-news.php
1 year ago
help-tab-post-types-general.php
1 year ago
help-tab-post-types.php
7 months ago
help-tab-robots.php
1 year ago
help-tab-sidebar.php
1 year ago
help-tab-sitemaps.php
1 year ago
help-tab-support.php
7 months ago
help-tab-taxonomies.php
7 months ago
notice-xmlsf-advanced-news.php
1 year ago
notice-xmlsf-advanced.php
1 year ago
page-sitemap-news.php
7 months ago
page-sitemap.php
9 months ago
section-advanced-compat-message.php
10 months ago
section-advanced-intro.php
1 year ago
section-advanced-news-compat-message.php
10 months ago
section-bwt-data.php
3 months ago
section-bwt-oauth-intro.php
7 months ago
section-bwt-oauth-stage-1.php
7 months ago
section-bwt-oauth-stage-2.php
7 months ago
section-gsc-data-news.php
4 months ago
section-gsc-data.php
3 months ago
section-gsc-oauth-intro.php
7 months ago
section-gsc-oauth-stage-1-2.php
3 months ago
section-gsc-oauth-stage-3.php
7 months ago
section-ping-log.php
4 months ago
sidebar-advanced-plug.php
3 months ago
sidebar-bwt-connect.php
7 months ago
sidebar-contribute.php
10 months ago
sidebar-gsc-connect.php
7 months ago
sidebar-help.php
7 months ago
sidebar-links.php
7 months ago
sidebar-news-advanced-plug.php
7 months ago
sidebar-news-links.php
7 months ago
sidebar-news-tools.php
9 months ago
sidebar-priority-support.php
9 months ago
sidebar-tools.php
9 months ago
field-news-categories.php
53 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Categories fields |
| 4 | * |
| 5 | * @package XML Sitemap & Google News |
| 6 | */ |
| 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 | ); |
| 40 | ?> |
| 41 | <fieldset> |
| 42 | <legend class="screen-reader-text"> |
| 43 | <?php esc_html_e( 'Categories' ); ?> |
| 44 | </legend> |
| 45 | <p> |
| 46 | <?php esc_html_e( 'Include posts from these categories, or select none to automaticly include posts from all categories:', 'xml-sitemap-feed' ); ?> |
| 47 | </p> |
| 48 | <style>ul.cat-checklist{height:auto;max-height:24em}ul.children{padding-left:1em}</style> |
| 49 | <ul class="cat-checklist"> |
| 50 | <?php echo $cat_list; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> |
| 51 | </ul> |
| 52 | </fieldset> |
| 53 |