Custom Fields
Support MB Settings Page mb_settings_page_load on save only not working

  • Creator
  • #27533
    Resolved wgstjf

    Hi guys,

    Hopefully a quick one for you.

    We're trying to update an option only on save of a MB settings page. Following the documentation we've got it setup as follows:

    add_action( 'mb_settings_page_load', function ( $args ) {
      if ( $args['id'] === 'json-settings' ) {
          $set_output_settings_updated_timestamp = update_option('settings_last_updated', current_time( 'mysql' ));
    }, 20 );

    Whatever priority we set (tried up to 9999) the value still updates on load rather than on save. Can you help? What could be causing the default behaviour to not work as it should?

    Metaboxes being initiated using the following:

    add_filter( 'rwmb_meta_boxes', 'indigo_options_meta_boxes',999 );



Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.