WPSEO_Import_WPSEO_Hooks

Setting the hooks for importing the data the wpSEO plugin.

Defined (1)

The class is defined in the following location(s).

/admin/import/class-import-wpseo-hooks.php  
  1. class WPSEO_Import_WPSEO_Hooks extends WPSEO_Import_Hooks { 
  2.  
  3. /** 
  4. * @var string The main plugin file. 
  5. */ 
  6. protected $plugin_file = 'wpseo/wpseo.php'; 
  7.  
  8. /** 
  9. * @var string The GET parameter for deactivating the plugin. 
  10. */ 
  11. protected $deactivation_listener = 'deactivate_wpseo'; 
  12.  
  13. /** 
  14. * Throw a notice to import wpSEO. 
  15. * @since 3.0 
  16. */ 
  17. public function show_import_settings_notice() { 
  18. $url = add_query_arg( array( '_wpnonce' => wp_create_nonce( 'wpseo-import' ) ), admin_url( 'admin.php?page=wpseo_tools&tool=import-export&import=1&importwpseo=1#top#import-seo' ) ); 
  19. /** translators: 1: link open tag; 2: link close tag. */ 
  20. echo '<div class="error"><p>', sprintf( esc_html__( 'The plugin wpSEO has been detected. Do you want to %1$simport its settings%2$s?', 'wordpress-seo' ), sprintf( '<a href="%s">', esc_url( $url ) ), '</a>' ), '</p></div>'; 
  21.  
  22. /** 
  23. * Throw a notice to inform the user wpSEO has been deactivated 
  24. * @since 3.0 
  25. */ 
  26. public function show_deactivate_notice() { 
  27. echo '<div class="updated"><p>', esc_html__( 'wpSEO has been deactivated', 'wordpress-seo' ), '</p></div>';