ddw_gftb_add_gfsettings

Hook in our plugin's settings page also on the Gravity Forms settings page as a sub page.

Description

ddw_gftb_add_gfsettings(); 

Usage

  1. if ( !function_exists( 'ddw_gftb_add_gfsettings' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'gravity-forms-toolbar/lib/gftb-admin-settings.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ddw_gftb_add_gfsettings(); 
  7.  

Defined (1)

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

/lib/gftb-admin-settings.php  
  1. function ddw_gftb_add_gfsettings() { 
  2.  
  3. if ( is_admin() && class_exists( 'RGForms' ) ) { 
  4.  
  5. global $pagenow; 
  6.  
  7. $gftb_gf_settings_string = array( 
  8. 'name' => 'Toolbar', //__( 'Toolbar', 'gravity-forms-toolbar' ),  
  9. 'tab_label' => _x( 
  10. 'Toolbar',  
  11. 'Translators: Settings (sub) title within Gravity Forms settings page',  
  12. 'gravity-forms-toolbar' 
  13. ),  
  14. 'handler' => 'ddw_gftb_options_page',  
  15. 'icon_path' => '' 
  16. ); 
  17.  
  18. RGForms::add_settings_page( 
  19. $gftb_gf_settings_string,  
  20. '' 
  21. ); 
  22.  
  23. /** Add & display message on saving options */ 
  24. if ( ( isset( $_GET[ 'subview' ] ) && 'Toolbar' == $_GET[ 'subview' ] ) 
  25. && isset( $_GET[ 'settings-updated' ] ) 
  26. ) { 
  27.  
  28.  
  29. } // end if 
  30.  
  31. } // end if 
  32.  
  33. } // end of function