0

I have written a security function.I want to call this function in all pages which are created by wordpress back end only (Does not want want to called by all php files).Is there any hook available?.Please Help

  • Is this a front end function – Pieter Goosen Aug 12 '14 at 11:47
  • Yes ,this is a front end function written in functions.php – Rex Rex Aug 12 '14 at 11:48
  • I'm not sure what you mean, you want something that runs when a user views a post of type page on the frontend? Your question suggests you misunderstand how templates work ( it hints you think the template determines the query, not the other way around ). Can you give an example of a post of type page that wasn't created by the WordPress back end and how it it different? – Tom J Nowell Aug 12 '14 at 11:57
  • Also what does your function do? I know you said security but that could mean anything – Tom J Nowell Aug 12 '14 at 11:57
  • Wait, what are you trying to do with this function? Just for context. – Tomás Cot Aug 12 '14 at 13:46
0

What about admin_init ?

Description is:

admin_init is triggered before any other hook when a user accesses the admin area. This hook doesn't provide any parameters, so it can only be used to callback a specified function.

0

You can tie it to the 'wp_head' hook.

http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.