beans_register_wp_customize_options

Register WP Customize Options.

This function should only be invoked through the ‘customize_register’ action.

beans_register_wp_customize_options( $fields, $section, $args = array() )

Source

function beans_register_wp_customize_options( array $fields, $section, $args = array() ) {

	/**
	 * Filter the customizer fields.
	 *
	 * The dynamic portion of the hook name, $section, refers to the section id which defines the group of fields.
	 *
	 * @since 1.0.0
	 *
	 * @param array $fields An array of customizer fields.
	 */
	$fields = apply_filters( "beans_wp_customize_fields_{$section}", _beans_pre_standardize_fields( $fields ) );

	// Stop here if the current page isn't concerned.
	if ( ! is_customize_preview() ) {
		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_PATH . 'wp-customize/class.php' );

	new _Beans_WP_Customize( $section, $args );

}