WordPress action hook
cmb2_save_options-page_fields
Fired by 3 WordPress plugins, running on 20K+ sites between them.
How to use cmb2_save_options-page_fields
It's an action: your callback runs at that point and receives 4 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'cmb2_save_options-page_fields', function( $object_id, $cmb_id, $updated, $cmb ) {
// Your code runs here.
}, 10, 4 );Argument names come from MP3 Audio Player's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
3 plugins that fire cmb2_save_options-page_fields
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
MP3 Audio Player20,000+ installs
do_action( 'cmb2_save_options-page_fields', $object_id, $cmb->cmb_id, $cmb->updated, $cmb )admin/library/Shortcode_Button/lib/class-shortcode-button.php:369 -
Wp Maps30+ installs
do_action( 'cmb2_save_options-page_fields', $object_id, $cmb->cmb_id, $cmb->updated, $cmb )admin/includes/CMB2-Shortcode/shortcode-button.php:323 -
story|ftw10+ installs
do_action( 'cmb2_save_options-page_fields', $object_id, $cmb->cmb_id, $cmb->updated, $cmb )includes/libraries/shortcode-button/shortcode-button.php:323
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.