wpseo_add_fb_admin

Handles the posting of a new FB admin.

Description

wpseo_add_fb_admin(); 

Usage

  1. if ( !function_exists( 'wpseo_add_fb_admin' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yoast-seo/admin/ajax.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpseo_add_fb_admin(); 
  7.  

Defined (1)

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

/admin/ajax.php  
  1. function wpseo_add_fb_admin() { 
  2. check_ajax_referer( 'wpseo_fb_admin_nonce' ); 
  3.  
  4. if ( ! current_user_can( 'manage_options' ) ) { 
  5. die( '-1' ); 
  6.  
  7. $facebook_social = new Yoast_Social_Facebook(); 
  8.  
  9. wp_die( $facebook_social->add_admin( filter_input( INPUT_POST, 'admin_name' ), filter_input( INPUT_POST, 'admin_id' ) ) );