The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
19 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
0answers
44 views

admin_init not working

I have created few admin menus , one of them was for sending data to an external link , capabilities of those admin menus were custom . Inside admin menu function I have some code like this ...
0
votes
1answer
91 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
83 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
6k 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
277 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
408 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 ...
22
votes
6answers
12k 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', ...