This commit is contained in:
2026-03-11 15:57:27 +01:00
parent 481271c972
commit b4b460fd21
10775 changed files with 2071579 additions and 26409 deletions

View File

@@ -0,0 +1,70 @@
<?php
/**
* @var $args
*/
use GRIM_SG\Dashboard;
$settings = $args['settings'] ?? new stdClass();
?>
<div class="grim-section">
<h3 class="grim-section-title google-news-depended" data-search-id="google_content_post"><?php esc_html_e( 'Content Options', 'xml-sitemap-generator-for-google' ); ?></h3>
<div class="inside">
<p class="grim-section-desc grim-mb-20 google-news-depended"><?php esc_html_e( 'This settings will be used for generating your Google News.', 'xml-sitemap-generator-for-google' ); ?></p>
<table class="grim-table wp-list-table widefat fixed striped google-news-depended">
<thead>
<tr>
<th scope="col"><?php esc_html_e( 'Content', 'xml-sitemap-generator-for-google' ); ?></th>
<th scope="col"><?php esc_html_e( 'Include', 'xml-sitemap-generator-for-google' ); ?></th>
</tr>
</thead>
<tbody>
<?php
Dashboard::render_content_field(
'Posts',
'post_google_news',
$settings->post->google_news ?? 1,
'google-news-depended'
);
Dashboard::render_content_field(
'Pages',
'page_google_news',
$settings->page->google_news ?? 0,
'google-news-depended'
);
?>
</tbody>
</table>
</div>
</div>
<?php if ( ! empty( $args['cpt'] ) ) { ?>
<div class="grim-section <?php echo esc_attr( sgg_pro_class() ); ?>">
<?php sgg_show_pro_badge(); ?>
<h3 class="grim-section-title grim-mb-20 google-news-depended" data-search-id="google_custom_post_types"><?php esc_html_e( 'Custom Post Types', 'xml-sitemap-generator-for-google' ); ?></h3>
<div class="pro-wrapper <?php echo esc_attr( sgg_pro_class() ); ?>">
<table class="grim-table wp-list-table widefat fixed striped tags google-news-depended">
<thead>
<tr>
<th scope="col"><?php esc_html_e( 'Content', 'xml-sitemap-generator-for-google' ); ?></th>
<th scope="col"><?php esc_html_e( 'Include', 'xml-sitemap-generator-for-google' ); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ( $args['cpt'] as $cpt ) {
Dashboard::render_content_field(
$cpt->label,
"{$cpt->name}_google_news",
$settings->cpt[ $cpt->name ]->google_news ?? 0,
'google-news-depended'
);
}
?>
</tbody>
</table>
</div>
<?php sgg_show_pro_overlay(); ?>
</div>
<?php } ?>

View File

@@ -0,0 +1,93 @@
<?php
/**
* @var $args
*/
use GRIM_SG\Dashboard;
$settings = $args['settings'] ?? new stdClass();
?>
<div class="grim-section grim-google-news <?php echo esc_attr( sgg_pro_class() ); ?>">
<?php sgg_show_pro_badge(); ?>
<div class="grim-section-flex">
<h3 class="grim-section-title google-news-depended" data-search-id="google_exclude"><?php esc_html_e( 'Exclude', 'xml-sitemap-generator-for-google' ); ?></h3>
</div>
<div class="inside pro-wrapper <?php echo esc_attr( sgg_pro_class() ); ?>">
<p class="grim-section-desc grim-mb-20 google-news-depended"><?php esc_html_e( 'Please search and choose here Posts that should be excluded from Google News:', 'xml-sitemap-generator-for-google' ); ?></p>
<div class="grim-exclude-tab-nav">
<ul class="grim-exclude-tabs">
<li class="grim-exclude-tab grim-exclude-tab--active google-news-depended" data-tab="google-pages">
<?php esc_html_e( 'Posts', 'xml-sitemap-generator-for-google' ); ?>
<span class="grim-term-count">0</span>
</li>
<li class="grim-exclude-tab google-news-depended" data-tab="google-categories">
<?php esc_html_e( 'Categories and Tags', 'xml-sitemap-generator-for-google' ); ?>
<span class="grim-term-count">0</span>
</li>
</ul>
<div class="grim-exclude-tab-content">
<div id="google-pages" class="grim-exclude-tab-panel grim-exclude-tab-panel--active">
<?php
Dashboard::render(
'fields/autocomplete.php',
array(
'label' => esc_html__( 'Exclude Posts:', 'xml-sitemap-generator-for-google' ),
'name' => 'google_news_exclude',
'value' => $settings->google_news_exclude ?? '',
'class' => 'google-news-depended',
)
);
?>
</div>
<div id="google-categories" class="grim-exclude-tab-panel">
<?php
Dashboard::render(
'fields/autocomplete.php',
array(
'type' => 'taxonomy',
'label' => esc_html__( 'Exclude Categories and Tags:', 'xml-sitemap-generator-for-google' ),
'name' => 'google_news_exclude_terms',
'value' => $settings->google_news_exclude_terms ?? '',
'class' => 'google-news-depended',
)
);
?>
</div>
</div>
</div>
</div>
<?php sgg_show_pro_overlay(); ?>
</div>
<div class="grim-section grim-include <?php echo esc_attr( sgg_pro_class() ); ?>">
<?php sgg_show_pro_badge(); ?>
<div class="grim-section-flex">
<h3 class="grim-section-title google-news-depended" data-search-id="google_include"><?php esc_html_e( 'Include only selected Terms', 'xml-sitemap-generator-for-google' ); ?></h3>
<span class="grim-term-count">0</span>
</div>
<div class="inside pro-wrapper <?php echo esc_attr( sgg_pro_class() ); ?>">
<p class="grim-section-desc grim-mb-20 google-news-depended"><?php esc_html_e( 'Include only selected Categories, Tags and exclude all others:', 'xml-sitemap-generator-for-google' ); ?></p>
<div class="grim-exclude-tab-nav">
<div class="grim-exclude-tab-content">
<div id="google-others" class="grim-exclude-tab-panel grim-exclude-tab-panel--active">
<?php
Dashboard::render(
'fields/autocomplete.php',
array(
'type' => 'taxonomy',
'label' => esc_html__( 'Include only selected Categories, Tags and exclude all others:', 'xml-sitemap-generator-for-google' ),
'name' => 'google_news_include_only_terms',
'value' => $settings->google_news_include_only_terms ?? '',
'class' => 'google-news-depended',
)
);
?>
</div>
</div>
</div>
</div>
<?php sgg_show_pro_overlay(); ?>
</div>

View File

@@ -0,0 +1,90 @@
<?php
/**
* @var $args
*/
use GRIM_SG\Dashboard;
$settings = $args['settings'] ?? new stdClass();
?>
<div class="grim-section">
<p class="grim-toggle-section">
<strong>
<?php
Dashboard::render(
'fields/checkbox.php',
array(
'name' => 'enable_google_news',
'value' => $settings->enable_google_news ?? false,
'label' => esc_html__( 'Google News', 'xml-sitemap-generator-for-google' ),
'class' => 'has-dependency',
'data' => array( 'target' => 'google-news-depended' ),
)
);
?>
</strong>
</p>
<div class="inside">
<p class="grim-section-desc grim-mb-20"><?php echo wp_kses_post( 'All options will be available after enabling Google News. Note that only posts from the last 48 hours will be processed by <a href="https://news.google.com" target="_blank">Google News</a>.' ); ?></p>
<p>
<?php
Dashboard::render(
'fields/input.php',
array(
'name' => 'google_news_name',
'value' => $settings->google_news_name ?? '',
'label' => esc_html__( 'Publication Name:', 'xml-sitemap-generator-for-google' ),
'description' => sprintf(
/* translators: %s General Settings URL */
wp_kses_post( 'Default value is General Settings > <a href="%s" target="_blank">Site Title</a>.' ),
esc_url( admin_url( 'options-general.php' ) )
),
'class' => 'grim-input google-news-depended',
'placeholder' => 'Enter publication name',
)
);
?>
</p>
<div class="google-news-depended">
<div class="grim-notice notice inline sitemap-detector grim-mb-20">
<i class="grim-icon-information"></i>
<p>
<?php
echo sprintf(
/* translators: %s: URL to Google News Publisher Center */
esc_html__( 'Source Labels: %s', 'xml-sitemap-generator-for-google' ),
sprintf(
wp_kses(
/* translators: %s: URL */
'<span>' . __( 'To manage your Site Source Labels, please go to the <a href="%s" target="_blank">Google News Publisher Center</a>.', 'xml-sitemap-generator-for-google' ) . '</span>',
array(
'a' => array(
'href' => array(),
'target' => array(),
),
'span' => array(),
)
),
esc_url( 'https://publishercenter.google.com/' )
)
);
?>
</p>
</div>
</div>
<p>
<?php
Dashboard::render(
'fields/checkbox.php',
array(
'name' => 'google_news_old_posts',
'value' => $settings->google_news_old_posts ?? false,
'label' => esc_html__( 'Include Older Posts', 'xml-sitemap-generator-for-google' ),
'class' => 'grim-toggle-label google-news-depended',
)
);
?>
<br>
<small class="google-news-depended grim-section-desc grim-ml-45"><?php esc_html_e( 'Include posts older than 48 hours for informational purposes only. Note that they will NOT be indexed by Google News.', 'xml-sitemap-generator-for-google' ); ?></small>
</div>
</div>

View File

@@ -0,0 +1,41 @@
<?php
/**
* @var $args
*/
use GRIM_SG\Dashboard;
$settings = $args['settings'] ?? new stdClass();
?>
<div class="grim-section <?php echo esc_attr( sgg_pro_class() ); ?>">
<?php sgg_show_pro_badge(); ?>
<div class="grim-section-flex">
<h3 class="grim-section-title google-news-depended" data-search-id="google_keywords"><?php esc_html_e( 'Keywords', 'xml-sitemap-generator-for-google' );?></h3>
</div>
<div class="inside pro-wrapper <?php echo esc_attr( sgg_pro_class() ); ?>">
<p class="grim-section-desc grim-mb-20 google-news-depended"><?php esc_html_e( 'Please select the source from which the Google News Keywords should be extracted.', 'xml-sitemap-generator-for-google' ); ?></p>
<p>
<?php
Dashboard::render(
'fields/select.php',
array(
'label' => esc_html__( 'Keywords from:', 'xml-sitemap-generator-for-google' ),
'name' => 'google_news_keywords',
'class' => 'google-news-depended',
'select_size' => 'grim-select-wide',
'value' => $settings->google_news_keywords ?? '',
'options' => array(
'post_tag' => esc_html__( 'Tags', 'xml-sitemap-generator-for-google' ),
'category' => esc_html__( 'Categories', 'xml-sitemap-generator-for-google' ),
'sgg_keywords' => esc_html__( 'Keywords Taxonomy', 'xml-sitemap-generator-for-google' ),
),
)
);
?>
</p>
<p class="grim-section-desc grim-mt-8 google-news-depended"><?php esc_html_e( 'Custom Keywords Taxonomy will be available for Posts after enabling this option.', 'xml-sitemap-generator-for-google' ); ?></p>
</div>
<?php sgg_show_pro_overlay(); ?>
</div>

View File

@@ -0,0 +1,31 @@
<?php
/**
* @var $args
*/
use GRIM_SG\Dashboard;
$settings = $args['settings'] ?? new stdClass();
?>
<div class="grim-section grim-preview-section">
<h3 class="grim-section-title google-news-depended" data-search-id="google__url"><?php esc_html_e( 'Google News URL', 'xml-sitemap-generator-for-google' ); ?></h3>
<div class="inside">
<p class="grim-section-desc grim-mb-20 google-news-depended"><?php esc_html_e( 'Here you can preview your Google News and customize Output URL.', 'xml-sitemap-generator-for-google' ); ?></p>
<?php
Dashboard::render(
'partials/preview-urls.php',
array(
'languages_label' => esc_html__( 'Google News for other languages:', 'xml-sitemap-generator-for-google' ),
'sitemap_url' => $settings->google_news_url,
'sitemap_type' => 'google_news',
'class' => 'google-news-depended',
'input_name' => 'google_news_url',
'input_value' => $settings->google_news_url,
'input_label' => esc_html__( 'Google News URL:', 'xml-sitemap-generator-for-google' ),
'input_class' => 'google-news-depended',
'notice_show' => false,
)
);
?>
</div>
</div>

View File

@@ -0,0 +1,33 @@
<?php
/**
* @var $args
*/
use GRIM_SG\Dashboard;
$settings = $args['settings'] ?? new stdClass();
?>
<div class="grim-section <?php echo esc_attr( sgg_pro_class() ); ?>">
<?php sgg_show_pro_badge(); ?>
<p class="grim-toggle-section pro-wrapper <?php echo esc_attr( sgg_pro_class() ); ?>">
<?php
Dashboard::render(
'fields/checkbox.php',
array(
'name' => 'google_news_stocks',
'value' => $settings->google_news_stocks ?? false,
'label' => esc_html__( 'Stock Tickers', 'xml-sitemap-generator-for-google' ),
'class' => 'google-news-depended',
)
);
?>
</p>
<div class="inside pro-wrapper <?php echo esc_attr( sgg_pro_class() ); ?>">
<p class="google-news-depended">
<?php esc_html_e( 'Stock tickers are most commonly used in articles related to business.', 'xml-sitemap-generator-for-google' ); ?>
<br>
<?php esc_html_e( 'Once this option is enabled, you will be able to specify values under the custom Stock Tickers Taxonomy.', 'xml-sitemap-generator-for-google' ); ?>
</p>
</div>
<?php sgg_show_pro_overlay(); ?>
</div>