[wp-testers] What is the hook when using post-new.php?

Kirk Steffensen blogger at steffensenfamily.com
Fri Nov 10 19:15:17 GMT 2006


Ajay,

I still haven't traced this all the way out, but something changed in
admin_footer from WP 2.0 to 2.1.  2.1 broke our WPG2 plugin, too.

I've been able to get a WPG2 button on all posts and pages by explicitly
calling both post.php and post-new.php and both page.php and page-new.php
from within the function.

if(strpos($_SERVER['REQUEST_URI'], 'post.php') ||
strpos($_SERVER['REQUEST_URI'], 'post-new.php') ||
strpos($_SERVER['REQUEST_URI'], 'page.php') ||
strpos($_SERVER['REQUEST_URI'], 'page-new.php') ||
strpos($_SERVER['REQUEST_URI'], 'bookmarklet.php'))

Under 2.0, you didn't have to explicitly call each individual one, but it
looks like you do now.  Hope this helps.

Any developer care to comment on the rationale behind this?

(Anyone using Owen Winkler's Edit Button Template in a plugin needs to take
a look at this to see if it affects them.)

Kirk

-----Original Message-----
From: wp-testers-bounces at lists.automattic.com
[mailto:wp-testers-bounces at lists.automattic.com] On Behalf Of Ajay D'Souza
Sent: Friday, November 10, 2006 9:26 PM
To: wp-testers at lists.automattic.com
Subject: [wp-testers] What is the hook when using post-new.php?

Hi,

I'm using the admin_footer filter to add a button to the post page.

It works fine when I try to edit the post, because it calls post.php
When I try to compose a new post, post-new.php is called and here the
buttons do not appear.

I have the latest SVN version of WordPress 2.1

Regards,
Ajay

-- 
-------------------------------------------------
Blogging @ http://ajaydsouza.com
Download themes, screensavers and more from http://megathemes.com
All about Sir Arthur Conan Doyle and Sherlock Holmes at
http://sirconandoyle.com
_______________________________________________
wp-testers mailing list
wp-testers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-testers

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.1/527 - Release Date: 11/9/2006
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.1/527 - Release Date: 11/9/2006
 



More information about the wp-testers mailing list