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?...
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...
As per my understanding, functions attached to plugin_loaded and admin_init hooks are called whenever any admin page is loaded. What’s the difference between them? 1 Answer 1 plugins_loaded fires...
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 add_action('admin_init',-----); add_action('admin_menu',----);...
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', 'stylesheet.css') }; function admin_custom_js { wp_enqueue_script( 'javascript_file', 'script.js') };...