See Lance Cleveland’s WordPress Hooks Order Of Precedence.

Processing Modes

Base Loop

Generic WordPress + MySLP processing of a page request.

  • WordPress : muplugins_loaded
  • WordPress : registered_taxonomy
  • WordPress : registered_post_type
  • WordPress : plugins_loaded
  • WordPress : set_current_user
  • WordPress : init
    • SLP : slp_init_complete
      • SLP: start_slp_specific_setup
      • SLP: finish_slp_specific_setup
  • WordPress : parse_request
  • WordPress : rest_api_init
  • WordPress : send_headers

WordPress : plugins_loaded

Fires once activated plugins have loaded. The hook is generally used for immediate filter setup, or plugin overrides. The plugins_loaded action hook fires early, and precedes the setup_theme, after_setup_theme, init and wp_loaded action hooks.

Used By

  • MySLP_Dashboard_Controller :: load_hooks()
    • add_action( ‘plugins_loaded’, array( CLASS, ‘plugins_loaded’ ) );

WordPress : set_current_user

WordPress : init

Fires after WordPress has finished loading but before any headers are sent. Most of WP is loaded at this stage, and the user is authenticated.

Used By

  • Site_Architect::__construct()
    • add_action( ‘init’, array( $this, ‘sa_start_session’ ) );
  • SLP_Actions:initialize()
    • add_action( ‘init’, array( $this, ‘init’ ), 11 );

      Sets up the slplus->database object with slplus->database = SLP_Data::get_instance().
      This needs to happen AFTER the WoredPress:set_current_user is called so MySLP has the proper user meta to set the database attributes.
  • MySLP::add_hooks()
    • add_action( ‘init’, array( $this, ‘perform_init_actions’ ) );

User Logged In Traced Calls

  • Site_Architect::sa_start_session()
  • SLP_Actions::init()
  • MySLP::perform_init_actions()

SLP : slp_init_complete

Executed during WordPress : init hook via SLP_Actions::init() after all of the main SLP plugin init stuff has been executed.

Used By

  • \MySLP_Dashboard_Controller::load_hooks()
    • add_action( 'slp_init_complete', array( __CLASS__, 'slp_init_complete' ) );
  • SLP_BaseClass_Addon :: initialize()
    • add_action( ‘slp_init_complete’, array( $this, ‘slp_init’ ) );
  • SLP_Power_Pages :: add_hooks_and_filters()
    • add_action( ‘slp_init_complete’ , array( $this , ‘do_when_slp_ready’ ) , 11 ); // 11 ensures the base slp_init has run for the addon

WordPress : parse_request

Used By

  • WordPress : rest_api_loaded
    in wordpress/wp-includes/rest-api.php
    this eventually calls the REST custom endpoint permission_callback

WordPress : rest_api_init

Called when processing a REST API call.

slp_ajax_response

Used By

\SLP_Premier_AJAX::add_ajax_hooks()

Invoked By

\SLP_AJAX::renderJSON_Response()

slp_ajaxsql_fullquery

Used By

\SLP_Experience_AJAX::add_ajax_hooks()
\SLP_Premier_AJAX::add_ajax_hooks()

Invoked By

\SLP_AJAX::execute_location_query()

slp_rest_geocode_invalid_referer

Invoked By

\SLP_REST_Handler::valid_referer() for any site that is not coming from get_site_url() or get_home_url(). This is run via the WordPress REST API handler via the register_rest_route() for the readable request for geocoding at the wp-json/store-locator-plus/v2/geocode/<address> endpoint. This happens via the permission_callback property.