function admin_scripts()
{
    wp_enqueue_media();
    wp_enqueue_script('cmm-image-upload', \Cmmarslender\WPLibraryHelpers\library_url('image-upload.js', __FILE__), array('jquery'), '1.0.0', true);
}
Exemplo n.º 2
0
 /**
  * Enable our scripts and stylesheets
  *
  * @return void
  */
 function scripts()
 {
     wp_enqueue_script('post-finder', \Cmmarslender\WPLibraryHelpers\library_url('js/main.js', __FILE__), array('jquery', 'jquery-ui-draggable', 'jquery-ui-sortable', 'underscore'), POST_FINDER_VERSION, true);
     wp_localize_script('post-finder', 'POST_FINDER_CONFIG', array('adminurl' => admin_url(), 'nothing_found' => esc_html__('No posts found.', 'post_finder'), 'max_number_allowed' => esc_html__('Sorry, the maximum number of items has been reached.', 'post_finder'), 'already_added' => esc_html__('Sorry, that item has already been added.', 'post_finder')));
     wp_enqueue_style('post-finder', \Cmmarslender\WPLibraryHelpers\library_url('css/screen.css', __FILE__));
 }