gde_admin_custom_js

The Google Doc Embedder gde admin custom js function.

Description

gde_admin_custom_js( $hook ); 

Parameters (1)

0. $hook
The hook.

Usage

  1. if ( !function_exists( 'gde_admin_custom_js' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/functions-admin.php'; 
  3.  
  4. // The hook. 
  5. $hook = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gde_admin_custom_js($hook); 
  9.  

Defined (1)

The function is defined in the following location(s).

/functions-admin.php  
  1. function gde_admin_custom_js( $hook ) { 
  2. global $gde_settings_page, $gde_global_page, $pagenow; 
  3.  
  4. if ( $gde_settings_page == $hook || $gde_global_page == $hook ) { 
  5. wp_enqueue_script( 'gde_jqs', GDE_PLUGIN_URL . 'js/gde-jquery.js', array( 'wp-color-picker' ), false, true ); 
  6.  
  7. // localize 
  8. wp_localize_script( 'gde_jqs', 'jqs_vars', array ( 
  9. // internal use 
  10. 'gde_url' => GDE_PLUGIN_URL,  
  11. // profiles tab 
  12. 'delete' => __('This profile will be permanently deleted.', 'google-document-embedder') . "\n\n" . __('Are you sure?', 'google-document-embedder'),  
  13. 'default' => __('Settings for this profile will overwrite the default profile.', 'google-document-embedder') . "\n\n" . __('Are you sure?', 'google-document-embedder'),  
  14. 'reset' => __('Your profile list will be reset to its original state. All changes will be lost.', 'google-document-embedder') . "\n\n" . __('Are you sure?', 'google-document-embedder'),  
  15. // advanced tab 
  16. 'badimport' => __('Please select a valid export file to import.', 'google-document-embedder'),  
  17. 'warnimport' => __('Any settings or duplicate profile names in this import will overwrite the current values.', 'google-document-embedder') . "\n\n" . __('Are you sure?', 'google-document-embedder'),  
  18. // support tab 
  19. 'baddebug' => __('Please include a shortcode or message to request support.', 'google-document-embedder') 
  20. );