Example #1
0
<?php

/**
 * @package WPSEO\Admin
 */
if (!defined('WPSEO_VERSION')) {
    header('Status: 403 Forbidden');
    header('HTTP/1.1 403 Forbidden');
    exit;
}
$yform = Yoast_Form::get_instance();
$social_facebook = new Yoast_Social_Facebook();
$yform->admin_header(true, 'wpseo_social');
?>

	<h2 class="nav-tab-wrapper" id="wpseo-tabs">
		<a class="nav-tab" id="accounts-tab" href="#top#accounts"><?php 
_e('Accounts', 'wordpress-seo');
?>
</a>
		<a class="nav-tab" id="facebook-tab" href="#top#facebook"><span class="dashicons dashicons-facebook-alt"></span> <?php 
_e('Facebook', 'wordpress-seo');
?>
</a>
		<a class="nav-tab" id="twitterbox-tab" href="#top#twitterbox"><span class="dashicons dashicons-twitter"></span> <?php 
_e('Twitter', 'wordpress-seo');
?>
</a>
		<a class="nav-tab" id="pinterest-tab" href="#top#pinterest"><?php 
_e('Pinterest', 'wordpress-seo');
?>
Example #2
0
/**
 * Handles the posting of a new FB admin.
 */
function wpseo_add_fb_admin()
{
    check_ajax_referer('wpseo_fb_admin_nonce');
    if (!current_user_can('manage_options')) {
        die('-1');
    }
    $facebook_social = new Yoast_Social_Facebook();
    wp_die($facebook_social->add_admin(filter_input(INPUT_POST, 'admin_name'), filter_input(INPUT_POST, 'admin_id')));
}