yit_plugin_panel_menu_page_capability

The YITH WooCommerce Wishlist yit plugin panel menu page capability hook.

Description

apply_filters( 'yit_plugin_panel_menu_page_capability', (unknown) $current_user_can ); 

Parameters (1)

0. $current_user_can (unknown) => current_user_can( 'manage_options' )
The current user can.

Usage

To run the hook, copy the example below.
  1. $current_user_can = apply_filters( 'yit_plugin_panel_menu_page_capability', $current_user_can ); 
  2.  
  3. if ( !empty( $current_user_can ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the yit_plugin_panel_menu_page_capability callback 
  2. function filter_yit_plugin_panel_menu_page_capability( $current_user_can ) { 
  3. // make filter magic happen here... 
  4. return $current_user_can
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'yit_plugin_panel_menu_page_capability', 'filter_yit_plugin_panel_menu_page_capability', 10, 1 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'yit_plugin_panel_menu_page_capability', 'filter_yit_plugin_panel_menu_page_capability', 10, 1 ); 

Defined (1)

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

/plugin-fw/lib/yit-plugin-panel.php  
  1. apply_filters('yit_plugin_panel_menu_page_capability', current_user_can( 'manage_options' )) && add_menu_page( 'yit_plugin_panel', 'YITH Plugins', 'manage_options', 'yit_plugin_panel', NULL, YIT_CORE_PLUGIN_URL . '/assets/images/yithemes-icon.png', $position );