Okay, it turns out that I was missing a tiny little number in the add_filter command. The line:
add_filter( 'the_content', array( &$this, 'after_content' ));
should be:
add_filter( 'the_content', array( &$this, 'after_content' ), 12);
And now all works. The array is accessible inside the filter-function. This number is a priority variable: https://developer.wordpress.org/reference/functions/add_filter/, but if anyone will add a comment on the usefulness of it, please do so.
Related Posts:
- Where is the best place to use add_filter
- Edit plugin without hooks in functions.php
- Using add_filter inside another class
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Pass A Value From Outside To A Plugin Variable
- Failed to invoke other hook from the init hook
- How can I filter blog name?
- Custom preview_post_link not working for draft post
- Add Fields with Sub-Fields to WP Job Manager
- Determine plugin name from within plugin_action_links filter
- merging an array to an existing array using add_filter
- Creating a plugin to sanitize comment and the url field before display only
- How to find the origin of a file upload from within wp_handle_upload?
- White page by using filter template_include
- How to check current user before all actions and filters?
- Create a navbar filter that filters by a custom field
- Get Time Taken By Each Action Hook in WordPress
- qTranslate remove default directory from link
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Proper way to replace the_content only for pages created by custom plugin
- add_filter doesn’t work
- Redirect to another page using contact form 7? [closed]
- Check if variable is set in filter
- Check filter defined or not?
- 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 append new form elements in “Add New” form of Users in WordPress admin panel?
- Want to create custom design of progress indicator in wpforms
- Add hook after content without formatting
- Using OR Condition with facetwp facets
- 500 Internal server error wp_handle_upload_prefilter
- Nested Actions and Filters
- Remove action added in plugin class from theme
- Using multi-dimensional array with filter
- Can I add content before post content without using the_content filter
- WordPress Add advertising ads befor and after content with periority [closed]
- trying to create simple plugin to filter categories from all authors
- shortcode which is introduced into entry the blog, and appears in side bar
- How do i get all author posts on custom post type list
- 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
- How can we extent core/group or cover block?
- Which file of wordpress manage plugins functionalities?
- How can i create page through plugin
- I should enable automatic updates?
- How to add custom table style for table block in gutenberg editor
- Custom license for WordPress plugin
- Does using `add_action( ‘init’…` cause performance issues?
- How to write “alt” tag in image for wordpress code?
- Passing stored variables to add_filter
- Issues with a WP plugin menu system
- Different custom templates for product category [closed]
- How to create plugin/ page that reads from database
- Add a “View all” button on WooCommerce product archives pages
- How do I add an options page at the bottom of the list?
- Plugin not properly prepared for localization
- WordPress Active Plugins
- is it possible to hook every page style?
- Redirect logged in user to somepage on every page view?
- A question of etiquette when forking a plugin? [closed]
- how to request a script more than once in wordpress
- Adding a jQuery modal dialog to the admin area
- Excluding specific post from custom next/previous theme function
- How to make a Product page without ordering and database
- wp_options not returning value for logged out users?
- Gutenberg default attributes are empty when accessing in edit
- Cannot run script properly with my custom plugin
- Cookie value changes back to previous value after changing
- Hide all Admin Notices and move on a separate page
- Is it okay to make a plugin to the WordPress repo, but limit it’s actions to maximum N events?
- Highlight admin menu items that are parent of existing core items
- Adding shortcodes to multiple pages with function
- SASS not showing in customized preloader plugin
- Getting all woocommerce products from REST API call in plugin
- AJAX update fails for public/non-admin users
- Get a list of Product Categories inside a loop
- WordPress Product Detail and catalog
- Can you develop themes and plugins while using the hosting services BlueHost? [closed]
- WordPress plugin changes not updating
- wordpress ajax pagination object value does not change
- Google analytic issue in wordpress
- Passing a parameter to filter and action functions
- Create Database Tables on Plugin Activation hook
- What’s the preferred method of writing AJAX-enabled plugins?
- Change page according to fetched GET Parameters
- Shortcode registered from a plugin not recognized
- How to change a specific page to custom page?
- wp_update_post call really slow when official Facebook plugin is installed
- Simply Exclude – Category feed exclusion is excluding from category feed instead of just the main feed
- How to change response of admin-ajax request?
- Plugin keeps saying needs to be updated and it’s in a constant loop [closed]
- How use Dynamic hyperlink on each wordpress post?
- _e in wordpress +
- WordPress Code Access to Restricted Content without Registration
- Plugin version number after code rewrite [closed]
- How can I make my plugin detect if a certain theme is active?
- Plugin Block at the backend of every page or post
- Pulsing circle before the post title (Breaking news flash)
- How to add a react element into the DOM node (only on the user-interaction like on click) without using the state?