ninja_forms_register_sidebar_option

The Ninja Forms ninja forms register sidebar option function.

Description

ninja_forms_register_sidebar_option( $slug, $args ); 

Parameters (2)

0. $slug
The slug.
1. $args
The args.

Usage

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

Defined (1)

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

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