Questions tagged [activation]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
57 views

How to store in the database directly the translation?

I would like to store my custom posts with the correct translation when the user activate the plugin. $a_custom_post = array( 'post_type' => "foo-page", 'post_status' ...
J.BizMai's user avatar
  • 810
1 vote
4 answers
3k views

How to create a page when a theme is activated?

I want my theme to have an 'about' page available by default when a user uses my theme. Is there a way to auto create a page when a user selects your template? Or some other way of achieving this?
Dr. Chocolate's user avatar
1 vote
1 answer
107 views

Force file download on plugin activation

I am writing a plugin and want to force users to download a file immediately when they activate the plugin. Here is the code that I've written so far but doesn't work. No fatal errors but gives ...
Dipak G.'s user avatar
  • 228
1 vote
0 answers
88 views

What is the correct way of updating wordpress options

I've added some codes to my theme's function so when I activated the theme, it will update the category base, permalinks, and post_per_page, and they worked perfectly fine. However, since I'm just ...
Archangel17's user avatar
3 votes
1 answer
13k views

Send activation email to user after signup [duplicate]

I would like to send an email to all users immediately after they signup that requires them to click a link inside that email to "activate" their email address. Ideally each user account would have ...
Josh's user avatar
  • 133
2 votes
1 answer
28 views

Cannot run the code after I activate the plugin

I wrote a plugin to write code into the wp-config.php – it should download a code file and add it to my wp-content. But I only can run the function manually. I want the plugin to run the function when ...
S.Y's user avatar
  • 21
0 votes
1 answer
27 views

On local machine can't log in or reset password but I can log in on the live version, user has activation key in database

I'm working on a local copy of a site that is online and I can't log in or reset password for my user and I can't figure out why. I can click to reset the password with the "forgot password" button ...
av0000's user avatar
  • 105
0 votes
1 answer
446 views

Unable to show a message after plugin activation

Based on: https://codex.wordpress.org/Plugin_API/Action_Reference/admin_notices My actual code class Activation { function __construct() { add_action( 'admin_notices', array($...
realtebo's user avatar
  • 257
1 vote
3 answers
4k views

Unable to activate wordpress importer after installing it

After installing wordpress importer from Tools option in wordpress, when I try to activate it, it gives fatal error. The relevant php code: class WXR_Parser { function parse( $file ) { //...
Rahul's user avatar
  • 229
2 votes
1 answer
977 views

Multisite: Activate plugin for subsites only?

For some plugins, I'm trying to activate only for subsites. Lets say the plugin is "Contact Form 7" and I need it activated only on subsites. If activate on Network Admin, it will activated on main ...
apasajja's user avatar
  • 191
1 vote
2 answers
6k views

why creating tables using $wpdb is not being executed while installing plugins?

This is the code below I am using to create a table when installing plugin. But, I tried many ways and for some reason it is not working. Is there any other efficient way of doing this? Please Help, ...
Allen Titan's user avatar
1 vote
1 answer
2k views

How to automate wordpress plugin activate and deactivate by php logic?

Is it possible to build logic to control the activation and deactivation of specific wordpress plugins , for example Activation/Deactivation triggered by time period? thanks for knowledge sharing.
BOBO's user avatar
  • 148
4 votes
2 answers
7k views

Login email after registration never sent or received

On my site, after a user registers they receive an email with an activation link. When clicking the activation link, sometimes the page doesn't load, sometimes it does (usually if I click the link ...
1.21 gigawatts's user avatar
5 votes
1 answer
2k views

__NAMESPACE__ with register_activation_hook

Im teaching myself namespaces and OOP in wordpress at the moment so bare with me. In the base of my plugin I'm loading activation and deactivation hooks. Currently the deactivation hook works but ...
orionrush's user avatar
  • 890
0 votes
1 answer
237 views

A question about register_activation hook

Looking at wp codex it says: The register_activation_hook function registers a plugin function to be run when the plugin is activated. I am finding this to be not entirely correct, for example i can ...
MartinJJ's user avatar
  • 1,994
1 vote
1 answer
933 views

Plugin Deactivate Self on Activation Errors

Hi I'm wondering if someone can point me in the right direction here. I'm having trouble figuring out how deactivate_plugins() works. I've been using variations of the below for awhile now and it's ...
Bryan Willis's user avatar
  • 4,289
1 vote
1 answer
535 views

Insert terms for custom taxonomy on plugin activation, or each page load (init hook)

Consider a plugin which adds a custom Taxonomy and then fills the taxonomy with a large term hierarchy (tens of hierarchical terms, may become hundreds in specific installations). I understand that ...
dotancohen's user avatar
1 vote
1 answer
2k views

WordPress user account activation

How do I implement user account activation in WordPress? (This is not for multisite.) Once the user registers through the site or admin panel, the user should get an email with an activation link. ...
Anshad Vattapoyil's user avatar
0 votes
1 answer
91 views

Activation of new Registered site fails on multisite

I recently installed multisite to my main site. I put a registration link at the top of my page. I tried registering a new site and user. The steps were straight forward with username, email, and ...
AC Grindl's user avatar
0 votes
1 answer
316 views

Error Copying Directory On Plugin Activation

I am trying to copy directory using WP_Filesystem API with the method copy_dir() on plugin activation, but it is give me the following error message: Plugin could not be activated because it ...
Ari's user avatar
  • 1,157
0 votes
0 answers
71 views

Users set passwords but cannot login

I'm working on a WP-based site that requires creating accounts for users and sending them their password reset links by email so they can activate their accounts. After manually sending out all the ...
bikey77's user avatar
  • 111
0 votes
1 answer
84 views

Wordpress hook source

I am trying to understand how plugins are activated. wp-admin\includes\plugin.php, line 602, there is a call to run a hook called activated_plugin do_action( 'activated_plugin', $plugin, $...
sotn's user avatar
  • 131
6 votes
1 answer
1k views

How to Modify/Change a Buddypress/Wordpress Account Activation Process

I'm developing a custom BuddyPress/WordPress Plugin. Here's how a user would normally register. A user registers as usual on registration page His/Her account is deactivated till he/she clicks on ...
William Oneb's user avatar
0 votes
1 answer
118 views

API calls on plugin activation or init?

When I activate my plugin, I need to call an API, to get some items, lets say fruits, flowers and animals. I need to create taxonomy terms out of these items. Then I need to loop over these items and ...
Rutwick Gangurde's user avatar
1 vote
3 answers
2k views

How to activate plugins for my WordPress sites from a remote server

I have been thinking of managing a set of wordpress sites from a remote server.I would like to get information on plugins that has been installed on my wordpress sites.I would also like to install ...
Outlooker's user avatar
  • 111
25 votes
4 answers
84k views

Activate a plugin through PHPMyAdmin or FTP?

I've just disabled a plugin on my site and it's now giving me the dreaded white screen of death. I know the site will be fine if I reactivate the plugin. Is there a way to manually activate a plugin ...
Django Reinhardt's user avatar
0 votes
0 answers
11k views

Resend user activation mail

We've set up a small Wordpress environment and added about 150 users by importing an excel document through the User Meta plugin. The Wordpress environment is build for a wedding and lets users fill ...
Studio Razend's user avatar
0 votes
1 answer
2k views

Activate plugins by a theme's functions.php?

Is it possible to activate plugins per theme? I have a multisite, and I know it is possible to activate plugins per site. But I need plugins to be enabled for specific themes. Someone asked a ...
user3438958's user avatar
1 vote
0 answers
68 views

Display message on homepage when new user account is activated

When a new user registers on Wordpress an activation link is sent out to their email address. When the user clicks on this link they are directed to my homepage and their account is activated. At ...
lea's user avatar
  • 23
3 votes
1 answer
491 views

Can't add user to blog on registration (Multisite)

I'm trying to add a users to a specific blog with a role chosen by the user at registration. I'm able to add the desired role to meta with this: add_filter( 'add_signup_meta', 'add_register_meta' );...
coopersita's user avatar
14 votes
1 answer
4k views

How to run an activation function when plugin is network activated on multisite?

I'm trying to make my plugin multisite compatible. I'm using the register_activation_hook() function to register my my_activate() function to run when the plugin is activated. This works well on a ...
henrywright's user avatar
  • 3,007
0 votes
1 answer
436 views

Fetch User Meta Data

Table - wp_usermeta user_id meta_key meta_value 10 login_status 0 10 active_code 3f7431e226893f16cbe44424850d00ad I need to select user_id where login_status = 0 and ...
Slimshadddyyy's user avatar
0 votes
2 answers
852 views

Activation Account Email

I use a betnami hosted wordpress multisite, when a user sign up in the site he should receive an email with activation link, but it does not work! so how to make it work? and if it work how to ...
sysmonet's user avatar
0 votes
1 answer
719 views

Refresh or redirect page after activate my plugin

I'm quite newbie in PHP and plugin development, and I think I'm missing something obvious but I dont know how to do it. When I activate my plugin (it adds some menu items), everything it's ok except ...
Dedalos01's user avatar
-1 votes
1 answer
41 views

Theme with Isoptope after activation in new install not working well [closed]

Hi I'm developing a theme with Isotope (masonry mode) and everything works well in the master/development location of WP. But if I take this theme and I activate it in a new installation of WP (same ...
Dedalos01's user avatar
0 votes
2 answers
72 views

Apparent errer when installing plugin

I have been working on my first plugin (call is myplugin). The path to the plugin code is wp-content/plugins/myplugin/myplugin.php. The myplugin.php file is essentially as follows: <?php defined(...
Jim's user avatar
  • 11
1 vote
2 answers
435 views

Multiple instance of data in plugin custom database table on plugin activation

I'm creating a plugin that adds some data to a custom table created by my plugin on plugin activations. I also created a settings page with a form that users can insert their own data to the database....
W3Guy's user avatar
  • 264
3 votes
1 answer
316 views

Ask user permission when activating a plugin

Is there a specific Wordpress API way to ask the user's permission for something when activating a plugin? Due to the Wordpress plugin directory policy I have to ask the users consent for the ...
Owl's user avatar
  • 221
0 votes
1 answer
4k views

Run function on plugin activation before plugin is loaded

I have two versions of the same plugin - one is a free version on WordPress.org and the other is a paid upgrade. Both versions use the same function names and so can't be activated at the same time. ...
John's user avatar
  • 13
0 votes
1 answer
137 views

I can install my plugin in localhost but not in my server

Well, I finished my first plugin in WordPress but I have a little problem. My plugin have the next code add_action('my-plugin/my-plugin.php','rating_install'); add_action('admin_menu','...
Marcos's user avatar
  • 187
0 votes
1 answer
706 views

Plugin can't be activated [closed]

I'm developing a WordPress plugin, but the last changes caused the plugin to stop working. It tells me that I can't activate the plugin because it caused a fatal error. On localhost all is working ...
sjiamnocna's user avatar
1 vote
1 answer
12k views

How to include plugin without activation?

I need to include plugin in my WordPress theme without plugin activation. I have these lines: include_once dirname( __FILE__ ) . '/math/class-constrained-array-rounding.php'; include( ...
Aineko's user avatar
  • 15
1 vote
1 answer
1k views

Unexpected Output: register_activation_hook with namespace

I encounter a weird error while using the register_activation_hook and namespace. The plugin generated 236 characters of unexpected output during activation. If you notice “headers already sent” ...
obstschale's user avatar
0 votes
1 answer
2k views

register_activation_hook for multiple functions

I have created a plugin where I want to call two different functions on activation. Is there a best way to do this? Should I use register_activation_hook twice? As in: register_activation_hook( ...
Pat Gilmour's user avatar
0 votes
1 answer
115 views

Clean way to initialize plugin in newly-added site when plugin has been network activated?

I've been working on migrating one of my plugins to support multisite installs and am attempting to figure out the cleanest way to handle the following series of events: Plugin is Network Activated ...
Dan's user avatar
  • 887
1 vote
2 answers
46 views

Activated plugin is stored as an object, rather than as a path

This seems like a very unusual behavior: Usually, when activating a plugin, a path to the plugin's main file (or bootstrap) is stored in the database under options.active_plugins. However, something ...
Yoav Kadosh's user avatar
3 votes
4 answers
4k views

Is it possible to stop a theme activation when a certain plugin is not activated

So I am planning a theme that will depend on a plugin (for instance Timber or Themosis). So of course a theme will break if it can't use it's depending plugin's. So I would like a way to stop the ...
Ilyes512's user avatar
  • 141
1 vote
0 answers
190 views

Why this function not working for install database on plugin activation

I followed codex instructions from wordpress site but for some reason it's not working for me and i can't understand why is there any debug settings or options to activate to explain me where i go ...
lonerunner's user avatar
0 votes
0 answers
61 views

Different plugins activated online and offline

I develop / add to / etc. my site offline, then transfer the updated database (in toto) to the live site. Some of the plugins I need / use offline, I don't need online, and vice versa. Is there a way ...
Kevin4fm's user avatar
-1 votes
1 answer
1k views

how to mage the submenu open on wordpress active page

i have the same problem in my website click here how i can change the code for when you click on corporate profile you go to the page and the sub menu stay open please some help
user2565386's user avatar