PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 27.8
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v27.8
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / admin / views / tabs / tool / wpseo-export.php

wpseo-export.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 27.8, at admin/views/tabs/tool/wpseo-export.php

40 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPSEO plugin file.
4 *
5 * @package WPSEO\Admin\Views
6 */
7
8 if ( ! defined( 'WPSEO_VERSION' ) ) {
9 header( 'Status: 403 Forbidden' );
10 header( 'HTTP/1.1 403 Forbidden' );
11 exit();
12 }
13
14 /* translators: %1$s expands to Yoast SEO */
15 $submit_button_value = sprintf( __( 'Export your %1$s settings', 'wordpress-seo' ), 'Yoast SEO' );
16
17 // phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: The nonce will be verified in WPSEO_Export below, We are only strictly comparing with '1'.
18 if ( isset( $_POST['do_export'] ) && wp_unslash( $_POST['do_export'] ) === '1' ) {
19 $export = new WPSEO_Export();
20 $export->export();
21 return;
22 }
23
24 $wpseo_export_phrase = sprintf(
25 /* translators: %1$s expands to Yoast SEO */
26 __( 'Export your %1$s settings here, to copy them on another site.', 'wordpress-seo' ),
27 'Yoast SEO',
28 );
29 ?>
30
31 <p><?php echo esc_html( $wpseo_export_phrase ); ?></p>
32 <form
33 action="<?php echo esc_url( admin_url( 'admin.php?page=wpseo_tools&tool=import-export#top#wpseo-export' ) ); ?>"
34 method="post"
35 accept-charset="<?php echo esc_attr( get_bloginfo( 'charset' ) ); ?>">
36 <?php wp_nonce_field( WPSEO_Export::NONCE_ACTION ); ?>
37 <input type="hidden" name="do_export" value="1" />
38 <button type="submit" class="button button-primary" id="export-button"><?php echo esc_html( $submit_button_value ); ?></button>
39 </form>
40