Definition:
function fatal($msg) {}
Parameters
- $msg
Source code
function fatal($msg) {
$args = func_get_args();
$log = getLogger();
$log->fatal(implode(', ', $args));
}
1048
Definition:
function fatal($msg) {}
function fatal($msg) {
$args = func_get_args();
$log = getLogger();
$log->fatal(implode(', ', $args));
}
1048
Definition:
function extract_from_markers( $filename, $marker ) {}
returns:An array of strings from a file (.htaccess ) from between BEGIN and END markers.
function extract_from_markers( $filename, $marker ) {
$result = array ();
if (!file_exists( $filename ) ) {
return $result;
}
if ( $markerdata = explode( "\n", implode( '', file( $filename ) ) ));
{
$state = false;
foreach ( $markerdata as $markerline ) {
if (strpos($markerline, '# END ' . $marker) !== false)
$state = false;
if ( $state )
$result[] = $markerline;
if (strpos($markerline, '# BEGIN ' . $marker) !== false)
$state = true;
}
}
return $result;
}
1046
Definition:
function export_wp( $args = array() {}
do_action( 'export_wp' );function export_wp( $args = array() ) {
global $wpdb, $post;
$defaults = array( 'content' => 'all', 'author' => false, 'category' => false,
'start_date' => false, 'end_date' => false, 'status' => false,
);
$args = wp_parse_args( $args, $defaults );
do_action( 'export_wp' );
$sitename = sanitize_key( get_bloginfo( 'name' ) );
if ( ! empty($sitename) ) $sitename .= '.';
$filename = $sitename . 'wordpress.' . date( 'Y-m-d' ) . '.xml';
header( 'Content-Description: File Transfer' );
header( 'Content-Disposition: attachment; filename=' . $filename );
header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), true );
if ( 'all' != $args['content'] && post_type_exists( $args['content'] ) ) {
$ptype = get_post_type_object( $args['content'] );
if ( ! $ptype->can_export )
$args['content'] = 'post';
$where = $wpdb->prepare( "{$wpdb->posts}.post_type = %s", $args['content'] );
} else {
1044
Definition:
function esc_url_raw( $url, $protocols = null ) {}
returns:The cleaned URL.
function esc_url_raw( $url, $protocols = null ) {
return esc_url( $url, $protocols, 'db' );
}
1042
Definition:
function esc_url( $url, $protocols = null, $_context = 'display' ) {}
returns:The cleaned $url after the ‘clean_url’ filter is applied.
apply_filters('clean_url', $url, $original_url, $_context)function esc_url( $url, $protocols = null, $_context = 'display' ) {
$original_url = $url;
if ( '' == $url )
return $url;
$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url);
$strip = array('%0d', '%0a', '%0D', '%0A');
$url = _deep_replace($strip, $url);
$url = str_replace(';//', '://', $url);
/* If the URL doesn't appear to contain a scheme, we
* presume it needs http:// appended (unless a relative
* link starting with /, # or ? or a php file).
*/
if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&
! preg_match('/^[a-z0-9-]+?\.php/i', $url) )
$url = 'http://' . $url;
// Replace ampersands and single quotes only when displaying.
if ( 'display' == $_context ) {
$url = wp_kses_normalize_entities( $url );
$url = str_replace( '&', '&', $url );
$url = str_replace( "'", ''', $url );
}
if ( ! is_array( $protocols ) )
$protocols = wp_allowed_protocols();
if ( wp_kses_bad_protocol( $url, $protocols ) != $url )
return '';
return apply_filters('clean_url', $url, $original_url, $_context);
}
1040