import_headspace(); } if ( ! empty( $post_wpseo['importwpseo'] ) || filter_input( INPUT_GET, 'importwpseo' ) ) { $import = new WPSEO_Import_WPSEO( $replace ); } } if ( isset( $_FILES['settings_import_file'] ) ) { check_admin_referer( 'wpseo-import-file' ); $import = new WPSEO_Import(); } /** * Allow custom import actions. * * @api bool|object $import Contains info about the handled import */ $import = apply_filters( 'wpseo_handle_import', $import ); if ( $import ) { /** * Allow customization of import&export message * * @api string $msg The message. */ $msg = apply_filters( 'wpseo_import_message', isset( $import->msg ) ? $import->msg : '' ); if ( $msg != '' ) { // Check if we've deleted old data and adjust message to match it. if ( $replace ) { $msg .= ' ' . __( 'The old data of the imported plugin was deleted successfully.', 'wordpress-seo' ); } $status = ( $import->success ) ? 'updated' : 'error'; echo '

', $msg, '

'; } } $tabs = array( 'wpseo-import' => array( 'label' => __( 'Import settings', 'wordpress-seo' ), 'screencast_video_url' => 'https://yoa.st/screencast-tools-import-export', ), 'wpseo-export' => array( 'label' => __( 'Export settings', 'wordpress-seo' ), 'screencast_video_url' => 'https://yoa.st/screencast-tools-import-export', ), 'import-seo' => array( 'label' => __( 'Import from other SEO plugins', 'wordpress-seo' ), 'screencast_video_url' => 'https://yoa.st/screencast-tools-import-export', ), ); ?>

$tab ) { printf( '
', $identifier ); if ( ! empty( $tab['screencast_video_url'] ) ) { $tab_video_url = $tab['screencast_video_url']; $helpcenter_tab = new WPSEO_Option_Tab( $identifier, $tab['label'], array( 'video_url' => $tab['screencast_video_url'] ) ); $helpcenter = new WPSEO_Help_Center( $identifier, $helpcenter_tab ); $helpcenter->output_help_center(); } require_once WPSEO_PATH . 'admin/views/tabs/tool/' . $identifier . '.php'; echo '
'; } /** * Allow adding a custom import tab */ do_action( 'wpseo_import_tab_content' );