You can with filter.
On your plugin :
$value = 0;
$value = apply_filter('get_value_from_function', $value);
Then on functions.php
add_filter('get_value_from_function', 'my_special_value_treatment', 10, 1);
function my_special_value_treatment ($value){
return 1;
}
Related Posts:
- Edit plugin without hooks in functions.php
- Failed to invoke other hook from the init hook
- How can I filter blog name?
- Determine plugin name from within plugin_action_links filter
- merging an array to an existing array using add_filter
- Get Time Taken By Each Action Hook in WordPress
- Add hook after content without formatting
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I edit post data before it is saved?
- How to only hook on Single.php after content?
- Customizing subject in comment notification e-mails
- How to save the values of checkbox to the register setting?
- Using add_filter inside another class
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- Hide WordPress Plugin Deactivation Links
- Built in admin ajax hooks?
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- Adding dynamic section to WordPress
- do_action and hook methods
- why does the add_action(‘the_content’) overwrite my page
- Fatal error: Class not found in
- Is it possible to add an action to the currently running action?
- How to filter content post only on save
- Filter or action hook to insert content on admin pages before tag
- Showing Notifications While Activating Plugin
- plugin_action_links_{$plugin_file} hook not in the main plugin file
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- Add Fields with Sub-Fields to WP Job Manager
- How to prevent action in ajax request, when in admin side?
- template_redirect not being called when using ajax
- publish_post plugin hook doesn’t always pass $post->post_content
- What are the benefit in adding hook in the init() hook?
- Reposition Woocommerce Message
- 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
- Pass info from functions.php to plugin
- Change permalink structure hidden button edit
- How to pull code snippet from functionality plugin?
- How do action and filter hooks understand where to look for the core function that we hooked our function to them
- Any hook for pre-plugin-update -either bulk or single plugin update
- How to find the origin of a file upload from within wp_handle_upload?
- How to get all of the activate_plugin action parameters?
- Modifying the comments section through a plugin regardless of theme
- Using a post-signup hook to get user details
- White page by using filter template_include
- Create a navbar filter that filters by a custom field
- Passing an array from shortcode-function to filter-function
- Filtering WooCommerce Orders by Category
- do_action() hook into load-(page)
- Howto check version of another plugin and then add a submenu page to it
- Proper way to replace the_content only for pages created by custom plugin
- add_filter doesn’t work
- Add sub menu page in your plugin
- Check if variable is set in filter
- remove_action not removing add_action from constructor
- How to use filter to disable adding a product to wishlist?
- Save user total active time after login in wordpress [closed]
- WordPress: Add custom add_filter for custom functions
- wp_loaded with static Singleton
- is it possible to hook every page style?
- Add a function call after content automatically?
- what is the point of telling add_filter how many parameters you want passed to the function?
- How to add filter for wordpress plugin?
- How to use add_action for multiple instances of the same class
- How to hook into action/filter call
- using wp_footer hook in a plugin
- How to append new form elements in “Add New” form of Users in WordPress admin panel?
- How to automatically activate users after registration without activation email?
- Want to create custom design of progress indicator in wpforms
- Use a hook or filter, or overwrite this Gamipress function?
- admin_post hook not firing function inside class
- Unpublished Pages Failing To Appear On Custom Path
- Randomize post (and page) IDs on generation
- When/where would want to attach other classes to the base class in a WordPress plugin?
- Plugin function in child theme
- Use action, filter, or hook to append HTML to WordPress plugin function
- Passing function into add_action always returns the first argument
- Hook to display element as product on category page
- Remove action added in plugin class from theme
- Using multi-dimensional array with filter
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- Can I add content before post content without using the_content filter
- plugin not hooking to my custom hook
- Why can’t I shove an instance of a class into a variable from a do_action hook?
- Passing a parameter to filter and action functions
- shortcode which is introduced into entry the blog, and appears in side bar
- Plugin hook breaks new WP 4.0 media library grid view?
- Plugin Hook: Get posts
- Display_rows() and column_cb() strange behaviour
- add query string to all pages after user logged in
- How wordpress plugin hooks works? [duplicate]
- Post curl function save twice using plugin hook function wordpress
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- Suitable hook when creating, updating and deleting posts programmatically
- is_user_logged_in() undefined at shutdown in plugin context