The tag has no wiki summary.

learn more… | top users | synonyms

40
votes
2answers
23k views

Uninstall, Activate, Deactivate a plugin: typical features & how-to

I'm making a wordpress plugin. What are typical things I should include in the uninstall feature? For example, should I delete any tables I created in the install function? Do I clean up my option ...
8
votes
3answers
10k views

How To Activate Plugins via Code?

If possible, how can installed plugins (meaning the files have been placed in wp-content/plugins directory) be activated from other plugins?
3
votes
1answer
137 views

Using wp_cron with custom time interval and the register activation hook

Scenario 1: fails Adding a cron task wp_schedule_event with a custom interval on plugin activation using register_activation_hook outside the class definition fails to work because the custom ...
6
votes
4answers
3k views

Import Wordpress XML File from Within Functions.php

I am developing a theme which has a different method of adding in content and so, the default install of Wordpress won't show any content because of this. I was wondering if it is possible to ...
2
votes
3answers
3k views

Customizing wp-activate.php

Does anyone know how I can customise wp-activate.php? It wraps the content in <div id="content" class="widecolumn">, however in my theme the main wrapper is <div id="main"> Presumably, I ...
2
votes
3answers
1k views

Multisite: setting theme and options when a new blog is created

When a new blog is created in a WP Multisite instance I want to be able to set the default theme and configuration options create 2 menus (main and secondary) and associate them with the 2 slots ...
1
vote
3answers
2k views

Problem creating a table with dbDelta

I'm working on a plugin that was creating a table successfully. However, I decided to test it in a fresh install of Wordpress (on my local server) and now the table is not being created in my ...
1
vote
1answer
159 views

Remote plugin activation hook

I am remote activating plugins using update_option('active_plugins,'some_plugins'); It works fine except one thing: if some plugins have to create some tables using ...
0
votes
0answers
44 views

Activate Plugin which is in subfolder?

I try to activate the plugin inside the plugin folder is possible ? I am adding the absolute path of the plugin as something like I have a folder as main file and subfolder contain another plugin ...
1
vote
1answer
154 views

Force plugin to fail activation

I'm writing a plugin that will be using custom fields added by a theme. Because of this, it would be ideal if my plugin not be able to activate should these fields not exist. How do I go about ...