TinyMCE is inactive after installation
TinyMCE is inactive after installation
TinyMCE is inactive after installation
It seems to use (src): $message .= network_site_url( “wp-login.php?action=rp&key=$key&login=” . rawurlencode( $user_login ), ‘login’ ) . ‘&wp_lang=’ . $locale . “\r\n\r\n”; but not wp_lostpassword_url(), most likely because of the extra arguments, like key and wp_lang and a different action value. You could look into the network_site_url filter during the lostpassword_post action, that is fired within … Read more
Activation flow of a plugin in a multisite environment
You can use something like this: Embed this script: http://jquery.lukelutman.com/plugins/flash/jquery.flash.js Then in your functions.js (function($) { $(document).ready(function (){ $(“.flash”).click(function(e) { $(this).parent().empty().flash({ src: $(this).attr(‘href’) }); e.preventDefault(); }); }); })(jQuery); Your markup would be something like: <div class=”flash-container”> <a href=”https://wordpress.stackexchange.com/questions/40287/flash.swf”><img src=”placeholder.jpg”></a> </div> For more info check http://jquery.lukelutman.com/plugins/flash/ i hope this makes some sense 🙂 Btw: this isn’t … Read more
Quick and easy. if ( is_plugin_active( ‘plugin-folder-name/main-plugin-file.php’ ) ) deactivate_plugins( ‘/plugin-folder-name/main-plugin-file.php’ ); It’s important to note the is_plugin_active string is slightly different than the deactivate_plugins string.
If your goal is automated plugin activation you don’t have to do it via SQL. You could, of course, but why not use functionality that comes with WordPress? As I mentioned in my comment, the data has been serialized so you just have to unserialize the data, add your plugin, re-serialize the data, and update … Read more
When a plugin is activated, the only thing that runs on that activation request is the activation hook. whatever you’ve got hooked to init has not and will not run on that request, so you need to register it in your activation before you flush rewrites. it’s only after the plugin is activated, on the … Read more
You can register multiple activation hooks, that’s not a problem. Or you can use a wrapper function that calls the other functions. What is wrong, is this: add_action( ‘template_include’, ‘terms_redirect’ ); template_include is a filter, not an action, so you should use add_filter(). $author_id = 1; is dangerous, there might be no author with that … Read more
After looking through Make WordPress, it looks like this is a known issue that won’t be fixed due to scalability concerns with large networks. That same issue linked above recommends doing exactly the solution discussed above. Specifically, that would look something like this: public static function 145561_activate_new_blog($blog_id) { if (is_plugin_active_for_network(plugin_basename(__FILE__))) { // do activation for … Read more
The root of the problem is that isset expects a variable to be passed to it. Also, I’m assuming that you expect the get_post_meta() to return a scalar value and not an array, so I added the third parameter set to true. // 3rd param: $single. Value of true means get scalar value, not an … Read more