Vladimir’s WordPress Forum


 
Current User: Guest
Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

A question about add_action()

Add a New Topic Reply to Post
UserPost

13:29
30 May, 2009


marcthenarc

Guest

Post edited 21:18 – 30 May, 2009 by marcthenarc


I'm having trouble with plugins lately and especially wp_print_scripts. My problem is not with actual javascript code but rather if / when is the hook actually active. After several attempts I decide to test if wp_print_scripts hooks the right way.

// Sample test
add_action('wp_print_scripts', 'JustATest');

function JustATest()
{
echo 'It works'; exit;
}

Once my plugin is enabled, everything should come to a halt when this line is processed. My administration panel disappears and prints that message when I click around in it … but my public pages (home.php, single.php, etc …) don't. They always show up. Seems there's something in there that doesn't affect that hook at all, although other filters with add_filters() work fine.

I'm stumped.

[RESOLVED] – No one told me about :(

Reply to Post

Reply to Topic:
A question about add_action()

Guest Name (Required):

Guest Email (Required):

HTML Editor
Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
6 + 8