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...
  • May 12, 2022
  • 0 Comments
IT Nursery
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',----);...
  • April 14, 2022
  • 0 Comments
IT Nursery
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') };...
  • April 5, 2022
  • 0 Comments