Description
Usage
cookie_cat_load_temp_xml();Parameters
Returns
voidSource
File name: cookie-cat/admin/cookie-cat.phpLines:
1 to 20 of 20
function cookie_cat_load_temp_xml() { $load_xml = bw_array_get( $_REQUEST, "_cookie_cat_load_xml", null ); if ( $load_xml ) { $temp_xml = cookie_cat_load_feed(); $tempxml = cookie_cat_write_temp_xml( $temp_xml ); $last_loaded = bw_format_date( null, "Y-m-d H:i:s"); bw_update_option( "last_loaded", $last_loaded, "cookie_cat_saved" ); } else { $tempxml = cookie_cat_default_temp_xml(); //bw_get_option( "tempxml", "cookie_cat_options" ); bw_trace2( $tempxml, "tempxml", false ); $last_loaded = bw_get_option( "last_loaded", "cookie_cat_saved" ); } if ( $tempxml ) { p( "Latest XML loaded on $last_loaded." ); $url = bw_file2url( $tempxml ); $link = retlink( null, $url, $tempxml, "View the temporary XML file" ); p( "Temporary XML file: $link" ); } }View on GitHub View on Trac
Invoked by
Calls
1 to 9 of 9
- bw_array_get() – Return the array[index] or array->index (for an object) or a default value if not set
- bw_file2url() – Convert an upload dir file name to an URL
- bw_format_date() – Format a date with the specified format
- bw_trace2() – Trace $value to the trace log file if tracing is active
- bw_update_option() – Set the value of an option field in the options group
- cookie_cat_default_temp_xml() – Set the location of the temporary XML file, in the upload directory folder
- cookie_cat_load_feed() –
- cookie_cat_write_temp_xml() –
- p() – Output a paragraph of translatable text
