The admin-init tag has no wiki summary.
1
vote
0answers
20 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
...
6
votes
2answers
563 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
132 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
209 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 ...
10
votes
4answers
3k 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', ...