optionsframework_media_scripts

The SKT Parallaxme optionsframework media scripts function.

Description

optionsframework_media_scripts( $hook ); 

Parameters (1)

0. $hook
The hook.

Usage

  1. if ( !function_exists( 'optionsframework_media_scripts' ) ) { 
  2. require_once '/inc/options-media-uploader.php'; 
  3.  
  4. // The hook. 
  5. $hook = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = optionsframework_media_scripts($hook); 
  9.  

Defined (1)

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

/inc/options-media-uploader.php  
  1. function optionsframework_media_scripts( $hook ) { 
  2.  
  3.  
  4. if ( 'appearance_page_' . $menu['menu_slug'] != $hook ) 
  5. return; 
  6.  
  7. if ( function_exists( 'wp_enqueue_media' ) ) 
  8. wp_enqueue_media(); 
  9. wp_register_script( 'of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/media-uploader.js', array( 'jquery' ) ); 
  10. wp_enqueue_script( 'of-media-uploader' ); 
  11. wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array( 
  12. 'upload' => __( 'Upload', 'options_framework_theme' ),  
  13. 'remove' => __( 'Remove', 'options_framework_theme' ) 
  14. ) );