The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
25 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
54 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 ...
8
votes
2answers
3k 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
229 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
374 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 ...
16
votes
5answers
7k 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', ...