WordPress **doesn't** execute all the actions and filters (i.e. hooks) at the same time using some sort of priority, instead, **execution order of these action and filter hooks are hard coded within WordPress core PHP files**.


Within WordPress source CODE, search for the following four function calls (using any text editor's find in files feature):

 1. [`apply_filters`][2] => applies a specific filter.

 2. [`apply_filters_ref_array`][3] => applies a specific filter, specifying arguments in an array.

 3. [`do_action`][4] => does a specific action.

 4. [`do_action_ref_array`][5] => does a specific action, specifying arguments in an array.

You'll see that each of the above function calls are used multiple times within the WordPress source CODE and execution order (priority) of the corresponding action and filter hook depends on when WordPress makes those function calls.

As PHP itself executes CODE line by line, execution order of those functions and their corresponding hooks also depend on which PHP file & in what line those function calls are.

> ***Note:*** Although execution order of each specific action & filter hook is pre-determined within the CODE, execution order for multiple use of a single hook is determined by the [$priority][1] parameter.  

WordPress hard codes these function calls to make sure the execution order of these action & filter hooks are predetermined. Otherwise developers would have real hard time coding themes & plugins.

> ***Note:*** Since 4.7 WordPress implements all of the above four functions internally using [WP_Hook][6] class. So you may also take a look at that class to understand how all these are done internally.


  [1]: https://developer.wordpress.org/reference/functions/add_filter/
  [2]: https://developer.wordpress.org/reference/functions/apply_filters/
  [3]: https://developer.wordpress.org/reference/functions/apply_filters_ref_array/
  [4]: https://developer.wordpress.org/reference/functions/do_action/
  [5]: https://developer.wordpress.org/reference/functions/do_action_ref_array/
  [6]: https://developer.wordpress.org/reference/classes/wp_hook/