gl_add_plugin

The Google Locker for WordPress gl add plugin function.

Description

gl_add_plugin( $plugin_array ); 

Parameters (1)

0. $plugin_array
The plugin array.

Usage

  1. if ( !function_exists( 'gl_add_plugin' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-locker-for-wordpress/admin/init.php'; 
  3.  
  4. // The plugin array. 
  5. $plugin_array = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gl_add_plugin($plugin_array); 
  9.  

Defined (1)

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

/admin/init.php  
  1. function gl_add_plugin( $plugin_array ) { 
  2.  
  3. if ( !current_user_can( 'edit_posts' ) ) 
  4. return $plugin_array; 
  5. global $wp_version; 
  6.  
  7. if ( version_compare( $wp_version, '3.9', '<' ) ) { 
  8. $plugin_array[ 'g_locker' ] = G_LOCKER_PLUGIN_URL . '/assets/admin/js/g_locker.tinymce3.js'; 
  9. } else { 
  10. $plugin_array[ 'g_locker' ] = G_LOCKER_PLUGIN_URL . '/assets/admin/js/g_locker.tinymce4.js'; 
  11.  
  12. return $plugin_array;