The activation tag has no wiki summary.
24
votes
2answers
12k 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 ...
0
votes
0answers
17 views
Plugin De/Activation Not Firing On MultiSite install
I have a very rudimentary plugin in development, but at the point of needing to enable the register_activation_hook() and register_deactivation_hook() I have stalled. I am getting zero output from ...
0
votes
0answers
19 views
admin_notices not working on plugin activation
The class "My_Plugin" initializes my plugin and the class "My_Plugin_Notices" is supposed to output various admin notices with its methods.
I set the property "admin_notices" in "My_Plugin" as an ...
4
votes
4answers
238 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 ...
0
votes
2answers
47 views
How to check if a theme is active?
I'd like to be able to check if the twentytwelve theme is active. I know if I was checking for an active plugin I'd do something like:
$active_plugins = apply_filters( 'active_plugins', get_option( ...
1
vote
1answer
31 views
register_activation_hook with include file [closed]
I'm yanking my hair out with the following code, please help.
I have 3 files.
File1.php:
Class File1 {
public function file1_register() {
//register some short codes;
}
public ...
0
votes
1answer
39 views
How do you disable account activation in WPMU and then log the user in right away?
Is there a way to disable account activation for WPMU then log the user in and redirect them to another page?
I am running on WPMU with BuddyPress.
0
votes
1answer
299 views
Add Link Category on Activation?
Is it possible to add a link category on plugin activation?
What I mean is the Links section, as you know by default it has the Blogroll link category. I want to add a new link category when my ...
3
votes
1answer
243 views
Redirect after User Activation
I am using BuddyPress 2 registration and activation for three different sites with my own registration form.
To know where the user has registered, I add the user meta key registered_from at ...
0
votes
1answer
63 views
register_activation_hook in oop approach
I tried to develop a plugin in OOP approach.
I tried to load all the function needed inside the constructor class e.g action hooks. The problem is this hook "register_activation_hook". It wont load ...
1
vote
2answers
70 views
The plugin generated x characters of unexpected output, $wpdb not defined
I've written a simple Wordpress plugin to create a new database table.
The new table ought to be created when the plugin is activated.
When I try to activate the plugin, I get the following error:
...
3
votes
3answers
305 views
Viewing output when the “The plugin generated x characters of unexpected output during activation” error is triggered
I'm working on a plugin and having some difficulties getting a new table created. I get the "The plugin generated x characters of unexpected output during activation" error. Is there a way of viewing ...
1
vote
1answer
89 views
Override pluggable functions in a plugin?
WordPress has a file called pluggable.php which contains a list of functions you can override in your plugin.
The problem I am facing (I am overriding wp_authenticate) is for each blog in my network ...
0
votes
1answer
57 views
why i cannot see some plugins while they are enabled on network admin page?
i am using WPMU 3.3.1, i have some plugins enabled but why i cannot see them in some wordpress panel, it is confusing, but these plugins may take effect to these blogs, it is really strange to take ...
5
votes
3answers
101 views
Prevent network activation of plugin
I have a plugin that currently doesn't support network activation. The best fix for this of course is to fix it :) which I plan to do. However I wonder if there is a temporary solution I can use to ...
0
votes
2answers
33 views
I have no images in an activated wp theme
With this line everything works fine - (as a Non-Wordpress index.php):
<link href="style.css" rel="stylesheet" type="text/css"/>
When I activate the file as a wp theme and replace above ...
2
votes
3answers
641 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 ...
3
votes
2answers
329 views
Show a confirm message before plug-in activation
I want to display a message when the user try to activate my plugin. This message will ask if him really wants to activate the plugin or, if him change his mind, cancel the activation. How can I ...
1
vote
0answers
59 views
Plugin Activation Problem [closed]
I am trying to activate a plugin on my install of WordPress 3.4.2.
It works okay. It says Plugin activated, but below the plugin is not activated.
It does the same for all plugins, including Hello ...
6
votes
3answers
5k 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?
0
votes
1answer
98 views
How to add custom menu item on plugin activation?
When my plugin is activated, I would like to add a new menu item. Here is my code:
class My_Plugin {
function __construct() {
register_activation_hook(__FILE__, array($this, 'install'));
}
...
2
votes
1answer
266 views
How to manually activate user in dashboard only by admin
I'm looking for a function that allows admins (only) to activate new users. When a user registers he have to be approved by the admin before he gets access to log in.
Does anyone know how I can do ...
1
vote
2answers
38 views
Comments deactivated
I can't write comments to new articles (no add comment link available). I use Wordpress 3.4.
I checked the discussion properties and they are set to
allow guests to comment articles
none of the ...
1
vote
3answers
1k 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 ...
0
votes
2answers
63 views
How to cancel redirection to admin side
My friend asked me to activate a site that someone else did it. The problem is that when I try to run it, and I go to mysite.com I arrive to mysite.com/wp-login.php?redirect_to=/
Where and how can I ...
0
votes
1answer
157 views
Default Plugin Settings Not Writing to Database
I have my plugin setup as such:
Main plugin file mouldings.php
<?php
/*
Plugin Name: Moulding Profiles
Plugin URI:
Description: Creates a 'Moulding Profiles' and 'Idea Gallery' custom post ...
2
votes
3answers
507 views
Does wordpress create activity, update logs?
Does wordpress create any dated logs of activity?
ie core updates, plugin download dates etc?
0
votes
1answer
84 views
Add update services on theme activation
I want add update services when I activate my theme, how to do this ?
with an hook like enable_update_services_configuration ?
Thanks in advance
0
votes
1answer
71 views
My plugin does not install correctly if a previous version is still installed
My plugin only installs correctly if the user first deactivates and then deletes a previously installed version. If they do not delete the previous version, the installation either does not complete ...
1
vote
1answer
134 views
is_plugin_active() not properly returning true
I have a plugin activated and working, and I installed and activated another plugin I wrote to communicate with it. However when I run is_plugin_active() I get false returned - does anyone have any ...
0
votes
2answers
114 views
Only allow plugin to be activated on root site of multisite
I'm developing the wordpress file monitor plus plugin.
Its purpose is to scan for altered files and it works fine for a single installation of WP. But when you look at multi-site it's not something ...
0
votes
1answer
82 views
Is there existing plugins to “Click-to-Launch” embedded Flash / SWF content?
I'm aware that there is existing FlashBlock plugins that users can install on their browsers, but I would like a Wordpress approach to be able to:
Replace SWF content by a thumbnail / screenshot of ...
0
votes
2answers
286 views
rewrite_rules() not applying rules on plugin activation only after permalinks menu is clicked
thanks to Roman for pointing me in the right direction my plugin is almost ready. The only problem i am now facing is that i cannot get the rewrite_rules applying on activation they only work after i ...
0
votes
1answer
211 views
Auto add content such as pages upon plugin activation?
I'm creating my first plugin and it requires some pages with content to functionally work properly.
I was wondering if it is possible to show a message like "Click here to automatically add the ...
3
votes
1answer
473 views
Inserting Taxonomy Terms During a Plugin Activation?
I've been trying various ways of doing this. Basically, I've been trying to make it so that a plugin of mine populates the terms of a taxonomy only once during the plugin's activation. The term ...
0
votes
1answer
957 views
Buddypress send admin notification email when new subscriber registers
I am running a Buddypress site, but I am not getting emails when a new subscriber registers. I have used a code in my functions.php that removes the activation email the user would receive (I want ...
0
votes
1answer
273 views
Automatically delete default posts and pages on theme install?
Is there a way to automatically delete the default wordpress posts and pages when activating theme theme?
1
vote
1answer
603 views
How to output message during plugin activation
I am developing a plugin, but during the activation phrase I am constantly facing bugs. However there is no easy way to display error messages, since echoing stuff would result in 'unexpacted output' ...
1
vote
3answers
863 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 ...
0
votes
1answer
121 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 ...
0
votes
1answer
106 views
Deactivate plugin on registration
I'd like to check if the server is running PHP5.2. To do this, I use a activation-hook which will be registered with "register_activation_hook". Instead of just returning a warning, i'd like to ...
2
votes
1answer
265 views
Pluggable function and activation check?
Plugin is defining pluggable wp_mail() function. My idea was to check if function is defined already and throw warning if other plugin beat me to it.
However this warning causes issues on activation. ...