learndash_metabox_save_fields

apply_filters( 'learndash_metabox_save_fields',  array $settings_field_updates,  string $settings_key,  string $settings_screen_id )

Filters settings meta box save fields.


Description #


Parameters #

$settings_field_updates

(array) An array of setting fields data.

$settings_key

(string) Settings key used as option name while saving settings.

$settings_screen_id

(string) Settings screen ID.


Source #

File: includes/settings/class-ld-settings-metaboxes.php


Examples #

 <?php
/**
 * Example usage for learndash_metabox_save_fields filter.
 */
add_filter(
	'learndash_metabox_save_fields',
	function( $settings_field_updates, $settings_key, $settings_screen_id ) {
		// May add any custom logic using $settings_field_updates, $settings_key, $settings_screen_id.

		// Always return $settings_field_updates.
		return $settings_field_updates;
	},
	10,
	3
);