ninja_forms_register_sidebar

The Ninja Forms ninja forms register sidebar function.

Description

ninja_forms_register_sidebar( $slug, $args ); 

Parameters (2)

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

Usage

  1. if ( !function_exists( 'ninja_forms_register_sidebar' ) ) { 
  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($slug, $args); 
  12.  

Defined (1)

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

/deprecated/includes/register.php  
  1. function ninja_forms_register_sidebar( $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. 'display_function' => 'ninja_forms_sidebar_display_fields',  
  9. 'name' => '',  
  10. 'order' => '',  
  11. 'save_function' => '',  
  12. 'settings' => '' 
  13. ); 
  14.  
  15.  
  16.  
  17. // Parse incomming $args into an array and merge it with $defaults 
  18. $args = wp_parse_args( $args, $defaults ); 
  19.  
  20. extract( $args ); 
  21.  
  22. foreach( $args as $key => $val ) { 
  23. $ninja_forms_sidebars[$page][$tab][$slug][$key] = $val; 
  24.