Function:
mp_core_get_all_pages()
Purpose:
Get all Pages into an associative array
Overview:
This function is useful if you are creating a dropdown where you would need all pages. It can be used:
- With the MP_CORE_MetaBox Class as the ‘field_select_values’ for a dropdown menu
- With the MP_CORE_Settings Class as the ‘options’ for a dropdown menu
- With the MP_CORE_Customizer Class as the ‘choices’ for a dropdown menu
- With the MP_CORE_Widget Class as the ‘field_select_values’ for a widget
- With the MP_CORE_Shortcode_Insert Class as the ‘option_value’ for a Shortcode Inserter.
Usage:
mp_core_get_all_pages();
Returns:
(Array)
An array of pages containing just the page ID as the key and the Page Title as the value