Actions and Filters don't fire in wordpress.com sites
-
Just trying to clarify something I cannot find an answer to online.
I’ve developed a WordPress plugin that uses Actions and Filters. One of which is a redirect that prevents non administrators from accessing the Dashboard.
In this example, we use the have a function that hooks into ‘init’. This works without issue on wordpress.org (own installs). However, when a user installs our plugin on their WordPress.com website, this action is bypassed and does not fire.
Can you confirm or provide a link that explains why certain Filters and Hooks do not fire on wordpress.com sites vs self hosted wordpress.org sites.
Thank you :)
-
Hi there,
Do you mean on a WordPress.com Business Plan site? Although Business Plan sites with us can install plugins, they still have some restrictions that don’t exist for stand-alone WordPress installations, so you are most likely running into one of those.
In this case, access to the dashboard on Business Plan sites are still based on a person’s WordPress.com username account, and they only access the dashboard via the Jetpack plugin’s SSO feature. It’s not possible to create and manage accounts specific to the site for users in the dashboard itself (for example, you cannot change a user on the site’s username, email or password for them – only the user themselves can do it via their WordPress.com account settings), and plugins that rely on directly editing user accounts on the site won’t work.
This forum is for end-users and staffed primarily by volunteers. The staff here, like myself, also aren’t developers, so for future development-related questions, please use our developer contact form instead, here:
-
Thanks Kokkieh,
Do you know where there is a list of the restrictions, if there is one?
Thanks for the confirmation. I’ll be sure to use the Developer contact form next time.
:)
-
The only documentation we have for now is this:
https://en.support.wordpress.com/plugins/adding-plugins/#incompatible-plugins
However, we are working on more detailed documentation and guidelines for making plugins compatible with the WordPress.com/Calypso interface for our developer site. I cannot give a timeline when those will be available, though.
- The topic ‘Actions and Filters don't fire in wordpress.com sites’ is closed to new replies.