* as a delimiter. Default false. * @type array $attributes An array of attributes to add to the field. The array key defines the * attribute name and the array value defines the attribute value. Default array. * @type mixed $default The default field value. Default false. * @type array $fields Must only be used for 'group' field type. The array arguments are similary to the * {@see beans_register_fields()} $fields arguments. * @type bool $db_group Must only be used for 'group' field type. It defines whether the group of fields * registered should be saved as a group in the database or as individual * entries. Default false. * } * @param string $section The WP customize section to which the fields should be added. Add a unique id * to create a new section. * @param array $args { * Optional. Array of arguments used to register the fields. * * @type string $title The visible name of a controller section. * @type int $priority This controls the order in which this section appears * in the Theme Customizer sidebar. Default 30. * @type string $description This optional argument can add additional descriptive * text to the section. Default false. * } * * @return bool True on success, false on failure. */ function beans_register_wp_customize_options( array $fields, $section, $args = array() ) { $fields = apply_filters( "beans_wp_customize_fields_{$section}", _beans_pre_standardize_fields( $fields ) ); // Stop here if the current page isn't concerned. if ( !class_exists( 'WP_Customize_Manager' ) ) return; // Stop here if the field can't be registered. if ( !beans_register_fields( $fields, 'wp_customize', $section ) ) return false; // Load the class only if this function is called to prevent unnecessary memory usage. require_once( BEANS_API_COMPONENTS_PATH . 'wp-customize/class.php' ); new _Beans_WP_Customize( $section, $args ); }