This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$metabox_group_id = 50; | |
add_action( "rwmb_{$metabox_group_id}_after_save_post", function( $object_id ) { | |
// STEP: get the variables we want to override from the settings page. | |
$primary = rwmb_meta( 'test_primary_color', ['object_type' => 'setting'], 'test_client_dashboard'); | |
error_log( sprintf( '%s: primary %s', 'my action handler', $primary ) ); | |
$new_vars = array( | |
'color-primary' => $primary | |
); |