Description
Generate the privacy policy page
Usage
oik_privacy_policy_generate_page();Parameters
Returns
voidSource
File name: oik-privacy-policy/admin/oik-privacy-policy.phpLines:
1 to 26 of 26
function oik_privacy_policy_generate_page() { bw_flush(); oik_build_privacy_policy(); $page = bw_ret(); if ( $page ) { $title = bw_array_get( $_REQUEST, "bw_privacy_policy_title", __( "Privacy policy", "oik-privacy-policy" ) ); $page_id = _bw_create_page( $title, "page", $page ); $menu = bw_array_get( $_REQUEST, "bw_nav_menu", null ); if ( $menu > 0 ) { oik_require( "includes/oik-menus.php" ); bw_insert_menu_item( $title, $menu, $page_id, 0 ); } sdiv( "updated", "message" ); sp(); e( __( "Page created:", "oik-privacy-policy" ) ); e( " " . $title . " " ); BW_::alink( null, get_permalink( $page_id ), __( "View page", "oik-privacy-policy" ) ); bw_echo( '</p>' ); ediv(); } else { sdiv( "error", "message" ); BW_::p( __( "Please select some checkboxes and <b>Preview</b> the result before choosing <b>Generate page</b>", "oik-privacy-policy" ) ); ediv(); } }View on GitHub View on Trac
Called by
1 to 1 of 1
Invoked by
Calls
1 to 11 of 11
- BW_::alink() – Outputs a link
- BW_::p() – Outputs a paragraph of translated text
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_flush() – Use bw_flush() to echo the contents of $bwecho then empty it
- bw_ret() – Use bw_ret() to return the contents of $bwecho, leaving the global value as NULL
- ediv() – End a div
- ep() – End a paragraph (p) tag
- oik_build_privacy_policy() – Build the privacy policy for the selected items
- sdiv() – Start a div
- sp() – Start a paragraph
- _bw_create_page() –
