Plugin won’t activate – cannot declare class (already in use)

Because WordPress already have class named Request https://developer.wordpress.org/reference/classes/requests/ When creating a plugin or using boilerplate to generate, you should add prefix for your plugin name/class name, or avoid using very basic name. Example: class Wpse309780_Request { function __construct(argument) { # code… } }

Multisite installation but do plugins always have to be multisite compatible?

They shouldn’t have to be multisite compatible. Also remember that, there are two kinds of Passive compatibility: doing nothing multisite specific, just works without breaking anything. Active compatibility: changing or extending multisite specific behavior. In case the plugin you want to use doesn’t say anything about its compatibility on multisites, you just have to try … Read more

Mouse Wheel Anchor Scrolling on WordPress [closed]

If you’re developing a custom theme, then you could perhaps take a look at pagePiling.js on GitHub. I bumped into this js library some time ago and I think you should be able to achieve the effect you’ve described with it. Some pagebuilder plugins might have a similiar feature incorporated in them, but I’m not … Read more

Prevent WordPress plugin from connecting to its server

If you have access to your /etc/hosts file you can add api.plugindata.com 127.0.0.1 or api.plugindata.com localhost to route all traffic going to api.plugindata.com to your own machine. If you don’t have access to the file you can also search in the plugin source code where this domain occurs and either comment the code or maybe … Read more

Add custom variable in Contact Form 7 mail body

You should do it like so: add_action( ‘wpcf7_init’, ‘custom_add_form_tag_my_source’ ); function custom_add_form_tag_my_source() { // “my-source” is the type of the form-tag wpcf7_add_form_tag( ‘my-source’, ‘custom_my_source_form_tag_handler’ ); } function custom_my_source_form_tag_handler( $tag ) { return isset( $_COOKIE[‘my_source’] ) ? $_COOKIE[‘my_source’] : ”; } See the documentation for more details. Or you can also try this, to parse regular … Read more

Can a manually uploaded plugin be made to track updates from the WordPress.org plugin directory?

As long as everything was made according to WP best practices all your manually installed versions will update the same as the ones installed from wordpress.org. The updater looks at many things to identify your plugin. However, the most important is the plugin URI (you can change the directory of many plugins and they will … Read more