/**
 * Output the tabs in the admin area
 *
 * @since BuddyPress (1.5)
 * @param string $active_tab Name of the tab that is active
 */
function bp_core_admin_tabs($active_tab = '')
{
    // Declare local variables
    $tabs_html = '';
    $idle_class = 'nav-tab';
    $active_class = 'nav-tab nav-tab-active';
    // Setup core admin tabs
    $tabs = array('0' => array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-components'), 'admin.php')), 'name' => __('Components', 'buddypress')), '1' => array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-page-settings'), 'admin.php')), 'name' => __('Pages', 'buddypress')), '2' => array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-settings'), 'admin.php')), 'name' => __('Settings', 'buddypress')));
    // XTEC ************ AFEGIT - Removed tabs in Settings > BuddyPress. Actual access to tabs is
    //                            blocked in theme. This removal is to avoid admins seeing something
    //                            where they cannot access.
    // 2014.09.10 @aginard
    if (!is_xtecadmin()) {
        unset($tabs[1]);
        // Pages tab
        unset($tabs[2]);
        // Settings tab
    }
    //************ FI
    // If forums component is active, add additional tab
    if (bp_is_active('forums') && class_exists('BP_Forums_Component')) {
        // enqueue thickbox
        wp_enqueue_script('thickbox');
        wp_enqueue_style('thickbox');
        $tabs['3'] = array('href' => bp_get_admin_url(add_query_arg(array('page' => 'bb-forums-setup'), 'admin.php')), 'name' => __('Forums', 'buddypress'));
    }
    // Allow the tabs to be filtered
    $tabs = apply_filters('bp_core_admin_tabs', $tabs);
    // Loop through tabs and build navigation
    foreach (array_values($tabs) as $tab_data) {
        $is_current = (bool) ($tab_data['name'] == $active_tab);
        $tab_class = $is_current ? $active_class : $idle_class;
        $tabs_html .= '<a href="' . esc_url($tab_data['href']) . '" class="' . esc_attr($tab_class) . '">' . esc_html($tab_data['name']) . '</a>';
    }
    // Output the tabs
    echo $tabs_html;
    // Do other fun things
    do_action('bp_admin_tabs');
}
Example #2
0
/**
 * Remove menus for administrators who are not xtecadmin
 *
 * @author Toni Ginard
 *
 */
function remove_admin_menus()
{
    if (!is_xtecadmin()) {
        // Forum
        remove_submenu_page('options-general.php', 'bbpress');
        // BuddyPress
        remove_submenu_page('options-general.php', 'bp-page-settings');
        // Tab in BuddyPress
        remove_submenu_page('options-general.php', 'bp-settings');
        // Tab in BuddyPress
        // Private BP Pages
        remove_submenu_page('options-general.php', 'bphelp-pbp-settings');
        // In this case, it doesn't block access
        // Settings | Writing
        remove_submenu_page('options-general.php', 'options-writing.php');
        // In this case, it doesn't block access
    }
}
function invite_anyone_settings_setup()
{
    $subpage = isset($_GET['subpage']) ? $_GET['subpage'] : 'general-settings';
    register_setting('invite_anyone', 'invite_anyone', 'invite_anyone_settings_check');
    switch ($subpage) {
        case 'access-control':
            /* Access Settings */
            add_settings_section('invite_anyone_access_settings', __('Access Settings', 'invite-anyone'), 'invite_anyone_settings_access_content', 'invite_anyone');
            add_settings_field('invite_anyone_settings_email_visibility', __('Allow email invitations to be sent by', 'invite-anyone'), 'invite_anyone_settings_email_visibility', 'invite_anyone', 'invite_anyone_access_settings');
            add_settings_field('invite_anyone_settings_group_invite_visibility', __('Limit group invitations', 'invite-anyone'), 'invite_anyone_settings_group_invite_visibility', 'invite_anyone', 'invite_anyone_access_settings');
            add_settings_field('invite_anyone_settings_limit_invites', __('Limit per-user invitations', 'invite-anyone'), 'invite_anyone_settings_limit_invites', 'invite_anyone', 'invite_anyone_access_settings');
            break;
        case 'cloudsponge':
            // XTEC ************ AFEGIT - Blocked access to Clousponge page to all users other than xtecadmin
            // 2016.11.25 @xaviernietosanchez
            if (!is_xtecadmin()) {
                wp_die(__('You do not have permission to do that.'));
            }
            // ************ FI
            /* Cloudsponge Settings */
            add_settings_section('invite_anyone_cs', __('CloudSponge', 'invite-anyone'), 'invite_anyone_settings_cs_content', 'invite_anyone');
            break;
        case 'manage-invitations':
            /* Manage Invitations */
            add_settings_section('invite_anyone_manage_invitations', __('Manage Invitations', 'invite-anyone'), 'invite_anyone_settings_mi_content', 'invite_anyone');
            break;
        case 'stats':
            // XTEC ************ AFEGIT - Blocked access to Stadistic page to all users other than xtecadmin
            // 2016.11.25 @xaviernietosanchez
            if (!is_xtecadmin()) {
                wp_die(__('You do not have permission to do that.'));
            }
            // ************ FI
            /* Stats */
            add_settings_section('invite_anyone_stats', __('Stats', 'invite-anyone'), 'invite_anyone_settings_stats_content', 'invite_anyone');
            break;
        case 'general-settings':
        default:
            /* General Settings */
            add_settings_section('invite_anyone_general_settings', __('General Settings', 'invite-anyone'), 'invite_anyone_settings_main_content', 'invite_anyone');
            add_settings_field('invite_anyone_settings_replacement_patterns', __('Replacement patterns for email text fields', 'invite-anyone'), 'invite_anyone_settings_replacement_patterns', 'invite_anyone', 'invite_anyone_general_settings');
            add_settings_field('invite_anyone_settings_default_invitation_subject', __('Text of email invitation subject line', 'invite-anyone'), 'invite_anyone_settings_default_invitation_subject', 'invite_anyone', 'invite_anyone_general_settings');
            add_settings_field('invite_anyone_settings_default_invitation_message', __('Main text of email invitation message', 'invite-anyone'), 'invite_anyone_settings_default_invitation_message', 'invite_anyone', 'invite_anyone_general_settings');
            add_settings_field('invite_anyone_settings_addl_invitation_message', __('Footer text of email invitation message (not editable by users)', 'invite-anyone'), 'invite_anyone_settings_addl_invitation_message', 'invite_anyone', 'invite_anyone_general_settings');
            add_settings_field('invite_anyone_settings_is_customizable', __('Allow users to customize invitation', 'invite-anyone'), 'invite_anyone_settings_is_customizable', 'invite_anyone', 'invite_anyone_general_settings');
            add_settings_field('invite_anyone_settings_number_of_invitations', __('Number of email invitations users are permitted to send at a time', 'invite-anyone'), 'invite_anyone_settings_number_of_invitations', 'invite_anyone', 'invite_anyone_general_settings');
            add_settings_field('invite_anyone_settings_can_send_group_invites_email', __('Allow users to send group invitations along with email invitations', 'invite-anyone'), 'invite_anyone_settings_can_send_group_invites_email', 'invite_anyone', 'invite_anyone_general_settings');
            add_settings_field('invite_anyone_settings_bypass_registration_lock', __('Allow email invitations to be accepted even when site registration is disabled', 'invite-anyone'), 'invite_anyone_settings_bypass_registration_lock', 'invite_anyone', 'invite_anyone_general_settings');
            add_settings_field('invite_anyone_settings_group_invites_enable_create_step', __('Enable the Send Invites step during group creation', 'invite-anyone'), 'invite_anyone_settings_group_invites_enable_create_step', 'invite_anyone', 'invite_anyone_general_settings');
            break;
    }
}
Example #4
0
/**
 * Displays plugin network options page.
 */
function xtec_mail_options()
{
    // If it's MultiSite (XTECBlocs) is not necessary that is_xtecadmin() exists because first condition fails
    if (!is_multisite() && !is_xtecadmin()) {
        ?>
        <div class="wrap">
            <h2><?php 
        _e('XTEC Mail', 'xtec-mail');
        ?>
</h2>
            <div id="message" class="updated">
                <p>
                    <?php 
        _e('XTEC Mail is active', 'xtec-mail');
        ?>
                </p>
            </div>
        </div>
        <?php 
        return;
    }
    if (isset($_GET['action'])) {
        switch ($_GET['action']) {
            case 'siteoptions':
                if (isset($_POST['xtec_mail_idapp'])) {
                    update_site_option('xtec_mail_idapp', $_POST['xtec_mail_idapp']);
                }
                if (isset($_POST['xtec_mail_replyto'])) {
                    update_site_option('xtec_mail_replyto', $_POST['xtec_mail_replyto']);
                }
                if (isset($_POST['xtec_mail_sender'])) {
                    update_site_option('xtec_mail_sender', $_POST['xtec_mail_sender']);
                }
                if (!isset($_POST['xtec_mail_log'])) {
                    update_site_option('xtec_mail_log', 0);
                } else {
                    update_site_option('xtec_mail_log', $_POST['xtec_mail_log']);
                }
                if (!isset($_POST['xtec_mail_debug'])) {
                    update_site_option('xtec_mail_debug', 0);
                } else {
                    update_site_option('xtec_mail_debug', $_POST['xtec_mail_debug']);
                }
                if (isset($_POST['xtec_mail_logpath'])) {
                    update_site_option('xtec_mail_logpath', $_POST['xtec_mail_logpath']);
                }
                ?>
                    <div id="message" class="updated">
                        <p><?php 
                _e('Options saved.', 'xtec-mail');
                ?>
</p>
                    </div>
                <?php 
                break;
        }
    }
    // Check for WordPress multisite
    $page = is_multisite() ? 'ms-mail' : 'mail';
    ?>

    <div class="wrap">
        <form method="post" action="?page=<?php 
    echo $page;
    ?>
&action=siteoptions">
            <h2><?php 
    _e('XTEC Mail', 'xtec-mail');
    ?>
</h2>
            <table class="form-table">
                <tbody>
                    <tr valign="top">
                        <th scope="row"><?php 
    _e('idApp', 'xtec-mail');
    ?>
</th>
                        <td>
                            <input type="text" name="xtec_mail_idapp" value="<?php 
    echo get_site_option('xtec_mail_idapp');
    ?>
" />
                        </td>
                    </tr>
                    <tr valign="top">
                        <th scope="row"><?php 
    _e('replyto', 'xtec-mail');
    ?>
</th>
                        <td>
                            <input type="text" name="xtec_mail_replyto" value="<?php 
    echo get_site_option('xtec_mail_replyto');
    ?>
" />
                        </td>
                    </tr>
                    <tr valign="top">
                        <th scope="row"><?php 
    _e('ENVIRONMENT', 'xtec-mail');
    ?>
</th>
                        <td>
                            <?php 
    echo ENVIRONMENT . '&nbsp;&nbsp;<span style="font-style:italic;">(' . __('Set in config', 'xtec-mail') . ')</span>';
    ?>
                        </td>
                    </tr>
                    <tr valign="top">
                        <th scope="row"><?php 
    _e('Sender', 'xtec-mail');
    ?>
</th>
                        <td>
                            <input type="text" name="xtec_mail_sender" value="<?php 
    echo get_site_option('xtec_mail_sender');
    ?>
" />
                        </td>
                    </tr>
                    <tr valign="top">
                        <th scope="row"><?php 
    _e('Mail Log', 'xtec-mail');
    ?>
</th>
                        <td>
                            <label>
                                <input name="xtec_mail_log" type="checkbox" value="1" <?php 
    checked(get_site_option('xtec_mail_log'));
    ?>
 />
                                <?php 
    _e('Enable the log for the mail system', 'xtec-mail');
    ?>
                            </label>
                        </td>
                    </tr>
                    <tr valign="top">
                        <th scope="row"><?php 
    _e('Mail Debug', 'xtec-mail');
    ?>
</th>
                        <td>
                            <label>
                                <input name="xtec_mail_debug" type="checkbox" value="1" <?php 
    checked(get_site_option('xtec_mail_debug'));
    ?>
 />
                                <?php 
    _e('Enable the debug mode for log of the mail system', 'xtec-mail');
    ?>
                            </label>
                        </td>
                    </tr>
                    <tr valign="top">
                        <th scope="row"><?php 
    _e('Log Path', 'xtec-mail');
    ?>
</th>
                        <td>
                            <label>
                                <input type="text" name="xtec_mail_logpath" size="50" value="<?php 
    echo get_site_option('xtec_mail_logpath');
    ?>
" />
                                <?php 
    _e('Absolute path to log file', 'xtec-mail');
    ?>
                            </label>
                        </td>
                    </tr>
                </tbody>
            </table>
            <p class="submit">
                <input type="submit" name="submit" id="submit" class="button-primary" value="<?php 
    _e('Save', 'xtec-mail');
    ?>
">
            </p>
        </form>
    </div>
    <?php 
}
 function add_settings_page()
 {
     // add the options page
     // XTEC ********** MODIFICAT -> Added WordPressMS to share site_options
     // 2015.06.12 @sarjona
     // At the moment options can be edited only from main blog
     if ((is_xtecadmin() || $this->environment == Environment::WordPressMU || $this->environment == Environment::WordPressMS && get_current_blog_id() === 1) && $this->is_authority()) {
         add_options_page('WP-reCAPTCHA', 'WP-reCAPTCHA', 'manage_options', __FILE__, array(&$this, 'show_settings_page'));
     }
     // *********** ORIGINAL
     /*
             if ($this->environment == Environment::WordPressMU &&
                 $this->is_authority())
                 add_submenu_page('wpmu-admin.php', 'WP-reCAPTCHA', 'WP-reCAPTCHA',
                     'manage_options', __FILE__, array(&$this, 'show_settings_page'));
                 add_options_page('WP-reCAPTCHA', 'WP-reCAPTCHA', 'manage_options',
                      __FILE__, array(&$this, 'show_settings_page'));
     */
     // *********** FI
 }
function A2A_SHARE_SAVE_options_page()
{
    global $A2A_SHARE_SAVE_plugin_url_path, $A2A_SHARE_SAVE_services;
    // Require admin privs
    if (!current_user_can('manage_options')) {
        return false;
    }
    $new_options = array();
    $namespace = 'A2A_SHARE_SAVE_';
    // Make available services extensible via plugins, themes (functions.php), etc.
    $A2A_SHARE_SAVE_services = apply_filters('A2A_SHARE_SAVE_services', $A2A_SHARE_SAVE_services);
    // Which tab is selected?
    $possible_screens = array('default', 'floating');
    $current_screen = isset($_GET['action']) && in_array($_GET['action'], $possible_screens) ? $_GET['action'] : 'default';
    if (isset($_POST['Submit'])) {
        // Nonce verification
        check_admin_referer('add-to-any-update-options');
        if ('floating' == $current_screen) {
            // Floating options screen
            $possible_floating_values = array('left_docked', 'right_docked', 'none');
            $new_options['floating_vertical'] = in_array($_POST['A2A_SHARE_SAVE_floating_vertical'], $possible_floating_values) ? $_POST['A2A_SHARE_SAVE_floating_vertical'] : 'none';
            $new_options['floating_horizontal'] = in_array($_POST['A2A_SHARE_SAVE_floating_horizontal'], $possible_floating_values) ? $_POST['A2A_SHARE_SAVE_floating_horizontal'] : 'none';
            $new_options['floating_vertical_position'] = isset($_POST['A2A_SHARE_SAVE_floating_vertical_position']) && is_numeric($_POST['A2A_SHARE_SAVE_floating_vertical_position']) ? $_POST['A2A_SHARE_SAVE_floating_vertical_position'] : '100';
            $new_options['floating_vertical_offset'] = isset($_POST['A2A_SHARE_SAVE_floating_vertical_offset']) && is_numeric($_POST['A2A_SHARE_SAVE_floating_vertical_offset']) ? $_POST['A2A_SHARE_SAVE_floating_vertical_offset'] : '0';
            $new_options['floating_vertical_responsive'] = isset($_POST['A2A_SHARE_SAVE_floating_vertical_responsive']) && '1' == $_POST['A2A_SHARE_SAVE_floating_vertical_responsive'] ? '1' : '-1';
            $new_options['floating_vertical_responsive_max_width'] = isset($_POST['A2A_SHARE_SAVE_floating_vertical_responsive_max_width']) && is_numeric($_POST['A2A_SHARE_SAVE_floating_vertical_responsive_max_width']) ? $_POST['A2A_SHARE_SAVE_floating_vertical_responsive_max_width'] : '980';
            $new_options['floating_horizontal_position'] = isset($_POST['A2A_SHARE_SAVE_floating_horizontal_position']) && is_numeric($_POST['A2A_SHARE_SAVE_floating_horizontal_position']) ? $_POST['A2A_SHARE_SAVE_floating_horizontal_position'] : '0';
            $new_options['floating_horizontal_offset'] = isset($_POST['A2A_SHARE_SAVE_floating_horizontal_offset']) && is_numeric($_POST['A2A_SHARE_SAVE_floating_horizontal_offset']) ? $_POST['A2A_SHARE_SAVE_floating_horizontal_offset'] : '0';
            $new_options['floating_horizontal_responsive'] = isset($_POST['A2A_SHARE_SAVE_floating_horizontal_responsive']) && '1' == $_POST['A2A_SHARE_SAVE_floating_horizontal_responsive'] ? '1' : '-1';
            $new_options['floating_horizontal_responsive_min_width'] = isset($_POST['A2A_SHARE_SAVE_floating_horizontal_responsive_min_width']) && is_numeric($_POST['A2A_SHARE_SAVE_floating_horizontal_responsive_min_width']) ? $_POST['A2A_SHARE_SAVE_floating_horizontal_responsive_min_width'] : '981';
        } else {
            // Standard options screen
            $new_options['position'] = isset($_POST['A2A_SHARE_SAVE_position']) ? $_POST['A2A_SHARE_SAVE_position'] : 'bottom';
            $new_options['display_in_posts_on_front_page'] = isset($_POST['A2A_SHARE_SAVE_display_in_posts_on_front_page']) && $_POST['A2A_SHARE_SAVE_display_in_posts_on_front_page'] == '1' ? '1' : '-1';
            $new_options['display_in_posts_on_archive_pages'] = isset($_POST['A2A_SHARE_SAVE_display_in_posts_on_archive_pages']) && $_POST['A2A_SHARE_SAVE_display_in_posts_on_archive_pages'] == '1' ? '1' : '-1';
            $new_options['display_in_excerpts'] = isset($_POST['A2A_SHARE_SAVE_display_in_excerpts']) && $_POST['A2A_SHARE_SAVE_display_in_excerpts'] == '1' ? '1' : '-1';
            $new_options['display_in_posts'] = isset($_POST['A2A_SHARE_SAVE_display_in_posts']) && $_POST['A2A_SHARE_SAVE_display_in_posts'] == '1' ? '1' : '-1';
            $new_options['display_in_pages'] = isset($_POST['A2A_SHARE_SAVE_display_in_pages']) && $_POST['A2A_SHARE_SAVE_display_in_pages'] == '1' ? '1' : '-1';
            $new_options['display_in_attachments'] = isset($_POST['A2A_SHARE_SAVE_display_in_attachments']) && $_POST['A2A_SHARE_SAVE_display_in_attachments'] == '1' ? '1' : '-1';
            $new_options['display_in_feed'] = isset($_POST['A2A_SHARE_SAVE_display_in_feed']) && $_POST['A2A_SHARE_SAVE_display_in_feed'] == '1' ? '1' : '-1';
            $new_options['onclick'] = isset($_POST['A2A_SHARE_SAVE_onclick']) && $_POST['A2A_SHARE_SAVE_onclick'] == '1' ? '1' : '-1';
            $new_options['icon_size'] = isset($_POST['A2A_SHARE_SAVE_icon_size']) ? $_POST['A2A_SHARE_SAVE_icon_size'] : '';
            $new_options['button'] = isset($_POST['A2A_SHARE_SAVE_button']) ? $_POST['A2A_SHARE_SAVE_button'] : '';
            $new_options['button_custom'] = isset($_POST['A2A_SHARE_SAVE_button_custom']) ? $_POST['A2A_SHARE_SAVE_button_custom'] : '';
            $new_options['button_show_count'] = isset($_POST['A2A_SHARE_SAVE_button_show_count']) && $_POST['A2A_SHARE_SAVE_button_show_count'] == '1' ? '1' : '-1';
            $new_options['header'] = isset($_POST['A2A_SHARE_SAVE_header']) ? $_POST['A2A_SHARE_SAVE_header'] : '';
            $new_options['additional_js_variables'] = isset($_POST['A2A_SHARE_SAVE_additional_js_variables']) ? trim($_POST['A2A_SHARE_SAVE_additional_js_variables']) : '';
            $new_options['additional_css'] = isset($_POST['A2A_SHARE_SAVE_additional_css']) ? trim($_POST['A2A_SHARE_SAVE_additional_css']) : '';
            $new_options['custom_icons'] = isset($_POST['A2A_SHARE_SAVE_custom_icons']) && $_POST['A2A_SHARE_SAVE_custom_icons'] == 'url' ? 'url' : '-1';
            $new_options['custom_icons_url'] = isset($_POST['A2A_SHARE_SAVE_custom_icons_url']) ? trailingslashit($_POST['A2A_SHARE_SAVE_custom_icons_url']) : '';
            $new_options['custom_icons_type'] = isset($_POST['A2A_SHARE_SAVE_custom_icons_type']) ? $_POST['A2A_SHARE_SAVE_custom_icons_type'] : 'png';
            $new_options['custom_icons_width'] = isset($_POST['A2A_SHARE_SAVE_custom_icons_width']) ? $_POST['A2A_SHARE_SAVE_custom_icons_width'] : '';
            $new_options['custom_icons_height'] = isset($_POST['A2A_SHARE_SAVE_custom_icons_height']) ? $_POST['A2A_SHARE_SAVE_custom_icons_height'] : '';
            $new_options['inline_css'] = isset($_POST['A2A_SHARE_SAVE_inline_css']) && $_POST['A2A_SHARE_SAVE_inline_css'] == '1' ? '1' : '-1';
            $new_options['cache'] = isset($_POST['A2A_SHARE_SAVE_cache']) && $_POST['A2A_SHARE_SAVE_cache'] == '1' ? '1' : '-1';
            $custom_post_types = array_values(get_post_types(array('public' => true, '_builtin' => false), 'objects'));
            foreach ($custom_post_types as $custom_post_type_obj) {
                $placement_name = $custom_post_type_obj->name;
                $new_options['display_in_cpt_' . $placement_name] = isset($_POST['A2A_SHARE_SAVE_display_in_cpt_' . $placement_name]) && $_POST['A2A_SHARE_SAVE_display_in_cpt_' . $placement_name] == '1' ? '1' : '-1';
            }
            // Schedule cache refresh?
            if (isset($_POST['A2A_SHARE_SAVE_cache']) && $_POST['A2A_SHARE_SAVE_cache'] == '1') {
                A2A_SHARE_SAVE_schedule_cache();
                A2A_SHARE_SAVE_refresh_cache();
            } else {
                A2A_SHARE_SAVE_unschedule_cache();
            }
            // Store desired text if 16 x 16px buttons or text-only is chosen:
            if ($new_options['button'] == 'favicon.png|16|16') {
                $new_options['button_text'] = $_POST['A2A_SHARE_SAVE_button_favicon_16_16_text'];
            } elseif ($new_options['button'] == 'share_16_16.png|16|16') {
                $new_options['button_text'] = $_POST['A2A_SHARE_SAVE_button_share_16_16_text'];
            } else {
                $new_options['button_text'] = trim($_POST['A2A_SHARE_SAVE_button_text']) != '' ? $_POST['A2A_SHARE_SAVE_button_text'] : __('Share', 'add-to-any');
            }
            // Store chosen individual services to make active
            $active_services = array();
            if (!isset($_POST['A2A_SHARE_SAVE_active_services'])) {
                $_POST['A2A_SHARE_SAVE_active_services'] = array();
            }
            foreach ($_POST['A2A_SHARE_SAVE_active_services'] as $dummy => $sitename) {
                $service = substr($sitename, 7);
                $active_services[] = $service;
                // AddToAny counter enabled?
                if (in_array($service, array('facebook', 'pinterest', 'linkedin', 'reddit'))) {
                    $new_options['special_' . $service . '_options'] = array('show_count' => isset($_POST['addtoany_' . $service . '_show_count']) && $_POST['addtoany_' . $service . '_show_count'] == '1' ? '1' : '-1');
                }
            }
            $new_options['active_services'] = $active_services;
            // Store special service options
            $new_options['special_facebook_like_options'] = array('verb' => isset($_POST['addtoany_facebook_like_verb']) && $_POST['addtoany_facebook_like_verb'] == 'recommend' ? 'recommend' : 'like');
            $new_options['special_twitter_tweet_options'] = array('show_count' => '-1');
            $new_options['special_google_plusone_options'] = array('show_count' => isset($_POST['addtoany_google_plusone_show_count']) && $_POST['addtoany_google_plusone_show_count'] == '1' ? '1' : '-1');
            $new_options['special_google_plus_share_options'] = array('show_count' => isset($_POST['addtoany_google_plus_share_show_count']) && $_POST['addtoany_google_plus_share_show_count'] == '1' ? '1' : '-1');
            $new_options['special_pinterest_pin_options'] = array('show_count' => isset($_POST['addtoany_pinterest_pin_show_count']) && $_POST['addtoany_pinterest_pin_show_count'] == '1' ? '1' : '-1');
        }
        // Get all existing AddToAny options
        $existing_options = get_option('addtoany_options');
        // Merge $new_options into $existing_options to retain AddToAny options from all other screens/tabs
        if ($existing_options) {
            $new_options = array_merge($existing_options, $new_options);
        }
        update_option('addtoany_options', $new_options);
        ?>
		<div class="updated"><p><?php 
        _e('Settings saved.');
        ?>
</p></div>
		<?php 
    } else {
        if (isset($_POST['Reset'])) {
            // Nonce verification
            check_admin_referer('add-to-any-update-options');
            delete_option('addtoany_options');
        }
    }
    $options = get_option('addtoany_options');
    // XTEC ************ AFEGIT - Define default values. The xtecblock users default other options
    // 2016.03.16 @sarjona
    // 2016.06.02 @xavinieto
    if (is_xtec_super_admin()) {
        if (!isset($options['display_in_posts_on_front_page'])) {
            $options['display_in_posts_on_front_page'] = -1;
        }
        if (!isset($options['display_in_posts_on_archive_pages'])) {
            $options['display_in_posts_on_archive_pages'] = -1;
        }
    }
    if (!isset($options['display_in_feed'])) {
        $options['display_in_feed'] = -1;
    }
    if (!isset($options['display_in_excerpts'])) {
        $options['display_in_excerpts'] = -1;
    }
    if (!isset($options['display_in_pages'])) {
        $options['display_in_pages'] = -1;
    }
    //************ FI
    function position_in_content($options, $option_box = false)
    {
        if (!isset($options['position'])) {
            $options['position'] = 'bottom';
        }
        $positions = array('bottom' => array('selected' => 'bottom' == $options['position'] ? ' selected="selected"' : '', 'string' => __('bottom', 'add-to-any')), 'top' => array('selected' => 'top' == $options['position'] ? ' selected="selected"' : '', 'string' => __('top', 'add-to-any')), 'both' => array('selected' => 'both' == $options['position'] ? ' selected="selected"' : '', 'string' => __('top &amp; bottom', 'add-to-any')));
        if ($option_box) {
            $html = '</label>';
            $html .= '<label>';
            // Label needed to prevent checkmark toggle on SELECT click
            $html .= '<select name="A2A_SHARE_SAVE_position">';
            $html .= '<option value="bottom"' . $positions['bottom']['selected'] . '>' . $positions['bottom']['string'] . '</option>';
            $html .= '<option value="top"' . $positions['top']['selected'] . '>' . $positions['top']['string'] . '</option>';
            $html .= '<option value="both"' . $positions['both']['selected'] . '>' . $positions['both']['string'] . '</option>';
            $html .= '</select>';
            return $html;
        } else {
            $html = '<span class="A2A_SHARE_SAVE_position">';
            $html .= $positions[$options['position']]['string'];
            $html .= '</span>';
            return $html;
        }
    }
    ?>
	
	<div class="wrap">
	
	<h1><?php 
    _e('AddToAny Share Settings', 'add-to-any');
    ?>
</h1>
	
	<h2 class="nav-tab-wrapper">
<!--
// XTEC ************ MODIFICAT - Added language translation
// 2015.09.22 @nacho
// 2016.02.03 @xavinieto

		<?php 
    if (is_xtec_super_admin()) {
        ?>

		<a href="<?php 
        echo admin_url('options-general.php?page=add-to-any.php');
        ?>
" class="nav-tab<?php 
        if ('default' == $current_screen) {
            echo ' nav-tab-active';
        }
        ?>
"><?php 
        esc_attr_e(_e('Standard:', 'add-to-any'));
        ?>
</a>
//************ ORIGINAL-->
		<a href="<?php 
        echo admin_url('options-general.php?page=addtoany');
        ?>
" class="nav-tab<?php 
        if ('default' == $current_screen) {
            echo ' nav-tab-active';
        }
        ?>
"><?php 
        esc_html_e('Standard');
        ?>
</a>
<!--
//************ FI
 -->
 <!--
// XTEC ************ AFEGIT - Hide Floating Tab
// 2015.09.22 @xavinieto
-->
		<?php 
    }
    ?>
<!--
//************ FI
 -->
 
<!--
// XTEC ************ AFEGIT - Hide Floating Tab
// 2015.09.22 @nacho
-->
		<?php 
    if (is_xtec_super_admin()) {
        ?>
<!--
//************ FI
 -->
		<a href="<?php 
        echo esc_url(add_query_arg(array('action' => 'floating'), admin_url('options-general.php?page=addtoany')));
        ?>
" class="nav-tab<?php 
        if ('floating' == $current_screen) {
            echo ' nav-tab-active';
        }
        ?>
"><?php 
        esc_html_e('Floating');
        ?>
</a>
<!--
// XTEC ************ AFEGIT - Hide Floating Tab
// 2015.09.22 @nacho
-->
		<?php 
    }
    ?>
<!--
//************ FI
 -->
	</h2>

	<form id="addtoany_admin_form" method="post" action="">
	
	<?php 
    wp_nonce_field('add-to-any-update-options');
    ?>

		<table class="form-table">
		
		<?php 
    if ('default' == $current_screen) {
        ?>
			<tr valign="top">
			<th scope="row"><?php 
        _e("Icon Size", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="32"<?php 
        if (!isset($options['icon_size']) || '32' == $options['icon_size']) {
            echo ' checked="checked"';
        }
        ?>
> <?php 
        _e('Large', 'add-to-any');
        ?>
</label>
				<br>
				<label><input type="radio" name="A2A_SHARE_SAVE_icon_size" value="16"<?php 
        if (isset($options['icon_size']) && '16' == $options['icon_size']) {
            echo ' checked="checked"';
        }
        ?>
> <?php 
        _e('Small', 'add-to-any');
        ?>
</label>
				<br>
				<label><input type="radio" name="A2A_SHARE_SAVE_icon_size"<?php 
        if (isset($options['icon_size']) && !in_array($options['icon_size'], array('32', '16'))) {
            echo ' value="' . $options['icon_size'] . '" checked="checked"';
        }
        ?>
> <?php 
        _e('Custom', 'add-to-any');
        ?>
</label>
				<input class="addtoany_icon_size_custom small-text" id="A2A_SHARE_SAVE_icon_size_custom" maxlength="3" type="text" onclick="document.getElementsByName('A2A_SHARE_SAVE_icon_size')[2].checked=true" value="<?php 
        if (isset($options['icon_size']) && !in_array($options['icon_size'], array('32', '16'))) {
            echo $options['icon_size'];
        }
        ?>
">
				<label class="addtoany_icon_size_custom" for="A2A_SHARE_SAVE_icon_size_custom">pixels</label>
			</fieldset></td>
			</tr>
			
			<tr valign="top">
			<th scope="row"><?php 
        _e("Standalone Buttons", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<ul id="addtoany_services_sortable" class="addtoany_admin_list addtoany_override a2a_kit_size_32">
					<li class="dummy"><img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path;
        ?>
/icons/transparent.gif" width="16" height="16" alt="" /></li>
				</ul>
				<p id="addtoany_services_info"><?php 
        _e("Choose the services you want below. &nbsp;Click a chosen service again to remove. &nbsp;Reorder services by dragging and dropping as they appear above.", 'add-to-any');
        ?>
</p>
				<ul id="addtoany_services_selectable" class="addtoany_admin_list">
					<li id="a2a_wp_facebook_like" class="addtoany_special_service addtoany_3p_button" title="Facebook Like button">
						<span><img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/icons/facebook_like.png';
        ?>
" width="50" height="20" alt="Facebook Like" /></span>
					</li>
					<li id="a2a_wp_twitter_tweet" class="addtoany_special_service addtoany_3p_button" title="Twitter Tweet button">
						<span><img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/icons/twitter_tweet.png';
        ?>
" width="55" height="20" alt="Twitter Tweet" /></span>
					</li>
					<li id="a2a_wp_google_plusone" class="addtoany_special_service addtoany_3p_button" title="Google +1 button">
						<span><img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/icons/google_plusone.png';
        ?>
" width="32" height="20" alt="Google +1" /></span>
					</li>
					<li id="a2a_wp_google_plus_share" class="addtoany_special_service addtoany_3p_button" title="Google+ Share button">
						<span><img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/icons/google_plus_share.png';
        ?>
" width="56" height="20" alt="Google+ Share" /></span>
					</li>
					<li id="a2a_wp_pinterest_pin" class="addtoany_special_service addtoany_3p_button" title="Pinterest Pin It button">
						<span><img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/icons/pinterest_pin.png';
        ?>
" width="40" height="20" alt="Pinterest Pin It" /></span>
					</li>
				<?php 
        // Show all services
        foreach ($A2A_SHARE_SAVE_services as $service_safe_name => $site) {
            if (isset($site['href'])) {
                $custom_service = true;
            } else {
                $custom_service = false;
            }
            if (!isset($site['icon'])) {
                $site['icon'] = 'default';
            }
            $special_service = in_array($service_safe_name, array('facebook', 'pinterest', 'linkedin', 'reddit')) ? ' class="addtoany_special_service"' : '';
            ?>
						<li data-addtoany-icon-name="<?php 
            echo $site['icon'];
            ?>
"<?php 
            echo $special_service;
            ?>
 id="a2a_wp_<?php 
            echo $service_safe_name;
            ?>
" title="<?php 
            echo $site['name'];
            ?>
">
							<span><img src="<?php 
            echo isset($site['icon_url']) ? $site['icon_url'] : $A2A_SHARE_SAVE_plugin_url_path . '/icons/' . $site['icon'] . '.png';
            ?>
" width="<?php 
            echo isset($site['icon_width']) ? $site['icon_width'] : '16';
            ?>
" height="<?php 
            echo isset($site['icon_height']) ? $site['icon_height'] : '16';
            ?>
" alt="" /><?php 
            echo $site['name'];
            ?>
</span>
						</li>
				<?php 
        }
        ?>
				</ul>
			</fieldset></td>
			</tr>
			
			<tr valign="top">
			<th scope="row"><?php 
        _e("Universal Button", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<div class="addtoany_icon_size_large">
					<label class="addtoany_override a2a_kit_size_32">
						<input name="A2A_SHARE_SAVE_button" value="A2A_SVG_32" type="radio"<?php 
        if (!isset($options['button']) || 'A2A_SVG_32' == $options['button']) {
            echo ' checked="checked"';
        }
        ?>
 style="margin:9px 0;vertical-align:middle">
						<span class="a2a_svg a2a_s_a2a" onclick="this.parentNode.firstChild.checked=true" style="margin-left:9px"></span>
					</label>
					<br>
				</div>
				
				<div class="addtoany_icon_size_small">
					<label>
						<input name="A2A_SHARE_SAVE_button" value="favicon.png|16|16" id="A2A_SHARE_SAVE_button_is_favicon_16" type="radio"<?php 
        if (isset($options['button']) && 'favicon.png|16|16' == $options['button']) {
            echo ' checked="checked"';
        }
        ?>
 style="margin:9px 0;vertical-align:middle">
						<img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/favicon.png';
        ?>
" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php 
        _e('Share', 'add-to-any');
        ?>
" title="+ <?php 
        _e('Share', 'add-to-any');
        ?>
" onclick="this.parentNode.firstChild.checked=true"/>
					</label>
					<input name="A2A_SHARE_SAVE_button_favicon_16_16_text" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_favicon_16').checked=true" style="vertical-align:middle;width:150px" value="<?php 
        echo isset($options['button_text']) && '' != trim($options['button_text']) ? stripslashes($options['button_text']) : __('Share', 'add-to-any');
        ?>
" />
					<label style="padding-left:9px">
						<input name="A2A_SHARE_SAVE_button" value="share_16_16.png|16|16" id="A2A_SHARE_SAVE_button_is_share_icon_16" type="radio"<?php 
        if (isset($options['button']) && 'share_16_16.png|16|16' == $options['button']) {
            echo ' checked="checked"';
        }
        ?>
 style="margin:9px 0;vertical-align:middle">
						<img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/share_16_16.png';
        ?>
" width="16" height="16" border="0" style="padding:9px;vertical-align:middle" alt="+ <?php 
        _e('Share', 'add-to-any');
        ?>
" title="+ <?php 
        _e('Share', 'add-to-any');
        ?>
" onclick="this.parentNode.firstChild.checked=true"/>
					</label>
					<input name="A2A_SHARE_SAVE_button_share_16_16_text" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_share_icon_16').checked=true" style="vertical-align:middle;width:150px" value="<?php 
        echo isset($options['button_text']) && '' != trim($options['button_text']) ? stripslashes($options['button_text']) : __('Share', 'add-to-any');
        ?>
" />
					<br>
					<label>
						<input name="A2A_SHARE_SAVE_button" value="share_save_120_16.png|120|16" type="radio"<?php 
        if (isset($options['button']) && 'share_save_120_16.png|120|16' == $options['button']) {
            echo ' checked="checked"';
        }
        ?>
 style="margin:9px 0;vertical-align:middle">
						<img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/share_save_120_16.png';
        ?>
" width="120" height="16" border="0" style="padding:9px;vertical-align:middle" onclick="this.parentNode.firstChild.checked=true"/>
					</label>
					<br>
					<label>
						<input name="A2A_SHARE_SAVE_button" value="share_save_171_16.png|171|16" type="radio"<?php 
        if (isset($options['button']) && 'share_save_171_16.png|171|16' == $options['button']) {
            echo ' checked="checked"';
        }
        ?>
 style="margin:9px 0;vertical-align:middle">
						<img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/share_save_171_16.png';
        ?>
" width="171" height="16" border="0" style="padding:9px;vertical-align:middle" onclick="this.parentNode.firstChild.checked=true"/>
					</label>
					<br>
					<label>
						<input name="A2A_SHARE_SAVE_button" value="share_save_256_24.png|256|24" type="radio"<?php 
        if (isset($options['button']) && 'share_save_256_24.png|256|24' == $options['button']) {
            echo ' checked="checked"';
        }
        ?>
 style="margin:9px 0;vertical-align:middle">
						<img src="<?php 
        echo $A2A_SHARE_SAVE_plugin_url_path . '/share_save_256_24.png';
        ?>
" width="256" height="24" border="0" style="padding:9px;vertical-align:middle" onclick="this.parentNode.firstChild.checked=true"/>
					</label>
					<br>
				</div>
				
				<label>
					<input name="A2A_SHARE_SAVE_button" value="CUSTOM" id="A2A_SHARE_SAVE_button_is_custom" type="radio"<?php 
        if (isset($options['button']) && 'CUSTOM' == $options['button']) {
            echo ' checked="checked"';
        }
        ?>
 style="margin:9px 0;vertical-align:middle">
					<span style="margin:0 9px;vertical-align:middle"><?php 
        _e("Image URL");
        ?>
:</span>
				</label>
				<input name="A2A_SHARE_SAVE_button_custom" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_custom').checked=true" style="vertical-align:middle" value="<?php 
        if (isset($options['button_custom'])) {
            echo $options['button_custom'];
        }
        ?>
" />
				<br>
				<label>
					<input name="A2A_SHARE_SAVE_button" value="TEXT" id="A2A_SHARE_SAVE_button_is_text" type="radio"<?php 
        if (isset($options['button']) && 'TEXT' == $options['button']) {
            echo ' checked="checked"';
        }
        ?>
 style="margin:9px 0;vertical-align:middle">
<!--
// XTEC ************ MODIFICAT - Added language translation
// 2015.09.23 @nacho
-->
					<span style="margin:0 9px;vertical-align:middle"><?php 
        _e("Text only", 'add-to-any');
        ?>
:</span>
<!--
//************ ORIGINAL
					<span style="margin:0 9px;vertical-align:middle"><?php 
        _e("Text only");
        ?>
:</span>
//************ FI
 -->
				</label>
				<input name="A2A_SHARE_SAVE_button_text" type="text" class="code" size="50" onclick="document.getElementById('A2A_SHARE_SAVE_button_is_text').checked=true" style="vertical-align:middle;width:150px" value="<?php 
        echo isset($options['button_text']) && trim('' != $options['button_text']) ? stripslashes($options['button_text']) : __('Share', 'add-to-any');
        ?>
" />
				<br>
				<label>
					<input name="A2A_SHARE_SAVE_button" value="NONE" type="radio"<?php 
        if (isset($options['button']) && 'NONE' == $options['button']) {
            echo ' checked="checked"';
        }
        ?>
 onclick="return confirm('<?php 
        _e('This option will disable universal sharing. Are you sure you want to disable universal sharing?', 'add-to-any');
        ?>
')" style="margin:9px 0;vertical-align:middle">
					<span style="margin:0 9px;vertical-align:middle"><?php 
        _e("None");
        ?>
</span>
				</label>
				<br>
				<label>
					<input id="A2A_SHARE_SAVE_button_show_count" name="A2A_SHARE_SAVE_button_show_count" type="checkbox"<?php 
        if (isset($options['button_show_count']) && $options['button_show_count'] == '1') {
            echo ' checked="checked"';
        }
        ?>
 value="1">
<!--
// XTEC ************ MODIFICAT - Added language translation
// 2015.09.23 @nacho
-->
					<span style="margin-left:5px"><?php 
        _e('Show count', 'add-to-any');
        ?>
</span>
<!--
//************ ORIGINAL
					<span style="margin-left:5px">Show count</span>
//************ FI
-->
				</label>
				
			</fieldset></td>
			</tr>

<!--
// XTEC ************ AFEGIT - Only show options for xtecadmin
// 2016.06.02 @xavinieto
-->
			<?php 
        if (is_xtec_super_admin()) {
            ?>
<!--
//************ FI
 -->
			<tr valign="top">
			<th scope="row"><?php 
            _e('Sharing Header', 'add-to-any');
            ?>
</th>
			<td><fieldset id="addtoany_extra_section_sharing_header" class="addtoany_extra_section" role="region">
				<label>
<!--
// XTEC ************ MODIFICAT - Added language translation
// 2015.09.23 @nacho
					<input name="A2A_SHARE_SAVE_header" type="text" class="code" placeholder="<?php 
            esc_attr_e(_e('Share this:', "add-to-any"));
            ?>
" size="50" value="<?php 
            if (isset($options['header'])) {
                echo esc_attr(stripslashes($options['header']));
            }
            ?>
" />
//************ ORIGINAL
					<input name="A2A_SHARE_SAVE_header" type="text" class="code" placeholder="<?php 
            esc_attr_e('Share this:');
            ?>
" size="50" value="<?php 
            if (isset($options['header'])) {
                echo esc_attr(stripslashes($options['header']));
            }
            ?>
" />
//************ FI
 -->
				</label>
			</fieldset></td>
			</tr>

 <!--
// XTEC ************ AFEGIT - Only show options for xtecadmin
// 2016.06.02 @xavinieto
-->
			<?php 
        }
        ?>
<!--
//************ FI
 -->

			<tr valign="top">
			<th scope="row"><?php 
        _e('Placement', 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label>
					<input id="A2A_SHARE_SAVE_display_in_posts" name="A2A_SHARE_SAVE_display_in_posts" type="checkbox"<?php 
        if (!isset($options['display_in_posts']) || $options['display_in_posts'] != '-1') {
            echo ' checked="checked"';
        }
        ?>
 value="1"/>
					<?php 
        printf(__('Display at the %s of posts', 'add-to-any'), position_in_content($options, true));
        ?>
				</label>
				<br/>
				<label>
					&nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_posts_on_front_page" type="checkbox"<?php 
        if (!isset($options['display_in_posts_on_front_page']) || $options['display_in_posts_on_front_page'] != '-1') {
            echo ' checked="checked"';
        }
        if (isset($options['display_in_posts']) && $options['display_in_posts'] == '-1') {
            echo ' disabled="disabled"';
        }
        ?>
 value="1"/>
					<?php 
        printf(__('Display at the %s of posts on the front page', 'add-to-any'), position_in_content($options));
        ?>
				</label>
				<br/>
				<label>
					&nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_posts_on_archive_pages" type="checkbox"<?php 
        if (!isset($options['display_in_posts_on_archive_pages']) || $options['display_in_posts_on_archive_pages'] != '-1') {
            echo ' checked="checked"';
        }
        if (isset($options['display_in_posts']) && $options['display_in_posts'] == '-1') {
            echo ' disabled="disabled"';
        }
        ?>
 value="1"/>
					<?php 
        printf(__('Display at the %s of posts on archive pages', 'add-to-any'), position_in_content($options));
        ?>
				</label>

  <!--
// XTEC ************ AFEGIT - Only show options for xtecadmin
// 2016.06.02 @xavinieto
-->
				<?php 
        if (is_xtec_super_admin()) {
            ?>
<!--
//************ FI
 -->
				<br/>
				<label>
					&nbsp; &nbsp; &nbsp; <input class="A2A_SHARE_SAVE_child_of_display_in_posts" name="A2A_SHARE_SAVE_display_in_feed" type="checkbox"<?php 
            if (!isset($options['display_in_feed']) || $options['display_in_feed'] != '-1') {
                echo ' checked="checked"';
            }
            if (isset($options['display_in_posts']) && $options['display_in_posts'] == '-1') {
                echo ' disabled="disabled"';
            }
            ?>
 value="1"/>
					<?php 
            printf(__('Display at the %s of posts in the feed', 'add-to-any'), position_in_content($options));
            ?>
				</label>
				<br/>
				<label>
					<input name="A2A_SHARE_SAVE_display_in_excerpts" type="checkbox"<?php 
            if (!isset($options['display_in_excerpts']) || $options['display_in_excerpts'] != '-1') {
                echo ' checked="checked"';
            }
            ?>
 value="1"/>
					<?php 
            printf(__('Display at the %s of excerpts', 'add-to-any'), position_in_content($options, false));
            ?>
				</label>
<!--
// XTEC ************ AFEGIT - Only show options for xtecadmin
// 2016.06.02 @xavinieto
-->
			<?php 
        }
        ?>
<!--
//************ FI
 -->
				<br/>
				<label>
					<input name="A2A_SHARE_SAVE_display_in_pages" type="checkbox"<?php 
        if (!isset($options['display_in_pages']) || $options['display_in_pages'] != '-1') {
            echo ' checked="checked"';
        }
        ?>
 value="1"/>
					<?php 
        printf(__('Display at the %s of pages', 'add-to-any'), position_in_content($options, false));
        ?>
				</label>
				<br/>

<!--
// XTEC ************ AFEGIT - Only show options for xtecadmin
// 2016.06.02 @xavinieto
-->
			<?php 
        if (is_xtec_super_admin()) {
            ?>
<!--
//************ FI
 -->

				<label>
					<input name="A2A_SHARE_SAVE_display_in_attachments" type="checkbox"<?php 
            if (!isset($options['display_in_attachments']) || $options['display_in_attachments'] != '-1') {
                echo ' checked="checked"';
            }
            ?>
 value="1"/>
					<?php 
            printf(__('Display at the %s of media pages', 'add-to-any'), position_in_content($options, false));
            ?>
				</label>
			<?php 
            $custom_post_types = array_values(get_post_types(array('public' => true, '_builtin' => false), 'objects'));
            foreach ($custom_post_types as $custom_post_type_obj) {
                $placement_label = $custom_post_type_obj->labels->name;
                $placement_name = $custom_post_type_obj->name;
                ?>
				<br/>
<!--
// XTEC ************ MODIFICAT - Unmark by default options "Display at the XXX of Forums/Themes/Answers/Documents/Google Calendars"
// 2015.09.23 @nacho
-->
				<label>
					<input name="A2A_SHARE_SAVE_display_in_cpt_<?php 
                echo $placement_name;
                ?>
" type="checkbox" value="1"/>
					<?php 
                printf(__('Display at the %s of %s', 'add-to-any'), position_in_content($options, false), esc_html($placement_label));
                ?>
				</label>
<!--
//************ ORIGINAL
				<label>
					<input name="A2A_SHARE_SAVE_display_in_cpt_<?php 
                echo $placement_name;
                ?>
" type="checkbox"<?php 
                if (!isset($options['display_in_cpt_' . $placement_name]) || $options['display_in_cpt_' . $placement_name] != '-1') {
                    echo ' checked="checked"';
                }
                ?>
 value="1"/>
					<?php 
                printf(__('Display at the %s of %s', 'add-to-any'), position_in_content($options, false), esc_html($placement_label));
                ?>
				</label>
//************ FI
 -->
			<?php 
            }
            ?>
				
				<br/><br/>
				<div class="setting-description">
					<?php 
            _e("See <a href=\"widgets.php\" title=\"Theme Widgets\">Widgets</a> and <a href=\"options-general.php?page=addtoany&action=floating\" title=\"AddToAny Floating Share Buttons\">Floating</a> for additional placement options. For advanced placement, see <a href=\"http://wordpress.org/plugins/add-to-any/faq/\">the FAQs</a>.", 'add-to-any');
            ?>
				</div>

<!--
// XTEC ************ AFEGIT - Only show options for xtecadmin
// 2016.06.02 @xavinieto
-->
			<?php 
        }
        ?>
<!--
//************ FI
 -->

			</fieldset></td>
			</tr>

<!--
// XTEC ************ AFEGIT - Only show options for xtecadmin
// 2016.06.02 @xavinieto
-->
			<?php 
        if (is_xtec_super_admin()) {
            ?>
<!--
//************ FI
 -->

			<tr valign="top">
			<th scope="row"><?php 
            _e('Menu Options', 'add-to-any');
            ?>
</th>
			<td><fieldset id="addtoany_extra_section_menu_options" class="addtoany_extra_section" role="region">
				<label>
					<input name="A2A_SHARE_SAVE_onclick" type="checkbox"<?php 
            if (isset($options['onclick']) && $options['onclick'] == '1') {
                echo ' checked="checked"';
            }
            ?>
 value="1"/>
					<?php 
            _e('Only show the universal share menu when the user <em>clicks</em> the universal share button', 'add-to-any');
            ?>
				</label>
				<label>
					<p><?php 
            _e("You can use AddToAny's Menu Styler to customize the colors of your universal share menu. When you're done, be sure to paste the generated code in the <a href=\"#\" onclick=\"document.getElementById('A2A_SHARE_SAVE_additional_js_variables').focus();return false\">Additional JavaScript</a> box below.", 'add-to-any');
            ?>
</p>
				</label>
				<p>
					<a href="https://www.addtoany.com/buttons/share/menu_style/wordpress" class="button-secondary" title="<?php 
            _e("Open the AddToAny Menu Styler in a new window", 'add-to-any');
            ?>
" target="_blank" onclick="document.getElementById('A2A_SHARE_SAVE_additional_js_variables').focus(); document.getElementById('A2A_SHARE_SAVE_menu_styler_note').style.display='';"><?php 
            _e("Open Menu Styler", 'add-to-any');
            ?>
</a>
				</p>
			</fieldset></td>
			</tr>

			<tr valign="top">
			<th scope="row"><?php 
            _e('Additional JavaScript', 'add-to-any');
            ?>
</th>
			<td><fieldset id="addtoany_extra_section_additional_javascript" class="addtoany_extra_section" role="region">
				<p id="A2A_SHARE_SAVE_menu_styler_note" style="display:none">
					<label for="A2A_SHARE_SAVE_additional_js_variables" class="updated">
						<strong><?php 
            _e("Paste the code from AddToAny's Menu Styler in the box below!", 'add-to-any');
            ?>
</strong>
					</label>
				</p>
				<label for="A2A_SHARE_SAVE_additional_js_variables">
					<p><?php 
            _e('Below you can add special JavaScript code for AddToAny.', 'add-to-any');
            ?>
					<?php 
            _e("Advanced users should explore AddToAny's <a href=\"https://www.addtoany.com/buttons/customize/wordpress\" target=\"_blank\">additional options</a>.", 'add-to-any');
            ?>
</p>
				</label>
				<p>
					<textarea name="A2A_SHARE_SAVE_additional_js_variables" id="A2A_SHARE_SAVE_additional_js_variables" class="code" style="width: 98%; font-size: 12px;" rows="6" cols="50"><?php 
            if (isset($options['additional_js_variables'])) {
                echo stripslashes($options['additional_js_variables']);
            }
            ?>
</textarea>
				</p>
			</fieldset></td>
			</tr>
			<tr valign="top">
			<th scope="row"><?php 
            _e('Additional CSS', 'add-to-any');
            ?>
</th>
			<td><fieldset id="addtoany_extra_section_additional_css" class="addtoany_extra_section" role="region">
				<label for="A2A_SHARE_SAVE_additional_css">
					<p><?php 
            _e('Below you can add special CSS code for AddToAny.', 'add-to-any');
            ?>
					<?php 
            _e("Advanced users should explore AddToAny's <a href=\"https://www.addtoany.com/buttons/customize/wordpress\" target=\"_blank\">additional options</a>.", 'add-to-any');
            ?>
</p>
				</label>
				<p>
					<textarea name="A2A_SHARE_SAVE_additional_css" id="A2A_SHARE_SAVE_additional_css" class="code" style="width: 98%; font-size: 12px;" rows="6" cols="50"><?php 
            if (isset($options['additional_css'])) {
                echo stripslashes($options['additional_css']);
            }
            ?>
</textarea>
				</p>
			</fieldset></td>
			</tr>
			<tr valign="top">
			<th scope="row"><?php 
            _e('Advanced Options', 'add-to-any');
            ?>
</th>
			<td><fieldset id="addtoany_extra_section_advanced_options" class="addtoany_extra_section" role="region">
				<label for="A2A_SHARE_SAVE_custom_icons">
					<input name="A2A_SHARE_SAVE_custom_icons" id="A2A_SHARE_SAVE_custom_icons" type="checkbox"<?php 
            if (isset($options['custom_icons']) && $options['custom_icons'] == 'url') {
                echo ' checked="checked"';
            }
            ?>
 value="url"/>
				<?php 
            _e('Use custom icons. URL:', 'add-to-any');
            ?>
				</label>
				<input name="A2A_SHARE_SAVE_custom_icons_url" type="text" class="code" size="50" style="vertical-align:middle" placeholder="//example.com/blog/uploads/addtoany/icons/custom/" value="<?php 
            if (isset($options['custom_icons_url'])) {
                echo $options['custom_icons_url'];
            }
            ?>
" />
				<br/>
				<label for="A2A_SHARE_SAVE_custom_icons_type"><?php 
            _e('Filename extension', 'add-to-any');
            ?>
</label>
				<input name="A2A_SHARE_SAVE_custom_icons_type" type="text" class="code" size="5" maxlength="4" placeholder="png" value="<?php 
            if (isset($options['custom_icons_type'])) {
                echo $options['custom_icons_type'];
            } else {
                echo 'png';
            }
            ?>
" />
				<label for="A2A_SHARE_SAVE_custom_icons_width"><?php 
            _e('Width');
            ?>
</label>
				<input name="A2A_SHARE_SAVE_custom_icons_width" type="number" step="1" min="0" id="A2A_SHARE_SAVE_custom_icons_width" value="<?php 
            if (isset($options['custom_icons_width'])) {
                echo $options['custom_icons_width'];
            }
            ?>
" class="small-text" />
				<label for="A2A_SHARE_SAVE_custom_icons_height"><?php 
            _e('Height');
            ?>
</label>
				<input name="A2A_SHARE_SAVE_custom_icons_height" type="number" step="1" min="0" id="A2A_SHARE_SAVE_custom_icons_height" value="<?php 
            if (isset($options['custom_icons_height'])) {
                echo $options['custom_icons_height'];
            }
            ?>
" class="small-text" />
				<p class="description">
					<?php 
            _e("Specify the URL of the directory containing your custom icons. For example, a URL of <code>//example.com/blog/uploads/addtoany/icons/custom/</code> containing <code>facebook.png</code> and <code>twitter.png</code>. Be sure that custom icon filenames match the icon filenames in <code>plugins/add-to-any/icons</code>. For AddToAny's Universal Button, select Image URL and specify the URL of your AddToAny universal share icon (<a href=\"#\" onclick=\"document.getElementsByName('A2A_SHARE_SAVE_button_custom')[0].focus();return false\">above</a>).", 'add-to-any');
            ?>
				</p>
				<br/>
				<label for="A2A_SHARE_SAVE_inline_css">
					<input name="A2A_SHARE_SAVE_inline_css" id="A2A_SHARE_SAVE_inline_css" type="checkbox"<?php 
            if (!isset($options['inline_css']) || $options['inline_css'] != '-1') {
                echo ' checked="checked"';
            }
            ?>
 value="1"/>
				<?php 
            _e('Use default CSS', 'add-to-any');
            ?>
				</label>
				<p class="description">
					<?php 
            _e("Only disable AddToAny's default stylesheet if you already have the necessary CSS code applied to your AddToAny buttons.", 'add-to-any');
            ?>
				</p>
				<br/>
				<label for="A2A_SHARE_SAVE_cache">
					<input name="A2A_SHARE_SAVE_cache" id="A2A_SHARE_SAVE_cache" type="checkbox"<?php 
            if (isset($options['cache']) && $options['cache'] == '1') {
                echo ' checked="checked"';
            }
            ?>
 value="1"/>
				<?php 
            _e('Cache AddToAny locally with daily cache updates', 'add-to-any');
            ?>
				</label>
				<p class="description">
					<?php 
            _e("Most sites should not use this option. By default, AddToAny loads asynchronously and most efficiently. Since many visitors will have AddToAny cached in their browser already, serving AddToAny locally from your site will be slower for those visitors. If local caching is enabled, be sure to set far future cache/expires headers for image files in your <code>uploads/addtoany</code> directory.", 'add-to-any');
            ?>
				</p>
			</fieldset></td>
			</tr>
 <!--
// XTEC ************ AFEGIT - Only show options for xtecadmin
// 2016.06.02 @xavinieto
-->
			<?php 
        } else {
            ?>
				<input name="A2A_SHARE_SAVE_inline_css" id="A2A_SHARE_SAVE_inline_css" type="hidden"<?php 
            if (!isset($options['inline_css']) || $options['inline_css'] != '-1') {
                echo ' checked="checked"';
            }
            ?>
 value="1"/>
			<?php 
        }
        ?>
<!--
//************ FI
 -->
		<?php 
    }
    ?>
		
		</table>		
		
		<?php 
    if ('floating' == $current_screen) {
        ?>
		
		<p><?php 
        _e('AddToAny &quot;floating&quot; share buttons stay in a fixed position even when the user scrolls.', 'add-to-any');
        ?>
</p>
		<p><?php 
        _e('Large icons from your currently selected buttons are displayed in your floating bar(s). 3rd party buttons (Like, Tweet, etc.) are not displayed.', 'add-to-any');
        ?>
</p>
		
		<h3><?php 
        _e('Vertical Buttons', 'add-to-any');
        ?>
</h3>
		<table class="form-table">
			<tr valign="top">
			<th scope="row"><?php 
        _e("Placement", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label><input type="radio" name="A2A_SHARE_SAVE_floating_vertical" value="left_docked"<?php 
        if (isset($options['floating_vertical']) && 'left_docked' == $options['floating_vertical']) {
            echo ' checked="checked"';
        }
        ?>
> <?php 
        _e('Left docked', 'add-to-any');
        ?>
</label>
				<br>
				<label><input type="radio" name="A2A_SHARE_SAVE_floating_vertical" value="right_docked"<?php 
        if (isset($options['floating_vertical']) && 'right_docked' == $options['floating_vertical']) {
            echo ' checked="checked"';
        }
        ?>
> <?php 
        _e('Right docked', 'add-to-any');
        ?>
</label>
				<br>
				<label><input type="radio" name="A2A_SHARE_SAVE_floating_vertical" value="none"<?php 
        if (!isset($options['floating_vertical']) || 'none' == $options['floating_vertical']) {
            echo ' checked="checked"';
        }
        ?>
> <?php 
        _e('None', 'add-to-any');
        ?>
</label>
			</fieldset></td>
			</tr>
			<tr valign="top">
			<th scope="row"><?php 
        _e("Responsiveness", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label>
					<input id="A2A_SHARE_SAVE_floating_vertical_responsive" name="A2A_SHARE_SAVE_floating_vertical_responsive" type="checkbox"<?php 
        if (!isset($options['floating_vertical_responsive']) || $options['floating_vertical_responsive'] != '-1') {
            echo ' checked="checked"';
        }
        ?>
 value="1" />
					Only display when screen is larger than <input name="A2A_SHARE_SAVE_floating_vertical_responsive_max_width" type="number" step="1" value="<?php 
        if (isset($options['floating_vertical_responsive_max_width'])) {
            echo $options['floating_vertical_responsive_max_width'];
        } else {
            echo '980';
        }
        ?>
" class="small-text" /> pixels wide
				</label>
			</fieldset></td>
			</tr>
			<tr valign="top">
			<th scope="row"><?php 
        _e("Position", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label><input name="A2A_SHARE_SAVE_floating_vertical_position" type="number" step="1" value="<?php 
        if (isset($options['floating_vertical_position'])) {
            echo $options['floating_vertical_position'];
        } else {
            echo '100';
        }
        ?>
" class="small-text" /> pixels from top</label>
			</fieldset></td>
			</tr>
			<tr valign="top">
			<th scope="row"><?php 
        _e("Offset", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label><input name="A2A_SHARE_SAVE_floating_vertical_offset" type="number" step="1" value="<?php 
        if (isset($options['floating_vertical_offset'])) {
            echo $options['floating_vertical_offset'];
        } else {
            echo '0';
        }
        ?>
" class="small-text" /> pixels from left or right</label>
			</fieldset></td>
			</tr>
		</table>
			
		<h3><?php 
        _e('Horizontal Buttons', 'add-to-any');
        ?>
</h3>
		<table class="form-table">
			<tr valign="top">
			<th scope="row"><?php 
        _e("Placement", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label><input type="radio" name="A2A_SHARE_SAVE_floating_horizontal" value="left_docked"<?php 
        if (isset($options['floating_horizontal']) && 'left_docked' == $options['floating_horizontal']) {
            echo ' checked="checked"';
        }
        ?>
> <?php 
        _e('Left docked', 'add-to-any');
        ?>
</label>
				<br>
				<label><input type="radio" name="A2A_SHARE_SAVE_floating_horizontal" value="right_docked"<?php 
        if (isset($options['floating_horizontal']) && 'right_docked' == $options['floating_horizontal']) {
            echo ' checked="checked"';
        }
        ?>
> <?php 
        _e('Right docked', 'add-to-any');
        ?>
</label>
				<br>
				<label><input type="radio" name="A2A_SHARE_SAVE_floating_horizontal" value="none"<?php 
        if (!isset($options['floating_horizontal']) || 'none' == $options['floating_horizontal']) {
            echo ' checked="checked"';
        }
        ?>
> <?php 
        _e('None', 'add-to-any');
        ?>
</label>
			</fieldset></td>
			</tr>
			<tr valign="top">
			<th scope="row"><?php 
        _e("Responsiveness", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label>
					<input id="A2A_SHARE_SAVE_floating_horizontal_responsive" name="A2A_SHARE_SAVE_floating_horizontal_responsive" type="checkbox"<?php 
        if (!isset($options['floating_horizontal_responsive']) || $options['floating_horizontal_responsive'] != '-1') {
            echo ' checked="checked"';
        }
        ?>
 value="1" />
					Only display when screen is smaller than <input name="A2A_SHARE_SAVE_floating_horizontal_responsive_min_width" type="number" step="1" value="<?php 
        if (isset($options['floating_horizontal_responsive_min_width'])) {
            echo $options['floating_horizontal_responsive_min_width'];
        } else {
            echo '981';
        }
        ?>
" class="small-text" /> pixels wide
				</label>
			</fieldset></td>
			</tr>
			<tr valign="top">
			<th scope="row"><?php 
        _e("Position", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label><input name="A2A_SHARE_SAVE_floating_horizontal_position" type="number" step="1" value="<?php 
        if (isset($options['floating_horizontal_position'])) {
            echo $options['floating_horizontal_position'];
        } else {
            echo '0';
        }
        ?>
" class="small-text" /> pixels from left or right</label>
			</fieldset></td>
			</tr>
			<tr valign="top">
			<th scope="row"><?php 
        _e("Offset", 'add-to-any');
        ?>
</th>
			<td><fieldset>
				<label><input name="A2A_SHARE_SAVE_floating_horizontal_offset" type="number" step="1" value="<?php 
        if (isset($options['floating_horizontal_offset'])) {
            echo $options['floating_horizontal_offset'];
        } else {
            echo '0';
        }
        ?>
" class="small-text" /> pixels from bottom</label>
			</fieldset></td>
			</tr>
		</table>
		
		<?php 
    }
    ?>

		</table>
		
		<p class="submit">
			<input class="button-primary" type="submit" name="Submit" value="<?php 
    _e('Save Changes', 'add-to-any');
    ?>
" />
			<input id="A2A_SHARE_SAVE_reset_options" type="submit" name="Reset" onclick="return confirm('<?php 
    _e('Are you sure you want to delete all AddToAny options?', 'add-to-any');
    ?>
')" value="<?php 
    _e('Reset', 'add-to-any');
    ?>
" />
		</p>
	
	</form>
	
<!--
// XTEC ************ AFEGIT - Hide unnecessary info
// 2015.09.22 @nacho
-->
		<?php 
    if (is_xtecadmin()) {
        ?>
<!--
//************ FI
 -->	
	<h2><?php 
        _e('Like this plugin?', 'add-to-any');
        ?>
</h2>
	<p><?php 
        _e('<a href="https://wordpress.org/support/view/plugin-reviews/add-to-any#postform" target="_blank">Give it a 5 star rating</a> on WordPress.org.', 'add-to-any');
        ?>
</p>
	<p><?php 
        _e('<a href="https://www.addtoany.com/share_save#title=WordPress%20Share%20Plugin%20by%20AddToAny.com&amp;url=http%3A%2F%2Fwordpress.org%2Fplugins%2Fadd-to-any%2F">Share it</a> and follow <a href="https://www.addtoany.com/">AddToAny</a> on <a href="https://www.facebook.com/AddToAny" target="_blank">Facebook</a> &amp; <a href="https://twitter.com/AddToAny" target="_blank">Twitter</a>.', 'add-to-any');
        ?>
</p>
	
	<h2><?php 
        _e('Need support?', 'add-to-any');
        ?>
</h2>
	<p><?php 
        _e('See the <a href="http://wordpress.org/extend/plugins/add-to-any/faq/">FAQs</a>.', 'add-to-any');
        ?>
</p>
	<p><?php 
        _e('Search the <a href="http://wordpress.org/tags/add-to-any">support forums</a>.', 'add-to-any');
        ?>
</p>
<!-- 
// XTEC ************ AFEGIT - Hide unnecessary info
// 2015.09.22 @nacho
-->
		<?php 
    }
    ?>
<!--
//************ FI
-->	
	</div>
	
	<script src="http<?php 
    if (is_ssl()) {
        echo 's';
    }
    ?>
://static.addtoany.com/menu/page.js"></script>
	<script>
	if ( window.a2a && a2a.svg_css ) a2a.svg_css();
	jQuery(document).ready( function() { if ( ! window.a2a) jQuery('<div class="error"><p><strong>Something is preventing AddToAny from loading. Try disabling content blockers such as ad-blocking add-ons, or try another web browser.</strong></p></div>').insertBefore('.nav-tab-wrapper:eq(0)'); });	
	</script>

<?php 
}