I have changed the do_action() for a apply_filter(). This worked as follows:
// Filter save settings
$settings = apply_filters( 'gtp_theme_settings_tab_save', $settings, $tab, $_POST );
$updated = update_option( 'gtp_theme_settings', $settings );
And then my add_filter in plugin file looks like:
function ac_theme_settings_tab_save( $settings, $tab, $postdata ) {
if( $tab == 'adcalls' ) {
$settings['gtp_adcalls_domain_id'] = $postdata['gtp_adcalls_domain_id'];
}
return $settings;
}
add_filter( 'gtp_theme_settings_tab_save', 'ac_theme_settings_tab_save', 10, 3 );
Related Posts:
- Changing the “Plugin Activated” Message Default
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- Is There a WordPress Hook to Filter the Edit Posts View?
- Add section (add_settings_section) to a custom page (add_submenu_page)
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- When can you get current page ID and initialize hooks right after?
- Customizing subject in comment notification e-mails
- How to save the values of checkbox to the register setting?
- Edit plugin without hooks in functions.php
- How can I log a user out of WordPress before the page loads?
- Using the ‘draft_to_publish’ hook (post status transition)
- How do I only load a plugin js on it’s settings pages?
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Custom plugin settings: clicking “save changes” does not display success message
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- Pass A Value From Outside To A Plugin Variable
- Built in admin ajax hooks?
- Failed to invoke other hook from the init hook
- How can I add a custom meta value on file upload?
- Adding dynamic section to WordPress
- How can I filter blog name?
- Fatal error: Class not found in
- Is it possible to add an action to the currently running action?
- Filter or action hook to insert content on admin pages before tag
- Showing Notifications While Activating Plugin
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- Determine plugin name from within plugin_action_links filter
- How to prevent action in ajax request, when in admin side?
- merging an array to an existing array using add_filter
- template_redirect not being called when using ajax
- Placement of Code in Plugin for hooking `save_post`
- publish_post plugin hook doesn’t always pass $post->post_content
- What are the benefit in adding hook in the init() hook?
- add_action in functions.php, do_action in plugin?
- How to correctly detect accessing wp-content/uploads?
- add action for displaying posts using a shortcode
- ‘wp_login’ action hook not working with wp-login.php file
- Remove rewrite rules generated by plugin during deactivation
- How to pull code snippet from functionality plugin?
- Where (or when) should I register a new taxonomy?
- Any hook for pre-plugin-update -either bulk or single plugin update
- All Users > User List > Update User Meta Field Inline
- How to get all of the activate_plugin action parameters?
- Display update notification messages like ‘What’s New’
- How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
- Using a post-signup hook to get user details
- Get Time Taken By Each Action Hook in WordPress
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- How to set add question capability for author role in wp pro quiz plugin
- Howto check version of another plugin and then add a submenu page to it
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Adding CSS to custom post type admin page causes error
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Add sub menu page in your plugin
- How do I add some javascript validation to the admin interface form’s onsubmit?
- remove all submenus from plugin
- creating a plug in that would tap into save/update action of posts [closed]
- Hook for page Request?
- How do I add $_SESSION[”] to my wordpress page?
- How to use the CSS of the WordPress core in the development of my administration page?
- Save user total active time after login in wordpress [closed]
- wp_loaded with static Singleton
- is it possible to hook every page style?
- Quick press publish post hook
- using wp_footer hook in a plugin
- How to deactivate my plugin upon deactivation of NextGen
- Ajax request sends url rather than data
- How to add captcha to publish widget
- Adding a jQuery modal dialog to the admin area
- How to automatically activate users after registration without activation email?
- Creating a plugin that will display text on every page
- Activation flow of a plugin in a multisite environment
- Add hook after content without formatting
- How to create admin setting for this small plugin
- WC Fix Attributes – ‘Add New’ Not Searchable/Delayed
- admin_post hook not firing function inside class
- Hide all Admin Notices and move on a separate page
- The function called on the wp head hook becomes null
- When/where would want to attach other classes to the base class in a WordPress plugin?
- Passing function into add_action always returns the first argument
- Hook to display element as product on category page
- Echo custom admin field into a is_single()
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- Get content and send to 3rd party
- plugin not hooking to my custom hook
- Admin page and admin menu. Permissions plugin
- Plugin hook breaks new WP 4.0 media library grid view?
- Plugin Hook: Get posts
- Display_rows() and column_cb() strange behaviour
- How to create and use Custom hooks
- Checking url from plugin [duplicate]
- How wordpress plugin hooks works? [duplicate]
- Post curl function save twice using plugin hook function wordpress
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- Suitable hook when creating, updating and deleting posts programmatically
- Why is my activator class adding the files/running the actions I add?
- is_user_logged_in() undefined at shutdown in plugin context
- Display Any Field fromAdmin Panel in Frontend via Shortcode?
- Minimum PHP Required for WordPress
- WordPress Product Detail and catalog