Jetpack_Likes::enqueue_admin_scripts PHP Method

enqueue_admin_scripts() public method

Load the JS required for loading the like counts.
    function enqueue_admin_scripts()
    {
        if (empty($_GET['post_type']) || 'post' == $_GET['post_type'] || 'page' == $_GET['post_type']) {
            if ($this->in_jetpack) {
                wp_enqueue_script('likes-post-count', plugins_url('modules/likes/post-count.js', dirname(__FILE__)), array('jquery'), JETPACK__VERSION);
                wp_enqueue_script('likes-post-count-jetpack', plugins_url('modules/likes/post-count-jetpack.js', dirname(__FILE__)), array('likes-post-count'), JETPACK__VERSION);
            } else {
                wp_enqueue_script('jquery.wpcom-proxy-request', "/wp-content/js/jquery/jquery.wpcom-proxy-request.js", array('jquery'), NULL, true);
                wp_enqueue_script('likes-post-count', plugins_url('likes/post-count.js', dirname(__FILE__)), array('jquery'), JETPACK__VERSION);
                wp_enqueue_script('likes-post-count-wpcom', plugins_url('likes/post-count-wpcom.js', dirname(__FILE__)), array('likes-post-count', 'jquery.wpcom-proxy-request'), JETPACK__VERSION);
            }
        }
    }