Commit realizado el 12:13:52 08-04-2024
This commit is contained in:
@@ -0,0 +1,170 @@
|
||||
<?php
|
||||
/**
|
||||
* The breadcrumb settings.
|
||||
*
|
||||
* @package RankMath
|
||||
* @subpackage RankMath\Settings
|
||||
*/
|
||||
|
||||
use RankMath\Helper;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$args = [
|
||||
'id' => 'breadcrumbs',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Enable breadcrumbs function', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Turning off breadcrumbs will hide breadcrumbs inserted in template files too.', 'rank-math' ),
|
||||
'default' => 'on',
|
||||
];
|
||||
|
||||
if ( current_theme_supports( 'rank-math-breadcrumbs' ) ) {
|
||||
$args['force_enable'] = true;
|
||||
$args['disabled'] = true;
|
||||
$args['desc'] = sprintf(
|
||||
// Translators: Code to add support for Rank Math Breadcrumbs.
|
||||
esc_html__( 'This option cannot be changed since your theme has added the support for Rank Math Breadcrumbs using: %s', 'rank-math' ),
|
||||
"<br /><code>add_theme_support( 'rank-math-breadcrumbs' );</code>"
|
||||
);
|
||||
}
|
||||
$cmb->add_field( $args );
|
||||
|
||||
$dependency = [ [ 'breadcrumbs', 'on' ] ];
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_separator',
|
||||
'type' => 'radio_inline',
|
||||
'name' => esc_html__( 'Separator Character', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Separator character or string that appears between breadcrumb items.', 'rank-math' ),
|
||||
'options' => Helper::choices_separator( Helper::get_settings( 'general.breadcrumbs_separator' ) ),
|
||||
'default' => '-',
|
||||
'dep' => $dependency,
|
||||
'sanitization_cb' => [ '\RankMath\CMB2', 'sanitize_htmlentities' ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_home',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Show Homepage Link', 'rank-math' ),
|
||||
'desc' => wp_kses_post( __( 'Display homepage breadcrumb in trail.', 'rank-math' ) ),
|
||||
'default' => 'on',
|
||||
'dep' => $dependency,
|
||||
]
|
||||
);
|
||||
|
||||
$dependency_home = [ 'relation' => 'and' ] + $dependency;
|
||||
$dependency_home[] = [ 'breadcrumbs_home', 'on' ];
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_home_label',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Homepage label', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Label used for homepage link (first item) in breadcrumbs.', 'rank-math' ),
|
||||
'default' => esc_html__( 'Home', 'rank-math' ),
|
||||
'dep' => $dependency_home,
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_home_link',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Homepage Link', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Link to use for homepage (first item) in breadcrumbs.', 'rank-math' ),
|
||||
'default' => get_home_url(),
|
||||
'dep' => $dependency_home,
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_prefix',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Prefix Breadcrumb', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Prefix for the breadcrumb path.', 'rank-math' ),
|
||||
'dep' => $dependency,
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_archive_format',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Archive Format', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Format the label used for archive pages.', 'rank-math' ),
|
||||
/* translators: placeholder */
|
||||
'default' => esc_html__( 'Archives for %s', 'rank-math' ),
|
||||
'dep' => $dependency,
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_search_format',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Search Results Format', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Format the label used for search results pages.', 'rank-math' ),
|
||||
/* translators: placeholder */
|
||||
'default' => esc_html__( 'Results for %s', 'rank-math' ),
|
||||
'dep' => $dependency,
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_404_label',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( '404 label', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Label used for 404 error item in breadcrumbs.', 'rank-math' ),
|
||||
'default' => esc_html__( '404 Error: page not found', 'rank-math' ),
|
||||
'dep' => $dependency,
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_remove_post_title',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Hide Post Title', 'rank-math' ),
|
||||
'desc' => wp_kses_post( __( 'Hide Post title from Breadcrumb.', 'rank-math' ) ),
|
||||
'default' => 'off',
|
||||
'dep' => $dependency,
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_ancestor_categories',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Show Category(s)', 'rank-math' ),
|
||||
'desc' => esc_html__( 'If category is a child category, show all ancestor categories.', 'rank-math' ),
|
||||
'default' => 'off',
|
||||
'dep' => $dependency,
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_hide_taxonomy_name',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Hide Taxonomy Name', 'rank-math' ),
|
||||
'desc' => wp_kses_post( __( 'Hide Taxonomy Name from Breadcrumb.', 'rank-math' ) ),
|
||||
'default' => 'off',
|
||||
'dep' => $dependency,
|
||||
]
|
||||
);
|
||||
|
||||
if ( 'page' === get_option( 'show_on_front' ) && 0 < get_option( 'page_for_posts' ) ) {
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'breadcrumbs_blog_page',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Show Blog Page', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Show Blog Page in Breadcrumb.', 'rank-math' ),
|
||||
'default' => 'off',
|
||||
'dep' => $dependency,
|
||||
]
|
||||
);
|
||||
}
|
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* The htaccess settings.
|
||||
*
|
||||
* @package RankMath
|
||||
* @subpackage RankMath\Settings
|
||||
*/
|
||||
|
||||
use RankMath\Admin\Admin_Helper;
|
||||
use RankMath\Helper;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$data = Admin_Helper::get_htaccess_data();
|
||||
|
||||
if ( false === $data ) {
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'htaccess_not_found',
|
||||
'type' => 'notice',
|
||||
'what' => 'error',
|
||||
'content' => esc_html__( '.htaccess file not found.', 'rank-math' ),
|
||||
]
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
$attrs = [
|
||||
'value' => $data['content'],
|
||||
'readonly' => 'readonly',
|
||||
'data-gramm' => 'false',
|
||||
];
|
||||
|
||||
if ( ! $data['writable'] || ! Helper::is_edit_allowed() ) {
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'htaccess_not_writable',
|
||||
'type' => 'notice',
|
||||
'what' => 'error',
|
||||
'content' => esc_html__( '.htaccess file is not writable.', 'rank-math' ),
|
||||
]
|
||||
);
|
||||
} else {
|
||||
|
||||
$consent_checkbox = '<br><br><label><input type="checkbox" name="htaccess_accept_changes" id="htaccess_accept_changes" value="1"> <strong>' . esc_html__( 'I understand the risks and I want to edit the file', 'rank-math' ) . '</strong></label>';
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'htaccess_accept_changes',
|
||||
'type' => 'notice',
|
||||
'what' => 'error',
|
||||
'content' => wp_kses_post( __( 'Be careful when editing the htaccess file, it is easy to make mistakes and break your site. If that happens, you can restore the file to its state <strong>before the last edit</strong> by replacing the htaccess file with the backup copy created by Rank Math in the same directory (<em>.htaccess_back_xxxxxx</em>) using an FTP client.', 'rank-math' ) ) . $consent_checkbox,
|
||||
'classes' => 'rank-math-notice',
|
||||
]
|
||||
);
|
||||
}
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'htaccess_content',
|
||||
'type' => 'textarea',
|
||||
'classes' => 'rank-math-code-box',
|
||||
'save_field' => false,
|
||||
'attributes' => $attrs,
|
||||
]
|
||||
);
|
@@ -0,0 +1 @@
|
||||
<?php // Silence is golden.
|
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* The images settings.
|
||||
*
|
||||
* @package RankMath
|
||||
* @subpackage RankMath\Settings
|
||||
*/
|
||||
|
||||
use RankMath\Helper;
|
||||
use RankMath\KB;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'strip_category_base',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Strip Category Base', 'rank-math' ),
|
||||
/* translators: Link to kb article */
|
||||
'desc' => sprintf( wp_kses_post( __( 'Remove /category/ from category archive URLs. %s <br>E.g. <code>example.com/category/my-category/</code> becomes <code>example.com/my-category</code>', 'rank-math' ) ), '<a href="' . KB::get( 'remove-category-base', 'Options Panel Strip Category Base' ) . '" target="_blank">' . esc_html__( 'Why do this?', 'rank-math' ) . '</a>' ),
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
'default' => 'off',
|
||||
]
|
||||
);
|
||||
|
||||
$redirection_message = Helper::is_module_active( 'redirections' ) ?
|
||||
/* translators: Redirection page url */
|
||||
' <a href="' . Helper::get_admin_url( 'options-general#setting-panel-redirections' ) . '" target="new">' . esc_html__( 'Redirection Manager', 'rank-math' ) . '</a>' :
|
||||
'<span class="rank-math-tooltip">' . esc_html__( 'Redirections Manager', 'rank-math' ) . '<span>' . esc_html__( 'Please enable Redirections module.', 'rank-math' ) . '</span></span>';
|
||||
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'attachment_redirect_urls',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Redirect Attachments', 'rank-math' ),
|
||||
/* translators: Link to kb article */
|
||||
'desc' => sprintf( wp_kses_post( __( 'Redirect all attachment page URLs to the post they appear in. For more advanced redirection control, use the built-in %s.', 'rank-math' ) ), $redirection_message ),
|
||||
'default' => 'on',
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'attachment_redirect_default',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Redirect Orphan Attachments', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Redirect attachments without a parent post to this URL. Leave empty for no redirection.', 'rank-math' ),
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
'dep' => [ [ 'attachment_redirect_urls', 'on' ] ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'nofollow_external_links',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Nofollow External Links', 'rank-math' ),
|
||||
'desc' => wp_kses_post( __( 'Automatically add <code>rel="nofollow"</code> attribute for external links appearing in your posts, pages, and other post types. The attribute is dynamically applied when the content is displayed, and the stored content is not changed.', 'rank-math' ) ),
|
||||
'default' => 'off',
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'nofollow_image_links',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Nofollow Image File Links', 'rank-math' ),
|
||||
'desc' => wp_kses_post( __( 'Automatically add <code>rel="nofollow"</code> attribute for links pointing to external image files. The attribute is dynamically applied when the content is displayed, and the stored content is not changed.', 'rank-math' ) ),
|
||||
'default' => 'off',
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'nofollow_domains',
|
||||
'type' => 'textarea_small',
|
||||
'name' => esc_html__( 'Nofollow Domains', 'rank-math' ),
|
||||
'desc' => wp_kses_post( __( 'Only add <code>nofollow</code> attribute for the link if target domain is in this list. Add one per line. Leave empty to apply nofollow for <strong>ALL</strong> external domains.', 'rank-math' ) ),
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
'dep' => [
|
||||
[ 'nofollow_external_links', 'on' ],
|
||||
[ 'nofollow_image_links', 'on' ],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'nofollow_exclude_domains',
|
||||
'type' => 'textarea_small',
|
||||
'name' => esc_html__( 'Nofollow Exclude Domains', 'rank-math' ),
|
||||
'desc' => wp_kses_post( __( 'The <code>nofollow</code> attribute <strong>will not be added</strong> for the link if target domain is in this list. Add one per line.', 'rank-math' ) ),
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
'dep' => [
|
||||
[ 'nofollow_external_links', 'on' ],
|
||||
[ 'nofollow_image_links', 'on' ],
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'new_window_external_links',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Open External Links in New Tab/Window', 'rank-math' ),
|
||||
'desc' => wp_kses_post( __( 'Automatically add <code>target="_blank"</code> attribute for external links appearing in your posts, pages, and other post types to make them open in a new browser tab or window. The attribute is dynamically applied when the content is displayed, and the stored content is not changed.', 'rank-math' ) ),
|
||||
'default' => 'on',
|
||||
]
|
||||
);
|
@@ -0,0 +1,120 @@
|
||||
<?php
|
||||
/**
|
||||
* The misc settings.
|
||||
*
|
||||
* @package RankMath
|
||||
* @subpackage RankMath\Settings
|
||||
*/
|
||||
|
||||
use RankMath\KB;
|
||||
use RankMath\Helper;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'headless_support',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Headless CMS Support', 'rank-math' ),
|
||||
// Translators: placeholder is a link to "Read more".
|
||||
'desc' => sprintf( esc_html__( 'Enable this option to register a REST API endpoint that returns the HTML meta tags for a given URL. %s', 'rank-math' ), '<a href="' . KB::get( 'headless-support', 'Others Tab KB Link' ) . '">' . esc_html__( 'Read more', 'rank-math' ) . '</a>' ),
|
||||
'default' => 'off',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'frontend_seo_score',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Show SEO Score to Visitors', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Proudly display the calculated SEO Score as a badge on the front end. It can be disabled for specific posts in the post editor.', 'rank-math' ),
|
||||
'default' => 'off',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'frontend_seo_score_post_types',
|
||||
'type' => 'multicheck',
|
||||
'name' => esc_html__( 'SEO Score Post Types', 'rank-math' ),
|
||||
'options' => Helper::choices_post_types(),
|
||||
'default_cb' => '\\RankMath\\Frontend_SEO_Score::post_types_field_default',
|
||||
'dep' => [ [ 'frontend_seo_score', 'on' ] ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'frontend_seo_score_template',
|
||||
'type' => 'radio_inline',
|
||||
'name' => esc_html__( 'SEO Score Template', 'rank-math' ),
|
||||
'desc' => sprintf( esc_html__( 'Change the styling for the front end SEO score badge.', 'rank-math' ), '<code>nofollow</code>' ),
|
||||
'options' => [
|
||||
'circle' => esc_html__( 'Circle', 'rank-math' ),
|
||||
'square' => esc_html__( 'Square', 'rank-math' ),
|
||||
],
|
||||
'default' => 'circle',
|
||||
'dep' => [ [ 'frontend_seo_score', 'on' ] ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'frontend_seo_score_position',
|
||||
'type' => 'radio_inline',
|
||||
'name' => esc_html__( 'SEO Score Position', 'rank-math' ),
|
||||
'desc' => sprintf(
|
||||
/* translators: 1.SEO Score Shortcode 2. SEO Score function */
|
||||
esc_html__( 'Display the badges automatically, or insert the %1$s shortcode in your posts and the %2$s template tag in your theme template files.', 'rank-math' ),
|
||||
'<code>[rank_math_seo_score]</code>',
|
||||
'<code><?php rank_math_the_seo_score(); ?></code>'
|
||||
),
|
||||
'classes' => 'nob',
|
||||
'default' => 'top',
|
||||
'options' => [
|
||||
'bottom' => esc_html__( 'Below Content', 'rank-math' ),
|
||||
'top' => esc_html__( 'Above Content', 'rank-math' ),
|
||||
'both' => esc_html__( 'Above & Below Content', 'rank-math' ),
|
||||
'custom' => esc_html__( 'Custom (use shortcode)', 'rank-math' ),
|
||||
],
|
||||
'dep' => [ [ 'frontend_seo_score', 'on' ] ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'support_rank_math',
|
||||
'type' => 'toggle',
|
||||
'name' => esc_html__( 'Support Us with a Link', 'rank-math' ),
|
||||
/* Translators: %s is the word "nofollow" code tag and second one for the filter link */
|
||||
'desc' => sprintf( esc_html__( 'If you are showing the SEO scores on the front end, this option will insert a %1$s backlink to RankMath.com to show your support. You can change the link & the text by using this %2$s.', 'rank-math' ), '<code>follow</code>', '<a href="' . KB::get( 'change-seo-score-backlink', 'Options Panel Support Us' ) . '" target="_blank">' . __( 'filter', 'rank-math' ) . '</a>' ),
|
||||
'default' => 'on',
|
||||
'dep' => [ [ 'frontend_seo_score', 'on' ] ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'rss_before_content',
|
||||
'type' => 'textarea_small',
|
||||
'name' => esc_html__( 'RSS Before Content', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Add content before each post in your site feeds.', 'rank-math' ),
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'rss_after_content',
|
||||
'type' => 'textarea_small',
|
||||
'name' => esc_html__( 'RSS After Content', 'rank-math' ),
|
||||
'desc' => esc_html__( 'Add content after each post in your site feeds.', 'rank-math' ),
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'rank_math_rss_vars',
|
||||
'type' => 'raw',
|
||||
'file' => rank_math()->includes_dir() . 'settings/general/rss-vars-table.php',
|
||||
]
|
||||
);
|
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* The webmaster variable template.
|
||||
*
|
||||
* @package RankMath
|
||||
* @subpackage RankMath\Settings
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
?>
|
||||
<div class="cmb-row rank-math-rss-variables rank-math-exclude-from-search">
|
||||
|
||||
<h3><?php esc_html_e( 'Available variables', 'rank-math' ); ?> </h3>
|
||||
|
||||
<table class="wp-list-table widefat striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> <?php esc_html_e( 'Variable', 'rank-math' ); ?></th>
|
||||
<th scope="col"><?php esc_html_e( 'Description', 'rank-math' ); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>%AUTHORLINK%</td>
|
||||
<td><?php esc_html_e( 'A link to the archive for the post author, with the authors name as anchor text.', 'rank-math' ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>%POSTLINK%</td>
|
||||
<td><?php esc_html_e( 'A link to the post, with the title as anchor text.', 'rank-math' ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>%BLOGLINK%</td>
|
||||
<td><?php esc_html_e( "A link to your site, with your site's name as anchor text.", 'rank-math' ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>%BLOGDESCLINK%</td>
|
||||
<td><?php esc_html_e( "A link to your site, with your site's name and description as anchor text.", 'rank-math' ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>%FEATUREDIMAGE%</td>
|
||||
<td><?php esc_html_e( 'Featured image of the article.', 'rank-math' ); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
/**
|
||||
* The webmaster settings.
|
||||
*
|
||||
* @package RankMath
|
||||
* @subpackage RankMath\Settings
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
use RankMath\KB;
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'google_verify',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Google Search Console', 'rank-math' ),
|
||||
/* translators: Google Search Console Link */
|
||||
'desc' => sprintf( esc_html__( 'Enter your Google Search Console verification HTML code or ID. Learn how to get it: %s', 'rank-math' ), '<a href="' . KB::get( 'google-verification-kb', 'Google Verification Tool' ) . '" target="_blank">' . esc_html__( 'Search Console Verification Page', 'rank-math' ) . '</a>' ) .
|
||||
'<br><code>' . htmlspecialchars( '<meta name="google-site-verification" content="your-id" />' ) . '</code>',
|
||||
'sanitization_cb' => [ '\RankMath\CMB2', 'sanitize_webmaster_tags' ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'bing_verify',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Bing Webmaster Tools', 'rank-math' ),
|
||||
/* translators: Bing webmaster link */
|
||||
'desc' => sprintf( esc_html__( 'Enter your Bing Webmaster Tools verification HTML code or ID. Get it here: %s', 'rank-math' ), '<a href="' . KB::get( 'bing-verification-kb', 'Bing Verification Tool' ) . '" target="_blank">' . esc_html__( 'Bing Webmaster Verification Page', 'rank-math' ) . '</a>' ) .
|
||||
'<br><code>' . htmlspecialchars( '<meta name="msvalidate.01" content="your-id" />' ) . '</code>',
|
||||
'sanitization_cb' => [ '\RankMath\CMB2', 'sanitize_webmaster_tags' ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'baidu_verify',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Baidu Webmaster Tools', 'rank-math' ),
|
||||
/* translators: Baidu webmaster link */
|
||||
'desc' => sprintf( esc_html__( 'Enter your Baidu Webmaster Tools verification HTML code or ID. Learn how to get it: %s', 'rank-math' ), '<a href="' . KB::get( 'baidu-verification-kb', 'Baidu Verification Tool' ) . '" target="_blank">' . esc_html__( 'Baidu Webmaster Tools', 'rank-math' ) . '</a>' ) .
|
||||
'<br><code>' . htmlspecialchars( '<meta name="baidu-site-verification" content="your-id" />' ) . '</code>',
|
||||
'sanitization_cb' => [ '\RankMath\CMB2', 'sanitize_webmaster_tags' ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'yandex_verify',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Yandex Verification ID', 'rank-math' ),
|
||||
/* translators: Yandex webmaster link */
|
||||
'desc' => sprintf( esc_html__( 'Enter your Yandex verification HTML code or ID. Learn how to get it: %s', 'rank-math' ), '<a href="' . KB::get( 'yandex-verification-kb', 'Yandex Verification Tool' ) . '" target="_blank">' . esc_html__( 'Yandex.Webmaster Page', 'rank-math' ) . '</a>' ) .
|
||||
'<br><code>' . htmlspecialchars( '<meta name=\'yandex-verification\' content=\'your-id\' />' ) . '</code>',
|
||||
'sanitization_cb' => [ '\RankMath\CMB2', 'sanitize_webmaster_tags' ],
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'pinterest_verify',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Pinterest Verification ID', 'rank-math' ),
|
||||
/* translators: Pinterest webmaster link */
|
||||
'desc' => sprintf( esc_html__( 'Enter your Pinterest verification HTML code or ID. Learn how to get it: %s', 'rank-math' ), '<a href="' . KB::get( 'pinterest-verification-kb', 'Pinterest Verification Tool' ) . '" target="_blank">' . esc_html__( 'Pinterest Account', 'rank-math' ) . '</a>' ) .
|
||||
'<br><code>' . htmlspecialchars( '<meta name="p:domain_verify" content="your-id" />' ) . '</code>',
|
||||
'sanitization_cb' => [ '\RankMath\CMB2', 'sanitize_webmaster_tags' ],
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'norton_verify',
|
||||
'type' => 'text',
|
||||
'name' => esc_html__( 'Norton Safe Web Verification ID', 'rank-math' ),
|
||||
/* translators: Norton webmaster link */
|
||||
'desc' => sprintf( esc_html__( 'Enter your Norton Safe Web verification HTML code or ID. Learn how to get it: %s', 'rank-math' ), '<a href="' . KB::get( 'norton-verification-kb', 'Norton Verification Tool' ) . '" target="_blank">' . esc_html__( 'Norton Ownership Verification Page', 'rank-math' ) . '</a>' ) .
|
||||
'<br><code>' . htmlspecialchars( '<meta name="norton-safeweb-site-verification" content="your-id" />' ) . '</code>',
|
||||
'sanitization_cb' => [ '\RankMath\CMB2', 'sanitize_webmaster_tags' ],
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
]
|
||||
);
|
||||
|
||||
$cmb->add_field(
|
||||
[
|
||||
'id' => 'custom_webmaster_tags',
|
||||
'type' => 'textarea',
|
||||
'name' => esc_html__( 'Custom Webmaster Tags', 'rank-math' ),
|
||||
'desc' => sprintf(
|
||||
/* translators: %s: Allowed tags */
|
||||
esc_html__( 'Enter your custom webmaster tags. Only %s tags are allowed.', 'rank-math' ),
|
||||
'<code><meta></code>'
|
||||
),
|
||||
'sanitization_cb' => [ '\RankMath\CMB2', 'sanitize_custom_webmaster_tags' ],
|
||||
'classes' => 'rank-math-advanced-option',
|
||||
]
|
||||
);
|
Reference in New Issue
Block a user