Guest User

Untitled

a guest
Sep 18th, 2015
73
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function field_group_admin_enqueue_scripts() {
  2.  
  3. $dir = plugin_dir_url( __FILE__ );
  4.  
  5. // register & include JS
  6. wp_register_script( 'acf-input-flaticon', "{$dir}js/input.js" );
  7. wp_enqueue_script('acf-input-flaticon');
  8. wp_localize_script('acf-input-flaticon', 'fi_script_vars', array(
  9. 'themeFolder' => $this->icons_folder_URI,
  10. 'childThemeFolder' => $this->child_icons_folder_URI,
  11. 'isChildList' => $this->icon_ischild_list)
  12. );
  13.  
  14. // register & include CSS
  15. wp_register_style( 'acf-input-flaticon', "{$dir}css/input.css" );
  16. wp_enqueue_style('acf-input-flaticon');
  17.  
  18.  
  19. }
  20.  
  21. // and here's the corresponding js file...
  22. (function($){
  23. var themeFolder = fi_script_vars.themeFolder;
  24. var childThemeFolder = fi_script_vars.childThemeFolder;
  25. var isChildList = fi_script_vars.isChildList;
  26. })(jQuery);
RAW Paste Data