Description
Displays the box allowing the user to choose the menu in which the page is created.
Usage
oik_privacy_policy_menu_selector();Parameters
Returns
voidSource
File name: oik-privacy-policy/admin/oik-privacy-policy.phpLines:
1 to 17 of 17
function oik_privacy_policy_menu_selector() { oik_require( "includes/bw_metadata.php" ); $menus = wp_get_nav_menus( $args = array() ); $terms = bw_term_array( $menus ); $terms[0] = __( "none", "oik-privacy-policy" ); $auto_add = get_option( 'nav_menu_options' ); $auto_add = bw_array_get( $auto_add, "auto_add", 0 ); $auto_add = bw_array_get( $auto_add, 0, 0 ); if ( $auto_add ) { bw_tablerow( array( " ", sprintf( __( 'The new page will be added to menu: %1$s', "oik-privacy-policy" ), $terms[$auto_add] ) ) ); } else { BW_::bw_select( "bw_nav_menu", __( "Add to menu", "oik-privacy-policy" ), $auto_add, array( '#options' => $terms) ); } return( $menus ); }View on GitHub View on Trac
Called by
1 to 6 of 6
- oik_privacy_policy_generate() – Create the generate Privacy Policy form
- Tests_admin_oik_privacy_policy::remove_oik_privacy_policy_menu_selector() – Removes the menu selector from the generated HTML.
- Tests_admin_oik_privacy_policy::test_oik_privacy_policy_menu_selector() – Tests oik_privacy_policy_menu_selector
- Tests_admin_oik_privacy_policy::test_oik_privacy_policy_menu_selector_auto_add() – Tests oik_privacy_policy_menu_selector with auto_add set
- Tests_admin_oik_privacy_policy::test_oik_privacy_policy_menu_selector_auto_add_bb_BB() – Tests oik_privacy_policy_menu_selector with auto_add set
- Tests_admin_oik_privacy_policy::test_oik_privacy_policy_menu_selector_bb_BB() – Tests oik_privacy_policy_menu_selector
Invoked by
Calls
1 to 3 of 3
