The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
2answers
28 views

Which hook for processing plugin page form data?

Which hook should I use for processing form data from my plugin pages. I currently use "admin_init". Is that correct? Was this hook intended to be used this way?
0
votes
1answer
32 views

Is it save to require plugin.php early to be able to use get_plugin_data() earlier?

I'd like to avoid hard coding my plugin's version at multiple places. To realize this the function get_plugin_data() comes in handy. But here the fun comes to an unpleasant stop. Checking for a plugin ...
0
votes
1answer
125 views

How to use hook admin_init for add_action for custom post type column

I'm adding a post thumbnail column to the edit custom post screen. The post thumbnails are showing up fine however I would like to hook it with admin_init to take some load off the website. This is ...
1
vote
0answers
122 views

Calling a function on admin_init when WP core files are in a subdirectory [closed]

I have an install set up along the lines of this tutorial, whereby my core files (wp-admin, wp-includes) are separate from the content folder: /wp/wp-includes/ /wp/wp-admin/ /wp/wp-load.php etc ...
9
votes
2answers
8k views

Use wp init hook to call other hooks?

I want to know if it is a good practice according to WordPress theme or plugin development. add_action('init','all_my_hooks'); function all_my_hooks(){ // some initialization stuff here and then ...
0
votes
1answer
306 views

Editor capabilities - admin_init

I'm having a little difficulties with roles and capabilities. Editors gets a 'Cheatin uh?'-message when they try to update the custom theme-settings. Can anyone explain why - or maybe even have a ...
0
votes
1answer
441 views

wp_redirect and current_user_can issues

Put simply, I'm trying to redirect the user after clicking a 'Save Changes' button. The plugin uses custom capabilities, and so I want to check the current user has the correct capabilities before ...
26
votes
7answers
17k views

How do I enqueue styles/scripts on certain /wp-admin pages?

I have two simple functions that load stuff using wp_enqueue_style() and wp_enqueue_script(), something like these: function admin_custom_css() { wp_enqueue_style( 'stylesheet_name', ...