WPSEO_Import_AIOSEO_Hooks

Setting the hooks for importing the data the All-In-One-SEO plugin.

Defined (1)

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

/admin/meta_import.php  
  1. class WPSEO_Import_AIOSEO_Hooks extends WPSEO_Import_Hooks { 
  2.  
  3. protected $plugin_file = 'all-in-one-seo-pack/all_in_one_seo_pack.php'; 
  4.  
  5. protected $deactivation_listener = 'deactivate_aioseo'; 
  6.  
  7. /** 
  8. * Show notice the old plugin is installed and offer to import its data. 
  9. */ 
  10. public function show_import_settings_notice() { 
  11.  
  12. $yoasturl = add_query_arg( array( '_wpnonce' => wp_create_nonce( 'wpseo-import' ) ), admin_url( 'admin.php?page=wpseo_tools&tool=import-export&import=1&importaioseo=1#top#import-seo' ) ); 
  13. $aiourl = add_query_arg( array( '_wpnonce' => wp_create_nonce( 'aiosp-import' ) ), admin_url( 'tools.php?page=aiosp_import' ) ); 
  14.  
  15. $aioseop_yst_detected_notice_dismissed = get_user_meta( get_current_user_id(), 'aioseop_yst_detected_notice_dismissed', true ); 
  16.  
  17. if ( empty( $aioseop_yst_detected_notice_dismissed ) ) { 
  18.  
  19. echo '<div class="notice notice-warning row-title is-dismissible yst_notice"><p>', sprintf( esc_html__( 'The plugin Yoast SEO has been detected. Do you want to %simport its settings%s into All in One SEO Pack?', 'all-in-one-seo-pack' ), sprintf( '<a href="%s">', esc_url( $aiourl ) ), '</a>' ), '</p></div>'; 
  20.  
  21.  
  22. echo '<div class="error"><p>', sprintf( esc_html__( 'The plugin All-In-One-SEO has been detected. Do you want to %simport its settings%s?', 'wordpress-seo' ), sprintf( '<a href="%s">', esc_url( $yoasturl ) ), '</a>' ), '</p></div>'; 
  23.  
  24.  
  25. public function show_deactivate_notice() { 
  26. echo '<div class="updated"><p>', esc_html__( 'All in One SEO has been deactivated', 'all-in-one-seo-pack' ), '</p></div>';