Plugins – WordPress Monsters

Tag: Plugins

Add custom tag to Contact Form 7

It can be used for pre-filled fields or custom functionality with filterning and updating values.

 

contact form 7 plugins

Change metabox priority in admin for Yoast Seo

 

contact form 7 plugins

Create plugin options page

There are a lot of ways to create options page in WordPress. This is one of them:

In callback function you can include a file with your options fields:

contact form 7 plugins

Override any class from plugin

If you faced with situation when plugins classes hardcoded some data, you can override those for your theme. The main condition is a presence of special function before that class:

After that you should copy a file with this class. Then you create yourself plugin for example: wpm-vk-override-class. Copy a file ( for ex. it is vk.php ) with class in a plugin directory. A plugin main file will be like this:

But there is a little problem, you will see a Fatal Error after activation:

To understand this situation we have to know how the WordPress saveing an activated plugins in DataBase. Go to wp_options table and find a field – active_plugins. Lets have a look on value of this field:

It is a serialised array. Lets unserialize it:

Here you can set an order of activated plugins. But for our situation the better move would be deactivate conflict plugin (main plugin where we got a class). For me it is – woo-social-login. After deactivation you can activate your own plugin. There will be no errors, you can be sure. And activate a main plugin at the end. That’s all! Now your functionality have been overrided successfully!

There are no known methods to do the same result in your theme. You can override it in theme only if the class located in parent theme.

contact form 7 plugins

Plugin Annotation

contact form 7 plugins