Definition:
function has_excerpt( $id = 0 ) {}
Parameters
- int $id: Optional. Post ID.
Source code
function has_excerpt( $id = 0 ) {
$post = &get_post( $id );
return ( !empty( $post->post_excerpt ) );
}
1929
Definition:
function has_excerpt( $id = 0 ) {}
function has_excerpt( $id = 0 ) {
$post = &get_post( $id );
return ( !empty( $post->post_excerpt ) );
}
1929
Definition:
function has_action($tag, $function_to_check = false) {}
returns:Optionally returns the priority on that hook for the specified function.
function has_action($tag, $function_to_check = false) {
return has_filter($tag, $function_to_check);
}
1927
Definition:
function gzip_compression() {}
function gzip_compression() {
_deprecated_function( __FUNCTION__, '2.5' );
return false;
}
1925
Definition:
function grant_super_admin( $user_id ) {}
do_action( 'grant_super_admin', $user_id );do_action( 'granted_super_admin', $user_id );function grant_super_admin( $user_id ) {
global $super_admins;
// If global super_admins override is defined, there is nothing to do here.
if ( isset($super_admins) )
return false;
do_action( 'grant_super_admin', $user_id );
// Directly fetch site_admins instead of using get_super_admins()
$super_admins = get_site_option( 'site_admins', array( 'admin' ) );
$user = new WP_User( $user_id );
if ( ! in_array( $user->user_login, $super_admins ) ) {
$super_admins[] = $user->user_login;
update_site_option( 'site_admins' , $super_admins );
do_action( 'granted_super_admin', $user_id );
return true;
}
return false;
}
1923
Definition:
function graceful_fail( $message ) {}
apply_filters( 'graceful_fail', $message )apply_filters( 'graceful_fail_template',
'<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Error!</title>
<style type="text/css">
img {
border: 0;
}
body {
line-height: 1.6em; font-family: Georgia, serif; width: 390px; margin: auto;
text-align: center;
}
.message {
font-size: 22px;
width: 350px;
margin: auto;
}
</style>
</head>
<body>
<p class="message">%s</p>
</body>
</html>' )
function graceful_fail( $message ) {
_deprecated_function( __FUNCTION__, '3.0', 'wp_die()' );
$message = apply_filters( 'graceful_fail', $message );
$message_template = apply_filters( 'graceful_fail_template',
'<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Error!</title>
<style type="text/css">
img {
border: 0;
}
body {
line-height: 1.6em; font-family: Georgia, serif; width: 390px; margin: auto;
text-align: center;
}
.message {
font-size: 22px;
width: 350px;
margin: auto;
}
</style>
</head>
<body>
<p class="message">%s</p>
</body>
</html>' );
die( sprintf( $message_template, $message ) );
}
1921