ooeygui
Forum Replies Created
-
Hmm, this is interesting. I’ve been experiencing some similar problems in other areas of WP when I update from a lower version so this may actually be a problem with WP3 rather than the plugin.
Version 2 may or may not work(I haven’t tested it in WP3) — the plugin was completely rebuilt specifically for WP3 so the old wp_reus table isn’t being used anymore among other things.
I’ve also just noticed that I’m having the same problem on my live site but the reusables ARE being save in the database. I’ll look more into this to try to figure out the problem. Thanks for letting me know!
Forum: Plugins
In reply to: Need a plugin, very simple oneWhy not just put it in your theme?
Forum: Plugins
In reply to: register_activation_hook / register_deactivation_hookIf you reverse engineer the register_activation_hook() function you’ll see that it all goes right back to the add_action(“activate_(plugin file name)”, “my_function”); method of doing it.
register_activation_hook() simply strips the $file parameter down to be used in the old activate action.
Forum: Plugins
In reply to: register_activation_hook / register_deactivation_hookActually… I got this exact thing to work outside of the main file. register_activation_hook() doesn’t necessarily need to be called from the main plugin file but the first parameter($file) needs to point over to the main file.
Try something like this:
class.foo.php
class Foo { public function Foo($file){ register_activation_hook($file, array(&$this, "activate")); register_deactivation_hook($file, array(&$this, "deactivate")); } public function activate(){ ... } public function deactivate(){ ... } }
myplugin.php
include_once("class.foo.php"); $foo = new Foo(__FILE__);
Forum: Fixing WordPress
In reply to: Creating Admin Menus/ScreensOk nevermind, I got it.
When I only define a top level it puts that weird URL in there so I needed to define a submenu underneath it with the same slug.
Forum: Fixing WordPress
In reply to: Creating Admin Menus/ScreensHmm, this only works on top level admin menus which is ok, but apparently I can only add one top level menu per plugin. I didn’t realize this. For some reason when I try to add more than one it forces the link on the menu over to an actual page. For example, “https://www.domain.com/wp-admin/plugin/page” rather than “https://www.domain.com/wp-admin/admin.php?page=plugin/page” and this gives me a 404 error.
I only need to hide certain items so I need to be able to create more top level menus or be able to hide the sub menus.
Forum: Fixing WordPress
In reply to: Creating Admin Menus/ScreensNice, I’ll have to give that a try. Thanks.