ninja_forms_register_sidebar_options

The Ninja Forms ninja forms register sidebar options function.

Description

ninja_forms_register_sidebar_options( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'ninja_forms_register_sidebar_options' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/register.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = ninja_forms_register_sidebar_options($args); 
  9.  

Defined (1)

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

/deprecated/includes/register.php  
  1. function ninja_forms_register_sidebar_options( $args ) { 
  2. global $ninja_forms_sidebars; 
  3.  
  4. extract( $args ); 
  5.  
  6. foreach( $args['settings'] as $setting ) { 
  7.  
  8. $defaults = array( 
  9. 'desc' => '',  
  10. 'display_function' => '',  
  11. 'help' => '',  
  12. 'name' => '' 
  13. ); 
  14.  
  15. $slug = $setting['name']; 
  16.  
  17. // Parse incomming $setting into an array and merge it with $defaults 
  18. $setting = wp_parse_args( $setting, $defaults ); 
  19.  
  20. foreach( $setting as $key => $val ) { 
  21. $ninja_forms_sidebars[$page][$tab][$sidebar]['settings'][$slug][$key] = $val; 
  22.