| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/redirects.php.tar |
home/xbodynamge/www/wp-content/plugins/wordpress-seo/admin/pages/redirects.php 0000644 00000000376 15112337656 0023753 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
* @since 19.0
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
require WPSEO_PATH . 'admin/views/redirects.php';
home/xbodynamge/lebauwcentre/wp-content/plugins/wordpress-seo/admin/pages/redirects.php 0000644 00000000376 15113070401 0025566 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
* @since 19.0
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
require WPSEO_PATH . 'admin/views/redirects.php';
home/xbodynamge/www/wp-content/plugins/wordpress-seo/admin/views/redirects.php 0000644 00000020600 15113270572 0023773 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
* @since 19.0
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
?>
<div class="wrap yoast wpseo-admin-page page-wpseo_redirects">
<h1 id="wpseo-title"><?php echo \esc_html( \get_admin_page_title() ); ?></h1>
<div class="wpseo_content_wrapper" style="position: relative;">
<div style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;z-index: 100; display: flex;justify-content: center;align-items: center;background: radial-gradient(#ffffffcf 20%, #ffffff00 50%);">
<a class="yoast-button-upsell" href="<?php echo \esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/4e0/' ) ); ?>" target="_blank">
<?php
echo \esc_html__( 'Unlock with Premium', 'wordpress-seo' )
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
. WPSEO_Admin_Utils::get_new_tab_message();
?>
<span aria-hidden="true" class="yoast-button-upsell__caret"></span></a>
</div>
<div class="wpseo_content_cell" id="wpseo_content_top" style="opacity: 0.5;">
<h2 class="nav-tab-wrapper" id="wpseo-tabs">
<a class="nav-tab nav-tab-active" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="" tabindex="-1">
<?php
\esc_html_e( 'Regex Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Settings', 'wordpress-seo' )
?>
</a>
</h2>
<div id="table-plain" class="tab-url redirect-table-tab">
<h2>
<?php
\esc_html_e( 'Plain redirects', 'wordpress-seo' )
?>
</h2>
<form class="wpseo-new-redirect-form" method="post">
<div class="wpseo_redirect_form">
<div class="redirect_form_row" id="row-wpseo_redirects_type">
<label class="textinput" for="wpseo_redirects_type">
<span class="title">
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
</label>
<select name="wpseo_redirects_type" id="wpseo_redirects_type" class="select select2-hidden-accessible" data-select2-id="wpseo_redirects_type" tabindex="-1" aria-hidden="true">
<option value="301" data-select2-id="2">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</option>
</select>
<span class="select2 select2-container select2-container--default" dir="ltr" data-select2-id="1" style="width: 400px;">
<span class="selection">
<span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="-1" aria-disabled="false" aria-labelledby="select2-wpseo_redirects_type-container">
<span class="select2-selection__rendered" id="select2-wpseo_redirects_type-container" role="textbox" aria-readonly="true" title="301 Moved Permanently">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</span>
<span class="select2-selection__arrow" role="presentation">
<b role="presentation"></b>
</span>
</span>
</span>
<span class="dropdown-wrapper" aria-hidden="true"></span>
</span>
</div>
<p class="label desc description wpseo-redirect-clear">
<?php
printf(
/* translators: 1: opens a link. 2: closes the link. */
esc_html__( 'The redirect type is the HTTP response code sent to the browser telling the browser what type of redirect is served. %1$sLearn more about redirect types%2$s.', 'wordpress-seo' ),
'<a href="#" target="_blank">',
'</a>'
);
?>
<div class="redirect_form_row" id="row-wpseo_redirects_origin">
<label class="textinput" for="wpseo_redirects_origin">
<span class="title">
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
</label>
<input type="text" class="textinput" name="wpseo_redirects_origin" id="wpseo_redirects_origin" value="" tabindex="-1">
</div>
<br class="clear">
<div class="redirect_form_row wpseo_redirect_target_holder" id="row-wpseo_redirects_target">
<label class="textinput" for="wpseo_redirects_target">
<span class="title">
<?php
\esc_html_e( 'URL', 'wordpress-seo' )
?>
</span>
</label>
<input type="text" class="textinput" name="wpseo_redirects_target" id="wpseo_redirects_target" value="" tabindex="-1">
</div>
<br class="clear">
<button type="button" class="button button-primary" tabindex="-1">
<?php
\esc_html_e( 'Add Redirect', 'wordpress-seo' )
?>
</button>
</div>
</form>
<p class="desc"> </p>
<form id="plain" class="wpseo-redirects-table-form" method="post" action="">
<input type="hidden" class="wpseo_redirects_ajax_nonce" name="wpseo_redirects_ajax_nonce" value="6ccb86df42">
<input type="hidden" id="_wpnonce" name="_wpnonce" value="4b02cca185">
<input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=wpseo_redirects"> <div class="tablenav top">
<div class="alignleft actions">
<select name="redirect-type" id="filter-by-redirect" tabindex="-1">
<option selected="selected" value="0">
<?php
\esc_html_e( 'All redirect types', 'wordpress-seo' )
?>
</option>
</select>
<input type="button" name="filter_action" id="post-query-submit" class="button" value="<?php \esc_attr_e( 'Filter', 'wordpress-seo' ); ?>" tabindex="-1">
</div>
<br class="clear">
</div>
<table class="wp-list-table widefat fixed striped table-view-list plain">
<thead>
<tr>
<td id="cb" class="manage-column column-cb check-column">
<input id="cb-select-all-1" type="checkbox" tabindex="-1">
</td>
<th scope="col" id="type" class="manage-column column-type column-primary sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" id="old" class="manage-column column-old sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" id="new" class="manage-column column-new sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
</tr>
</thead>
<tbody id="the-list">
<tr class="no-items">
<td class="colspanchange" colspan="4">
<?php
\esc_html_e( 'No items found.', 'wordpress-seo' )
?>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="manage-column column-cb check-column">
<input id="cb-select-all-2" type="checkbox" tabindex="-1">
</td>
<th scope="col" class="manage-column column-type column-primary sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>
</th>
<th scope="col" class="manage-column column-old sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" class="manage-column column-new sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>
</th>
</tr>
</tfoot>
</table>
</form>
</div>
<br class="clear">
</div><!-- end of div wpseo_content_top --></div><!-- end of div wpseo_content_wrapper -->
</div>
home/xbodynamge/lebauwcentre/wp-content/plugins/wordpress-seo/admin/views/redirects.php 0000644 00000020600 15113557500 0025626 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
* @since 19.0
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
?>
<div class="wrap yoast wpseo-admin-page page-wpseo_redirects">
<h1 id="wpseo-title"><?php echo \esc_html( \get_admin_page_title() ); ?></h1>
<div class="wpseo_content_wrapper" style="position: relative;">
<div style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;z-index: 100; display: flex;justify-content: center;align-items: center;background: radial-gradient(#ffffffcf 20%, #ffffff00 50%);">
<a class="yoast-button-upsell" href="<?php echo \esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/4e0/' ) ); ?>" target="_blank">
<?php
echo \esc_html__( 'Unlock with Premium', 'wordpress-seo' )
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
. WPSEO_Admin_Utils::get_new_tab_message();
?>
<span aria-hidden="true" class="yoast-button-upsell__caret"></span></a>
</div>
<div class="wpseo_content_cell" id="wpseo_content_top" style="opacity: 0.5;">
<h2 class="nav-tab-wrapper" id="wpseo-tabs">
<a class="nav-tab nav-tab-active" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="" tabindex="-1">
<?php
\esc_html_e( 'Regex Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Settings', 'wordpress-seo' )
?>
</a>
</h2>
<div id="table-plain" class="tab-url redirect-table-tab">
<h2>
<?php
\esc_html_e( 'Plain redirects', 'wordpress-seo' )
?>
</h2>
<form class="wpseo-new-redirect-form" method="post">
<div class="wpseo_redirect_form">
<div class="redirect_form_row" id="row-wpseo_redirects_type">
<label class="textinput" for="wpseo_redirects_type">
<span class="title">
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
</label>
<select name="wpseo_redirects_type" id="wpseo_redirects_type" class="select select2-hidden-accessible" data-select2-id="wpseo_redirects_type" tabindex="-1" aria-hidden="true">
<option value="301" data-select2-id="2">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</option>
</select>
<span class="select2 select2-container select2-container--default" dir="ltr" data-select2-id="1" style="width: 400px;">
<span class="selection">
<span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="-1" aria-disabled="false" aria-labelledby="select2-wpseo_redirects_type-container">
<span class="select2-selection__rendered" id="select2-wpseo_redirects_type-container" role="textbox" aria-readonly="true" title="301 Moved Permanently">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</span>
<span class="select2-selection__arrow" role="presentation">
<b role="presentation"></b>
</span>
</span>
</span>
<span class="dropdown-wrapper" aria-hidden="true"></span>
</span>
</div>
<p class="label desc description wpseo-redirect-clear">
<?php
printf(
/* translators: 1: opens a link. 2: closes the link. */
esc_html__( 'The redirect type is the HTTP response code sent to the browser telling the browser what type of redirect is served. %1$sLearn more about redirect types%2$s.', 'wordpress-seo' ),
'<a href="#" target="_blank">',
'</a>'
);
?>
<div class="redirect_form_row" id="row-wpseo_redirects_origin">
<label class="textinput" for="wpseo_redirects_origin">
<span class="title">
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
</label>
<input type="text" class="textinput" name="wpseo_redirects_origin" id="wpseo_redirects_origin" value="" tabindex="-1">
</div>
<br class="clear">
<div class="redirect_form_row wpseo_redirect_target_holder" id="row-wpseo_redirects_target">
<label class="textinput" for="wpseo_redirects_target">
<span class="title">
<?php
\esc_html_e( 'URL', 'wordpress-seo' )
?>
</span>
</label>
<input type="text" class="textinput" name="wpseo_redirects_target" id="wpseo_redirects_target" value="" tabindex="-1">
</div>
<br class="clear">
<button type="button" class="button button-primary" tabindex="-1">
<?php
\esc_html_e( 'Add Redirect', 'wordpress-seo' )
?>
</button>
</div>
</form>
<p class="desc"> </p>
<form id="plain" class="wpseo-redirects-table-form" method="post" action="">
<input type="hidden" class="wpseo_redirects_ajax_nonce" name="wpseo_redirects_ajax_nonce" value="6ccb86df42">
<input type="hidden" id="_wpnonce" name="_wpnonce" value="4b02cca185">
<input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=wpseo_redirects"> <div class="tablenav top">
<div class="alignleft actions">
<select name="redirect-type" id="filter-by-redirect" tabindex="-1">
<option selected="selected" value="0">
<?php
\esc_html_e( 'All redirect types', 'wordpress-seo' )
?>
</option>
</select>
<input type="button" name="filter_action" id="post-query-submit" class="button" value="<?php \esc_attr_e( 'Filter', 'wordpress-seo' ); ?>" tabindex="-1">
</div>
<br class="clear">
</div>
<table class="wp-list-table widefat fixed striped table-view-list plain">
<thead>
<tr>
<td id="cb" class="manage-column column-cb check-column">
<input id="cb-select-all-1" type="checkbox" tabindex="-1">
</td>
<th scope="col" id="type" class="manage-column column-type column-primary sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" id="old" class="manage-column column-old sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" id="new" class="manage-column column-new sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
</tr>
</thead>
<tbody id="the-list">
<tr class="no-items">
<td class="colspanchange" colspan="4">
<?php
\esc_html_e( 'No items found.', 'wordpress-seo' )
?>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="manage-column column-cb check-column">
<input id="cb-select-all-2" type="checkbox" tabindex="-1">
</td>
<th scope="col" class="manage-column column-type column-primary sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>
</th>
<th scope="col" class="manage-column column-old sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" class="manage-column column-new sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>
</th>
</tr>
</tfoot>
</table>
</form>
</div>
<br class="clear">
</div><!-- end of div wpseo_content_top --></div><!-- end of div wpseo_content_wrapper -->
</div>
home/xbodynamge/namtation/wp-content/plugins/wordpress-seo/admin/pages/redirects.php 0000644 00000000376 15113744441 0025114 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
* @since 19.0
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
require WPSEO_PATH . 'admin/views/redirects.php';
home/xbodynamge/namtation/wp-content/plugins/wordpress-seo/admin/views/redirects.php 0000644 00000020600 15113755313 0025142 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
* @since 19.0
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
?>
<div class="wrap yoast wpseo-admin-page page-wpseo_redirects">
<h1 id="wpseo-title"><?php echo \esc_html( \get_admin_page_title() ); ?></h1>
<div class="wpseo_content_wrapper" style="position: relative;">
<div style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;z-index: 100; display: flex;justify-content: center;align-items: center;background: radial-gradient(#ffffffcf 20%, #ffffff00 50%);">
<a class="yoast-button-upsell" href="<?php echo \esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/4e0/' ) ); ?>" target="_blank">
<?php
echo \esc_html__( 'Unlock with Premium', 'wordpress-seo' )
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
. WPSEO_Admin_Utils::get_new_tab_message();
?>
<span aria-hidden="true" class="yoast-button-upsell__caret"></span></a>
</div>
<div class="wpseo_content_cell" id="wpseo_content_top" style="opacity: 0.5;">
<h2 class="nav-tab-wrapper" id="wpseo-tabs">
<a class="nav-tab nav-tab-active" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="" tabindex="-1">
<?php
\esc_html_e( 'Regex Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Settings', 'wordpress-seo' )
?>
</a>
</h2>
<div id="table-plain" class="tab-url redirect-table-tab">
<h2>
<?php
\esc_html_e( 'Plain redirects', 'wordpress-seo' )
?>
</h2>
<form class="wpseo-new-redirect-form" method="post">
<div class="wpseo_redirect_form">
<div class="redirect_form_row" id="row-wpseo_redirects_type">
<label class="textinput" for="wpseo_redirects_type">
<span class="title">
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
</label>
<select name="wpseo_redirects_type" id="wpseo_redirects_type" class="select select2-hidden-accessible" data-select2-id="wpseo_redirects_type" tabindex="-1" aria-hidden="true">
<option value="301" data-select2-id="2">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</option>
</select>
<span class="select2 select2-container select2-container--default" dir="ltr" data-select2-id="1" style="width: 400px;">
<span class="selection">
<span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="-1" aria-disabled="false" aria-labelledby="select2-wpseo_redirects_type-container">
<span class="select2-selection__rendered" id="select2-wpseo_redirects_type-container" role="textbox" aria-readonly="true" title="301 Moved Permanently">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</span>
<span class="select2-selection__arrow" role="presentation">
<b role="presentation"></b>
</span>
</span>
</span>
<span class="dropdown-wrapper" aria-hidden="true"></span>
</span>
</div>
<p class="label desc description wpseo-redirect-clear">
<?php
printf(
/* translators: 1: opens a link. 2: closes the link. */
esc_html__( 'The redirect type is the HTTP response code sent to the browser telling the browser what type of redirect is served. %1$sLearn more about redirect types%2$s.', 'wordpress-seo' ),
'<a href="#" target="_blank">',
'</a>'
);
?>
<div class="redirect_form_row" id="row-wpseo_redirects_origin">
<label class="textinput" for="wpseo_redirects_origin">
<span class="title">
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
</label>
<input type="text" class="textinput" name="wpseo_redirects_origin" id="wpseo_redirects_origin" value="" tabindex="-1">
</div>
<br class="clear">
<div class="redirect_form_row wpseo_redirect_target_holder" id="row-wpseo_redirects_target">
<label class="textinput" for="wpseo_redirects_target">
<span class="title">
<?php
\esc_html_e( 'URL', 'wordpress-seo' )
?>
</span>
</label>
<input type="text" class="textinput" name="wpseo_redirects_target" id="wpseo_redirects_target" value="" tabindex="-1">
</div>
<br class="clear">
<button type="button" class="button button-primary" tabindex="-1">
<?php
\esc_html_e( 'Add Redirect', 'wordpress-seo' )
?>
</button>
</div>
</form>
<p class="desc"> </p>
<form id="plain" class="wpseo-redirects-table-form" method="post" action="">
<input type="hidden" class="wpseo_redirects_ajax_nonce" name="wpseo_redirects_ajax_nonce" value="6ccb86df42">
<input type="hidden" id="_wpnonce" name="_wpnonce" value="4b02cca185">
<input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=wpseo_redirects"> <div class="tablenav top">
<div class="alignleft actions">
<select name="redirect-type" id="filter-by-redirect" tabindex="-1">
<option selected="selected" value="0">
<?php
\esc_html_e( 'All redirect types', 'wordpress-seo' )
?>
</option>
</select>
<input type="button" name="filter_action" id="post-query-submit" class="button" value="<?php \esc_attr_e( 'Filter', 'wordpress-seo' ); ?>" tabindex="-1">
</div>
<br class="clear">
</div>
<table class="wp-list-table widefat fixed striped table-view-list plain">
<thead>
<tr>
<td id="cb" class="manage-column column-cb check-column">
<input id="cb-select-all-1" type="checkbox" tabindex="-1">
</td>
<th scope="col" id="type" class="manage-column column-type column-primary sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" id="old" class="manage-column column-old sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" id="new" class="manage-column column-new sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
</tr>
</thead>
<tbody id="the-list">
<tr class="no-items">
<td class="colspanchange" colspan="4">
<?php
\esc_html_e( 'No items found.', 'wordpress-seo' )
?>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="manage-column column-cb check-column">
<input id="cb-select-all-2" type="checkbox" tabindex="-1">
</td>
<th scope="col" class="manage-column column-type column-primary sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>
</th>
<th scope="col" class="manage-column column-old sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" class="manage-column column-new sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>
</th>
</tr>
</tfoot>
</table>
</form>
</div>
<br class="clear">
</div><!-- end of div wpseo_content_top --></div><!-- end of div wpseo_content_wrapper -->
</div>
xbodynamge/crosstraining/wp-content/plugins/wordpress-seo/src/integrations/front-end/redirects.php 0000644 00000015707 15114414060 0030726 0 ustar 00 home <?php
namespace Yoast\WP\SEO\Integrations\Front_End;
use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
use Yoast\WP\SEO\Helpers\Meta_Helper;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Redirect_Helper;
use Yoast\WP\SEO\Helpers\Url_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;
/**
* Class Redirects.
*/
class Redirects implements Integration_Interface {
/**
* The options helper.
*
* @var Options_Helper
*/
protected $options;
/**
* The meta helper.
*
* @var Meta_Helper
*/
protected $meta;
/**
* The current page helper.
*
* @var Current_Page_Helper
*/
protected $current_page;
/**
* The redirect helper.
*
* @var Redirect_Helper
*/
private $redirect;
/**
* The URL helper.
*
* @var Url_Helper
*/
private $url;
/**
* Holds the WP_Query variables we should get rid of.
*
* @var string[]
*/
private $date_query_variables = [
'year',
'm',
'monthnum',
'day',
'hour',
'minute',
'second',
];
/**
* Sets the helpers.
*
* @codeCoverageIgnore
*
* @param Options_Helper $options Options helper.
* @param Meta_Helper $meta Meta helper.
* @param Current_Page_Helper $current_page The current page helper.
* @param Redirect_Helper $redirect The redirect helper.
* @param Url_Helper $url The URL helper.
*/
public function __construct( Options_Helper $options, Meta_Helper $meta, Current_Page_Helper $current_page, Redirect_Helper $redirect, Url_Helper $url ) {
$this->options = $options;
$this->meta = $meta;
$this->current_page = $current_page;
$this->redirect = $redirect;
$this->url = $url;
}
/**
* Returns the conditionals based in which this loadable should be active.
*
* @return array
*/
public static function get_conditionals() {
return [ Front_End_Conditional::class ];
}
/**
* Initializes the integration.
*
* This is the place to register hooks and filters.
*
* @return void
*/
public function register_hooks() {
\add_action( 'wp', [ $this, 'archive_redirect' ] );
\add_action( 'wp', [ $this, 'page_redirect' ], 99 );
\add_action( 'wp', [ $this, 'category_redirect' ] );
\add_action( 'template_redirect', [ $this, 'attachment_redirect' ], 1 );
\add_action( 'template_redirect', [ $this, 'disable_date_queries' ] );
}
/**
* Disable date queries, if they're disabled in Yoast SEO settings, to prevent indexing the wrong things.
*
* @return void
*/
public function disable_date_queries() {
if ( $this->options->get( 'disable-date', false ) ) {
$exploded_url = \explode( '?', $this->url->recreate_current_url(), 2 );
list( $base_url, $query_string ) = \array_pad( $exploded_url, 2, '' );
\parse_str( $query_string, $query_vars );
foreach ( $this->date_query_variables as $variable ) {
if ( \in_array( $variable, \array_keys( $query_vars ), true ) ) {
$this->do_date_redirect( $query_vars, $base_url );
}
}
}
}
/**
* When certain archives are disabled, this redirects those to the homepage.
*/
public function archive_redirect() {
if ( $this->need_archive_redirect() ) {
$this->redirect->do_safe_redirect( \get_bloginfo( 'url' ), 301 );
}
}
/**
* Based on the redirect meta value, this function determines whether it should redirect the current post / page.
*/
public function page_redirect() {
if ( ! $this->current_page->is_simple_page() ) {
return;
}
$post = \get_post();
if ( ! \is_object( $post ) ) {
return;
}
$redirect = $this->meta->get_value( 'redirect', $post->ID );
if ( $redirect === '' ) {
return;
}
$this->redirect->do_safe_redirect( $redirect, 301 );
}
/**
* If the option to disable attachment URLs is checked, this performs the redirect to the attachment.
*/
public function attachment_redirect() {
if ( ! $this->current_page->is_attachment() ) {
return;
}
if ( $this->options->get( 'disable-attachment', false ) === false ) {
return;
}
$url = $this->get_attachment_url();
if ( empty( $url ) ) {
return;
}
$this->redirect->do_unsafe_redirect( $url, 301 );
}
/**
* Checks if certain archive pages are disabled to determine if a archive redirect is needed.
*
* @codeCoverageIgnore
*
* @return bool Whether or not to redirect an archive page.
*/
protected function need_archive_redirect() {
if ( $this->options->get( 'disable-date', false ) && $this->current_page->is_date_archive() ) {
return true;
}
if ( $this->options->get( 'disable-author', false ) && $this->current_page->is_author_archive() ) {
return true;
}
if ( $this->options->get( 'disable-post_format', false ) && $this->current_page->is_post_format_archive() ) {
return true;
}
return false;
}
/**
* Retrieves the attachment url for the current page.
*
* @codeCoverageIgnore It wraps WordPress functions.
*
* @return string The attachment url.
*/
protected function get_attachment_url() {
/**
* Allows the developer to change the target redirection URL for attachments.
*
* @api string $attachment_url The attachment URL for the queried object.
* @api object $queried_object The queried object.
*
* @since 7.5.3
*/
return \apply_filters(
'wpseo_attachment_redirect_url',
\wp_get_attachment_url( \get_queried_object_id() ),
\get_queried_object()
);
}
/**
* Redirects away query variables that shouldn't work.
*
* @param array $query_vars The query variables in the current URL.
* @param string $base_url The base URL without query string.
*
* @return void
*/
private function do_date_redirect( $query_vars, $base_url ) {
foreach ( $this->date_query_variables as $variable ) {
unset( $query_vars[ $variable ] );
}
$url = $base_url;
if ( \count( $query_vars ) > 0 ) {
$url .= '?' . \http_build_query( $query_vars );
}
$this->redirect->do_safe_redirect( $url, 301 );
}
/**
* Strips `cat=-1` from the URL and redirects to the resulting URL.
*/
public function category_redirect() {
/**
* Allows the developer to keep cat=-1 GET parameters
*
* @since 19.9
*
* @param bool $remove_cat_parameter Whether to remove the `cat=-1` GET parameter. Default true.
*/
$should_remove_parameter = \apply_filters( 'wpseo_remove_cat_parameter', true );
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
if ( $should_remove_parameter && isset( $_GET['cat'] ) && $_GET['cat'] === '-1' ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
unset( $_GET['cat'] );
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is just a replace and the data is never saved.
$_SERVER['REQUEST_URI'] = \remove_query_arg( 'cat' );
}
$this->redirect->do_safe_redirect( $this->url->recreate_current_url(), 301, 'Stripping cat=-1 from the URL' );
}
}
}
xbodynamge/lebauwcentre/wp-content/plugins/wordpress-seo/src/integrations/front-end/redirects.php 0000644 00000015707 15114434502 0030524 0 ustar 00 home <?php
namespace Yoast\WP\SEO\Integrations\Front_End;
use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
use Yoast\WP\SEO\Helpers\Meta_Helper;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Redirect_Helper;
use Yoast\WP\SEO\Helpers\Url_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;
/**
* Class Redirects.
*/
class Redirects implements Integration_Interface {
/**
* The options helper.
*
* @var Options_Helper
*/
protected $options;
/**
* The meta helper.
*
* @var Meta_Helper
*/
protected $meta;
/**
* The current page helper.
*
* @var Current_Page_Helper
*/
protected $current_page;
/**
* The redirect helper.
*
* @var Redirect_Helper
*/
private $redirect;
/**
* The URL helper.
*
* @var Url_Helper
*/
private $url;
/**
* Holds the WP_Query variables we should get rid of.
*
* @var string[]
*/
private $date_query_variables = [
'year',
'm',
'monthnum',
'day',
'hour',
'minute',
'second',
];
/**
* Sets the helpers.
*
* @codeCoverageIgnore
*
* @param Options_Helper $options Options helper.
* @param Meta_Helper $meta Meta helper.
* @param Current_Page_Helper $current_page The current page helper.
* @param Redirect_Helper $redirect The redirect helper.
* @param Url_Helper $url The URL helper.
*/
public function __construct( Options_Helper $options, Meta_Helper $meta, Current_Page_Helper $current_page, Redirect_Helper $redirect, Url_Helper $url ) {
$this->options = $options;
$this->meta = $meta;
$this->current_page = $current_page;
$this->redirect = $redirect;
$this->url = $url;
}
/**
* Returns the conditionals based in which this loadable should be active.
*
* @return array
*/
public static function get_conditionals() {
return [ Front_End_Conditional::class ];
}
/**
* Initializes the integration.
*
* This is the place to register hooks and filters.
*
* @return void
*/
public function register_hooks() {
\add_action( 'wp', [ $this, 'archive_redirect' ] );
\add_action( 'wp', [ $this, 'page_redirect' ], 99 );
\add_action( 'wp', [ $this, 'category_redirect' ] );
\add_action( 'template_redirect', [ $this, 'attachment_redirect' ], 1 );
\add_action( 'template_redirect', [ $this, 'disable_date_queries' ] );
}
/**
* Disable date queries, if they're disabled in Yoast SEO settings, to prevent indexing the wrong things.
*
* @return void
*/
public function disable_date_queries() {
if ( $this->options->get( 'disable-date', false ) ) {
$exploded_url = \explode( '?', $this->url->recreate_current_url(), 2 );
list( $base_url, $query_string ) = \array_pad( $exploded_url, 2, '' );
\parse_str( $query_string, $query_vars );
foreach ( $this->date_query_variables as $variable ) {
if ( \in_array( $variable, \array_keys( $query_vars ), true ) ) {
$this->do_date_redirect( $query_vars, $base_url );
}
}
}
}
/**
* When certain archives are disabled, this redirects those to the homepage.
*/
public function archive_redirect() {
if ( $this->need_archive_redirect() ) {
$this->redirect->do_safe_redirect( \get_bloginfo( 'url' ), 301 );
}
}
/**
* Based on the redirect meta value, this function determines whether it should redirect the current post / page.
*/
public function page_redirect() {
if ( ! $this->current_page->is_simple_page() ) {
return;
}
$post = \get_post();
if ( ! \is_object( $post ) ) {
return;
}
$redirect = $this->meta->get_value( 'redirect', $post->ID );
if ( $redirect === '' ) {
return;
}
$this->redirect->do_safe_redirect( $redirect, 301 );
}
/**
* If the option to disable attachment URLs is checked, this performs the redirect to the attachment.
*/
public function attachment_redirect() {
if ( ! $this->current_page->is_attachment() ) {
return;
}
if ( $this->options->get( 'disable-attachment', false ) === false ) {
return;
}
$url = $this->get_attachment_url();
if ( empty( $url ) ) {
return;
}
$this->redirect->do_unsafe_redirect( $url, 301 );
}
/**
* Checks if certain archive pages are disabled to determine if a archive redirect is needed.
*
* @codeCoverageIgnore
*
* @return bool Whether or not to redirect an archive page.
*/
protected function need_archive_redirect() {
if ( $this->options->get( 'disable-date', false ) && $this->current_page->is_date_archive() ) {
return true;
}
if ( $this->options->get( 'disable-author', false ) && $this->current_page->is_author_archive() ) {
return true;
}
if ( $this->options->get( 'disable-post_format', false ) && $this->current_page->is_post_format_archive() ) {
return true;
}
return false;
}
/**
* Retrieves the attachment url for the current page.
*
* @codeCoverageIgnore It wraps WordPress functions.
*
* @return string The attachment url.
*/
protected function get_attachment_url() {
/**
* Allows the developer to change the target redirection URL for attachments.
*
* @api string $attachment_url The attachment URL for the queried object.
* @api object $queried_object The queried object.
*
* @since 7.5.3
*/
return \apply_filters(
'wpseo_attachment_redirect_url',
\wp_get_attachment_url( \get_queried_object_id() ),
\get_queried_object()
);
}
/**
* Redirects away query variables that shouldn't work.
*
* @param array $query_vars The query variables in the current URL.
* @param string $base_url The base URL without query string.
*
* @return void
*/
private function do_date_redirect( $query_vars, $base_url ) {
foreach ( $this->date_query_variables as $variable ) {
unset( $query_vars[ $variable ] );
}
$url = $base_url;
if ( \count( $query_vars ) > 0 ) {
$url .= '?' . \http_build_query( $query_vars );
}
$this->redirect->do_safe_redirect( $url, 301 );
}
/**
* Strips `cat=-1` from the URL and redirects to the resulting URL.
*/
public function category_redirect() {
/**
* Allows the developer to keep cat=-1 GET parameters
*
* @since 19.9
*
* @param bool $remove_cat_parameter Whether to remove the `cat=-1` GET parameter. Default true.
*/
$should_remove_parameter = \apply_filters( 'wpseo_remove_cat_parameter', true );
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
if ( $should_remove_parameter && isset( $_GET['cat'] ) && $_GET['cat'] === '-1' ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
unset( $_GET['cat'] );
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is just a replace and the data is never saved.
$_SERVER['REQUEST_URI'] = \remove_query_arg( 'cat' );
}
$this->redirect->do_safe_redirect( $this->url->recreate_current_url(), 301, 'Stripping cat=-1 from the URL' );
}
}
}
home/xbodynamge/namtation/wp-content/plugins/wordpress-seo/src/integrations/front-end/redirects.php 0000644 00000015707 15114445303 0030116 0 ustar 00 <?php
namespace Yoast\WP\SEO\Integrations\Front_End;
use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
use Yoast\WP\SEO\Helpers\Meta_Helper;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Redirect_Helper;
use Yoast\WP\SEO\Helpers\Url_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;
/**
* Class Redirects.
*/
class Redirects implements Integration_Interface {
/**
* The options helper.
*
* @var Options_Helper
*/
protected $options;
/**
* The meta helper.
*
* @var Meta_Helper
*/
protected $meta;
/**
* The current page helper.
*
* @var Current_Page_Helper
*/
protected $current_page;
/**
* The redirect helper.
*
* @var Redirect_Helper
*/
private $redirect;
/**
* The URL helper.
*
* @var Url_Helper
*/
private $url;
/**
* Holds the WP_Query variables we should get rid of.
*
* @var string[]
*/
private $date_query_variables = [
'year',
'm',
'monthnum',
'day',
'hour',
'minute',
'second',
];
/**
* Sets the helpers.
*
* @codeCoverageIgnore
*
* @param Options_Helper $options Options helper.
* @param Meta_Helper $meta Meta helper.
* @param Current_Page_Helper $current_page The current page helper.
* @param Redirect_Helper $redirect The redirect helper.
* @param Url_Helper $url The URL helper.
*/
public function __construct( Options_Helper $options, Meta_Helper $meta, Current_Page_Helper $current_page, Redirect_Helper $redirect, Url_Helper $url ) {
$this->options = $options;
$this->meta = $meta;
$this->current_page = $current_page;
$this->redirect = $redirect;
$this->url = $url;
}
/**
* Returns the conditionals based in which this loadable should be active.
*
* @return array
*/
public static function get_conditionals() {
return [ Front_End_Conditional::class ];
}
/**
* Initializes the integration.
*
* This is the place to register hooks and filters.
*
* @return void
*/
public function register_hooks() {
\add_action( 'wp', [ $this, 'archive_redirect' ] );
\add_action( 'wp', [ $this, 'page_redirect' ], 99 );
\add_action( 'wp', [ $this, 'category_redirect' ] );
\add_action( 'template_redirect', [ $this, 'attachment_redirect' ], 1 );
\add_action( 'template_redirect', [ $this, 'disable_date_queries' ] );
}
/**
* Disable date queries, if they're disabled in Yoast SEO settings, to prevent indexing the wrong things.
*
* @return void
*/
public function disable_date_queries() {
if ( $this->options->get( 'disable-date', false ) ) {
$exploded_url = \explode( '?', $this->url->recreate_current_url(), 2 );
list( $base_url, $query_string ) = \array_pad( $exploded_url, 2, '' );
\parse_str( $query_string, $query_vars );
foreach ( $this->date_query_variables as $variable ) {
if ( \in_array( $variable, \array_keys( $query_vars ), true ) ) {
$this->do_date_redirect( $query_vars, $base_url );
}
}
}
}
/**
* When certain archives are disabled, this redirects those to the homepage.
*/
public function archive_redirect() {
if ( $this->need_archive_redirect() ) {
$this->redirect->do_safe_redirect( \get_bloginfo( 'url' ), 301 );
}
}
/**
* Based on the redirect meta value, this function determines whether it should redirect the current post / page.
*/
public function page_redirect() {
if ( ! $this->current_page->is_simple_page() ) {
return;
}
$post = \get_post();
if ( ! \is_object( $post ) ) {
return;
}
$redirect = $this->meta->get_value( 'redirect', $post->ID );
if ( $redirect === '' ) {
return;
}
$this->redirect->do_safe_redirect( $redirect, 301 );
}
/**
* If the option to disable attachment URLs is checked, this performs the redirect to the attachment.
*/
public function attachment_redirect() {
if ( ! $this->current_page->is_attachment() ) {
return;
}
if ( $this->options->get( 'disable-attachment', false ) === false ) {
return;
}
$url = $this->get_attachment_url();
if ( empty( $url ) ) {
return;
}
$this->redirect->do_unsafe_redirect( $url, 301 );
}
/**
* Checks if certain archive pages are disabled to determine if a archive redirect is needed.
*
* @codeCoverageIgnore
*
* @return bool Whether or not to redirect an archive page.
*/
protected function need_archive_redirect() {
if ( $this->options->get( 'disable-date', false ) && $this->current_page->is_date_archive() ) {
return true;
}
if ( $this->options->get( 'disable-author', false ) && $this->current_page->is_author_archive() ) {
return true;
}
if ( $this->options->get( 'disable-post_format', false ) && $this->current_page->is_post_format_archive() ) {
return true;
}
return false;
}
/**
* Retrieves the attachment url for the current page.
*
* @codeCoverageIgnore It wraps WordPress functions.
*
* @return string The attachment url.
*/
protected function get_attachment_url() {
/**
* Allows the developer to change the target redirection URL for attachments.
*
* @api string $attachment_url The attachment URL for the queried object.
* @api object $queried_object The queried object.
*
* @since 7.5.3
*/
return \apply_filters(
'wpseo_attachment_redirect_url',
\wp_get_attachment_url( \get_queried_object_id() ),
\get_queried_object()
);
}
/**
* Redirects away query variables that shouldn't work.
*
* @param array $query_vars The query variables in the current URL.
* @param string $base_url The base URL without query string.
*
* @return void
*/
private function do_date_redirect( $query_vars, $base_url ) {
foreach ( $this->date_query_variables as $variable ) {
unset( $query_vars[ $variable ] );
}
$url = $base_url;
if ( \count( $query_vars ) > 0 ) {
$url .= '?' . \http_build_query( $query_vars );
}
$this->redirect->do_safe_redirect( $url, 301 );
}
/**
* Strips `cat=-1` from the URL and redirects to the resulting URL.
*/
public function category_redirect() {
/**
* Allows the developer to keep cat=-1 GET parameters
*
* @since 19.9
*
* @param bool $remove_cat_parameter Whether to remove the `cat=-1` GET parameter. Default true.
*/
$should_remove_parameter = \apply_filters( 'wpseo_remove_cat_parameter', true );
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
if ( $should_remove_parameter && isset( $_GET['cat'] ) && $_GET['cat'] === '-1' ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
unset( $_GET['cat'] );
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is just a replace and the data is never saved.
$_SERVER['REQUEST_URI'] = \remove_query_arg( 'cat' );
}
$this->redirect->do_safe_redirect( $this->url->recreate_current_url(), 301, 'Stripping cat=-1 from the URL' );
}
}
}
home/xbodynamge/www/wp-content/plugins/wordpress-seo/src/integrations/front-end/redirects.php 0000644 00000015707 15114447140 0026751 0 ustar 00 <?php
namespace Yoast\WP\SEO\Integrations\Front_End;
use Yoast\WP\SEO\Conditionals\Front_End_Conditional;
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
use Yoast\WP\SEO\Helpers\Meta_Helper;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\Redirect_Helper;
use Yoast\WP\SEO\Helpers\Url_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;
/**
* Class Redirects.
*/
class Redirects implements Integration_Interface {
/**
* The options helper.
*
* @var Options_Helper
*/
protected $options;
/**
* The meta helper.
*
* @var Meta_Helper
*/
protected $meta;
/**
* The current page helper.
*
* @var Current_Page_Helper
*/
protected $current_page;
/**
* The redirect helper.
*
* @var Redirect_Helper
*/
private $redirect;
/**
* The URL helper.
*
* @var Url_Helper
*/
private $url;
/**
* Holds the WP_Query variables we should get rid of.
*
* @var string[]
*/
private $date_query_variables = [
'year',
'm',
'monthnum',
'day',
'hour',
'minute',
'second',
];
/**
* Sets the helpers.
*
* @codeCoverageIgnore
*
* @param Options_Helper $options Options helper.
* @param Meta_Helper $meta Meta helper.
* @param Current_Page_Helper $current_page The current page helper.
* @param Redirect_Helper $redirect The redirect helper.
* @param Url_Helper $url The URL helper.
*/
public function __construct( Options_Helper $options, Meta_Helper $meta, Current_Page_Helper $current_page, Redirect_Helper $redirect, Url_Helper $url ) {
$this->options = $options;
$this->meta = $meta;
$this->current_page = $current_page;
$this->redirect = $redirect;
$this->url = $url;
}
/**
* Returns the conditionals based in which this loadable should be active.
*
* @return array
*/
public static function get_conditionals() {
return [ Front_End_Conditional::class ];
}
/**
* Initializes the integration.
*
* This is the place to register hooks and filters.
*
* @return void
*/
public function register_hooks() {
\add_action( 'wp', [ $this, 'archive_redirect' ] );
\add_action( 'wp', [ $this, 'page_redirect' ], 99 );
\add_action( 'wp', [ $this, 'category_redirect' ] );
\add_action( 'template_redirect', [ $this, 'attachment_redirect' ], 1 );
\add_action( 'template_redirect', [ $this, 'disable_date_queries' ] );
}
/**
* Disable date queries, if they're disabled in Yoast SEO settings, to prevent indexing the wrong things.
*
* @return void
*/
public function disable_date_queries() {
if ( $this->options->get( 'disable-date', false ) ) {
$exploded_url = \explode( '?', $this->url->recreate_current_url(), 2 );
list( $base_url, $query_string ) = \array_pad( $exploded_url, 2, '' );
\parse_str( $query_string, $query_vars );
foreach ( $this->date_query_variables as $variable ) {
if ( \in_array( $variable, \array_keys( $query_vars ), true ) ) {
$this->do_date_redirect( $query_vars, $base_url );
}
}
}
}
/**
* When certain archives are disabled, this redirects those to the homepage.
*/
public function archive_redirect() {
if ( $this->need_archive_redirect() ) {
$this->redirect->do_safe_redirect( \get_bloginfo( 'url' ), 301 );
}
}
/**
* Based on the redirect meta value, this function determines whether it should redirect the current post / page.
*/
public function page_redirect() {
if ( ! $this->current_page->is_simple_page() ) {
return;
}
$post = \get_post();
if ( ! \is_object( $post ) ) {
return;
}
$redirect = $this->meta->get_value( 'redirect', $post->ID );
if ( $redirect === '' ) {
return;
}
$this->redirect->do_safe_redirect( $redirect, 301 );
}
/**
* If the option to disable attachment URLs is checked, this performs the redirect to the attachment.
*/
public function attachment_redirect() {
if ( ! $this->current_page->is_attachment() ) {
return;
}
if ( $this->options->get( 'disable-attachment', false ) === false ) {
return;
}
$url = $this->get_attachment_url();
if ( empty( $url ) ) {
return;
}
$this->redirect->do_unsafe_redirect( $url, 301 );
}
/**
* Checks if certain archive pages are disabled to determine if a archive redirect is needed.
*
* @codeCoverageIgnore
*
* @return bool Whether or not to redirect an archive page.
*/
protected function need_archive_redirect() {
if ( $this->options->get( 'disable-date', false ) && $this->current_page->is_date_archive() ) {
return true;
}
if ( $this->options->get( 'disable-author', false ) && $this->current_page->is_author_archive() ) {
return true;
}
if ( $this->options->get( 'disable-post_format', false ) && $this->current_page->is_post_format_archive() ) {
return true;
}
return false;
}
/**
* Retrieves the attachment url for the current page.
*
* @codeCoverageIgnore It wraps WordPress functions.
*
* @return string The attachment url.
*/
protected function get_attachment_url() {
/**
* Allows the developer to change the target redirection URL for attachments.
*
* @api string $attachment_url The attachment URL for the queried object.
* @api object $queried_object The queried object.
*
* @since 7.5.3
*/
return \apply_filters(
'wpseo_attachment_redirect_url',
\wp_get_attachment_url( \get_queried_object_id() ),
\get_queried_object()
);
}
/**
* Redirects away query variables that shouldn't work.
*
* @param array $query_vars The query variables in the current URL.
* @param string $base_url The base URL without query string.
*
* @return void
*/
private function do_date_redirect( $query_vars, $base_url ) {
foreach ( $this->date_query_variables as $variable ) {
unset( $query_vars[ $variable ] );
}
$url = $base_url;
if ( \count( $query_vars ) > 0 ) {
$url .= '?' . \http_build_query( $query_vars );
}
$this->redirect->do_safe_redirect( $url, 301 );
}
/**
* Strips `cat=-1` from the URL and redirects to the resulting URL.
*/
public function category_redirect() {
/**
* Allows the developer to keep cat=-1 GET parameters
*
* @since 19.9
*
* @param bool $remove_cat_parameter Whether to remove the `cat=-1` GET parameter. Default true.
*/
$should_remove_parameter = \apply_filters( 'wpseo_remove_cat_parameter', true );
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
if ( $should_remove_parameter && isset( $_GET['cat'] ) && $_GET['cat'] === '-1' ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Data is not processed or saved.
unset( $_GET['cat'] );
if ( isset( $_SERVER['REQUEST_URI'] ) ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput -- This is just a replace and the data is never saved.
$_SERVER['REQUEST_URI'] = \remove_query_arg( 'cat' );
}
$this->redirect->do_safe_redirect( $this->url->recreate_current_url(), 301, 'Stripping cat=-1 from the URL' );
}
}
}
home/xbodynamge/crosstraining/wp-content/plugins/wordpress-seo/admin/pages/redirects.php 0000644 00000000376 15114645136 0026011 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
* @since 19.0
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
require WPSEO_PATH . 'admin/views/redirects.php';
home/xbodynamge/crosstraining/wp-content/plugins/wordpress-seo/admin/views/redirects.php 0000644 00000020600 15114645425 0026040 0 ustar 00 <?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin
* @since 19.0
*/
if ( ! defined( 'WPSEO_VERSION' ) ) {
header( 'Status: 403 Forbidden' );
header( 'HTTP/1.1 403 Forbidden' );
exit();
}
?>
<div class="wrap yoast wpseo-admin-page page-wpseo_redirects">
<h1 id="wpseo-title"><?php echo \esc_html( \get_admin_page_title() ); ?></h1>
<div class="wpseo_content_wrapper" style="position: relative;">
<div style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;z-index: 100; display: flex;justify-content: center;align-items: center;background: radial-gradient(#ffffffcf 20%, #ffffff00 50%);">
<a class="yoast-button-upsell" href="<?php echo \esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/4e0/' ) ); ?>" target="_blank">
<?php
echo \esc_html__( 'Unlock with Premium', 'wordpress-seo' )
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
. WPSEO_Admin_Utils::get_new_tab_message();
?>
<span aria-hidden="true" class="yoast-button-upsell__caret"></span></a>
</div>
<div class="wpseo_content_cell" id="wpseo_content_top" style="opacity: 0.5;">
<h2 class="nav-tab-wrapper" id="wpseo-tabs">
<a class="nav-tab nav-tab-active" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="" tabindex="-1">
<?php
\esc_html_e( 'Regex Redirects', 'wordpress-seo' )
?>
</a>
<a class="nav-tab" id="tab-url-tab" href="#" tabindex="-1">
<?php
\esc_html_e( 'Settings', 'wordpress-seo' )
?>
</a>
</h2>
<div id="table-plain" class="tab-url redirect-table-tab">
<h2>
<?php
\esc_html_e( 'Plain redirects', 'wordpress-seo' )
?>
</h2>
<form class="wpseo-new-redirect-form" method="post">
<div class="wpseo_redirect_form">
<div class="redirect_form_row" id="row-wpseo_redirects_type">
<label class="textinput" for="wpseo_redirects_type">
<span class="title">
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
</label>
<select name="wpseo_redirects_type" id="wpseo_redirects_type" class="select select2-hidden-accessible" data-select2-id="wpseo_redirects_type" tabindex="-1" aria-hidden="true">
<option value="301" data-select2-id="2">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</option>
</select>
<span class="select2 select2-container select2-container--default" dir="ltr" data-select2-id="1" style="width: 400px;">
<span class="selection">
<span class="select2-selection select2-selection--single" role="combobox" aria-haspopup="true" aria-expanded="false" tabindex="-1" aria-disabled="false" aria-labelledby="select2-wpseo_redirects_type-container">
<span class="select2-selection__rendered" id="select2-wpseo_redirects_type-container" role="textbox" aria-readonly="true" title="301 Moved Permanently">
<?php
\esc_html_e( '301 Moved Permanently', 'wordpress-seo' )
?>
</span>
<span class="select2-selection__arrow" role="presentation">
<b role="presentation"></b>
</span>
</span>
</span>
<span class="dropdown-wrapper" aria-hidden="true"></span>
</span>
</div>
<p class="label desc description wpseo-redirect-clear">
<?php
printf(
/* translators: 1: opens a link. 2: closes the link. */
esc_html__( 'The redirect type is the HTTP response code sent to the browser telling the browser what type of redirect is served. %1$sLearn more about redirect types%2$s.', 'wordpress-seo' ),
'<a href="#" target="_blank">',
'</a>'
);
?>
<div class="redirect_form_row" id="row-wpseo_redirects_origin">
<label class="textinput" for="wpseo_redirects_origin">
<span class="title">
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
</label>
<input type="text" class="textinput" name="wpseo_redirects_origin" id="wpseo_redirects_origin" value="" tabindex="-1">
</div>
<br class="clear">
<div class="redirect_form_row wpseo_redirect_target_holder" id="row-wpseo_redirects_target">
<label class="textinput" for="wpseo_redirects_target">
<span class="title">
<?php
\esc_html_e( 'URL', 'wordpress-seo' )
?>
</span>
</label>
<input type="text" class="textinput" name="wpseo_redirects_target" id="wpseo_redirects_target" value="" tabindex="-1">
</div>
<br class="clear">
<button type="button" class="button button-primary" tabindex="-1">
<?php
\esc_html_e( 'Add Redirect', 'wordpress-seo' )
?>
</button>
</div>
</form>
<p class="desc"> </p>
<form id="plain" class="wpseo-redirects-table-form" method="post" action="">
<input type="hidden" class="wpseo_redirects_ajax_nonce" name="wpseo_redirects_ajax_nonce" value="6ccb86df42">
<input type="hidden" id="_wpnonce" name="_wpnonce" value="4b02cca185">
<input type="hidden" name="_wp_http_referer" value="/wp-admin/admin.php?page=wpseo_redirects"> <div class="tablenav top">
<div class="alignleft actions">
<select name="redirect-type" id="filter-by-redirect" tabindex="-1">
<option selected="selected" value="0">
<?php
\esc_html_e( 'All redirect types', 'wordpress-seo' )
?>
</option>
</select>
<input type="button" name="filter_action" id="post-query-submit" class="button" value="<?php \esc_attr_e( 'Filter', 'wordpress-seo' ); ?>" tabindex="-1">
</div>
<br class="clear">
</div>
<table class="wp-list-table widefat fixed striped table-view-list plain">
<thead>
<tr>
<td id="cb" class="manage-column column-cb check-column">
<input id="cb-select-all-1" type="checkbox" tabindex="-1">
</td>
<th scope="col" id="type" class="manage-column column-type column-primary sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" id="old" class="manage-column column-old sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" id="new" class="manage-column column-new sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
</tr>
</thead>
<tbody id="the-list">
<tr class="no-items">
<td class="colspanchange" colspan="4">
<?php
\esc_html_e( 'No items found.', 'wordpress-seo' )
?>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="manage-column column-cb check-column">
<input id="cb-select-all-2" type="checkbox" tabindex="-1">
</td>
<th scope="col" class="manage-column column-type column-primary sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Type', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>
</th>
<th scope="col" class="manage-column column-old sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'Old URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span>
</a>
</th>
<th scope="col" class="manage-column column-new sortable desc">
<a href="#" tabindex="-1">
<span>
<?php
\esc_html_e( 'New URL', 'wordpress-seo' )
?>
</span>
<span class="sorting-indicator"></span></a>
</th>
</tr>
</tfoot>
</table>
</form>
</div>
<br class="clear">
</div><!-- end of div wpseo_content_top --></div><!-- end of div wpseo_content_wrapper -->
</div>