Exemple #1
0
 /**
  * Add necessary custom styles for this page.
  *
  * @since 1.5.0
  *
  */
 function styles()
 {
     wp_enqueue_style('farbtastic');
     wp_enqueue_style('prose-admin', CHILD_URL . '/lib/css/admin.css', array(), prose_get_version());
 }
/**
 * Adds common WP functionality scripts, color picker script, and the
 * Prose script, with some variables passed in from PHP.
 *
 * @author StudioPress & Gary Jones
 * @global string $_prose_settings_pagehook
 * @version 1.0
 */
function prose_settings_scripts()
{
    global $_prose_settings_pagehook;
    wp_enqueue_script('common');
    wp_enqueue_script('wp-lists');
    wp_enqueue_script('postbox');
    wp_enqueue_script('farbtastic');
    wp_enqueue_script('prose-admin', CHILD_URL . '/lib/js/admin.js', array('farbtastic'), prose_get_version(), true);
    $params = array('pageHook' => $_prose_settings_pagehook, 'firstTime' => !is_array(get_user_option('closedpostboxes_' . $_prose_settings_pagehook)), 'toggleAll' => __('Toggle All', PROSE_DOMAIN), 'warnUnsaved' => __('The changes you made will be lost if you navigate away from this page.', PROSE_DOMAIN), 'warnReset' => __('Are you sure you want to reset?', PROSE_DOMAIN));
    wp_localize_script('prose-admin', 'prose', $params);
}