You don’t echo content from a filter, you return it. You should have:
function addOptions($post_id){
$post = get_post($post_id);
return $post_id;
}
add_filter('mbdb_book_grid_after_link','addOptions');
Related Posts:
- 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?
- Why does wp_enqueue_style() in plugin not load stylesheet?
- Preventing a plugin from updating
- Customizing subject in comment notification e-mails
- WP showing “warning: call_user_func_array()”, What to do?
- Modify featured image URL at runtime
- Which hook should be used to validate custom form fields on the login form?
- Hook (upgrader_process_complete) running moment
- Adding dynamic section to WordPress
- why does the add_action(‘the_content’) overwrite my page
- Fatal error: Class not found in
- woocommerce product attributes
- 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
- Put code into body tags near top, using a plugin
- merging an array to an existing array using add_filter
- template_redirect not being called when using ajax
- How to add rewrite rules and pagination to retrieve attachments files?
- Hook before & after plugin / core update
- Plugin custom Action Hook not working
- What are ideal hooks to call register_sidebars?
- AddFilter option_active_plugins is executed 6 times. Why?
- get_plugins() doesn’t work after plugins_loaded
- Hook to generate a dynamic sitemap with “All in One SEO Pack” Plugin
- add_action in functions.php, do_action in plugin?
- How to correctly detect accessing wp-content/uploads?
- Deactivate Plugin on Theme Switch
- Are there hooks for WordPress updates?
- Plugin activation hook in an abstract class
- How to pull code snippet from functionality plugin?
- Is there an earlier hook than login_head or login_enqueue_scripts?
- Gravity Forms plugin: How to use “gform_editor_js” action hook? [closed]
- Using a post-signup hook to get user details
- Map a custom id to wordpress post id
- woocommerce_package_rates not fired when wordpress woocommerce accessed as non ajax
- Trigger Elementor Popup via code [closed]
- Calling plugin function inside custom plugin for onclick event
- 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
- Add sub menu page in your plugin
- how to change automatic placing of social plugins below content?
- Deactivate JS Script in Plugin Shortcode
- Turning on output buffering in a wordpress plugin
- Are there action hooks for comments?
- How to use template_include hook with form submission?
- What are admin hooks
- WooCommerce: after install hook
- wp_trash_post hook – problem with page updating if using wp_die
- Function added to hook “new_to_publish” not executing – custom plugin
- is it possible to hook every page style?
- Comment Approve – Add custom function when comment is approved
- Add action to custom Function
- Hook on creating a menu entry?
- Prevent plug-in scripts on a specific template?
- using wp_footer hook in a plugin
- Plugin Hook When New Author Added
- Use a hook or filter, or overwrite this Gamipress function?
- Hook from plugin doesn’t fire up from external PHP script
- WordPress Custom Hook with Class method
- Fail on admin_enqueue_scripts when I try it to upload a CSS file to my WordPress Plugin
- How to remove a hook written with $this?
- Is there a hook similar to “save_post” which only fires AFTER the post is completely published?
- update_option_{$option} not working (do function after options are saved)
- Alternative Hook to the_content for Changing Background Color
- Unpublished Pages Failing To Appear On Custom Path
- add a hook of Woocommerce to a plugin but it only shows and doesn’t function properly
- save_post hook partly firing in update post
- ACF Fields are not showing up on Homepage
- Hooking into the HTML header container
- Hide WordPress Site URL from Source Code
- Show post object of any page in frontend
- When/where would want to attach other classes to the base class in a WordPress plugin?
- Plugin function in child theme
- Edit plugin’s HTML output with Hooks
- Use action, filter, or hook to append HTML to WordPress plugin function
- Hook to display element as product on category page
- Is it possible to disable a theme programmatically?
- {status}_{post_type} does not run correctly?
- Identify if the_post hook is being called from the admin post list
- Why can’t I shove an instance of a class into a variable from a do_action hook?
- Creating Custom Hook for my plugin
- Passing a parameter to filter and action functions
- WordPress hook source
- Manually return false for function_exists
- Plugin hook breaks new WP 4.0 media library grid view?
- Plugin Hook: Get posts
- Variable scope in plugin outside loop [closed]
- How to make plugin work in each template in wordpress
- Checking url from plugin [duplicate]
- WordPress Hooks : Where to place callbacks that repetitively yield the same effect?
- Suitable hook when creating, updating and deleting posts programmatically
- Change social icon in twenty twenty three theme
- is_user_logged_in() undefined at shutdown in plugin context
- Remove H1 title in admin post edit screen
- Similar hook to ‘init’ for when plugin page loads