Exemple #1
0
            add_filter('plugin_action_links', 'bitly_service_action_link', 10, 2);
        } else {
            // include jquery
            wp_enqueue_script('jquery');
            // include our js script
            wp_enqueue_script('bitly-js', plugins_url('/js/bitly-client.js', __FILE__));
        }
    }
}
// start
$bitly = new Bitly();
if ($oathToken = bitly_settings('oauthToken')) {
    $bitly->oauth($oathToken);
}
// require after $bitly has been defined so we can access statistics
if ($bitly->hasCurl()) {
    require_once 'bitly-widget.php';
}
/**
 * Loads the settings once and allows the input of the specific field the user would
 * like to show.
 *
 * @since 1.0.0
 */
function bitly_settings($option = '')
{
    if (empty($option)) {
        return false;
    }
    $settings = get_option('bitly_settings');
    if (!is_array($settings) || empty($settings[$option])) {