Notice: require(): read of 4934 bytes failed with errno=14 Bad address in /var/www/html/abmi.org.br/web/wp-settings.php on line 196
Notice: require(): read of 4934 bytes failed with errno=12 Cannot allocate memory in /var/www/html/abmi.org.br/web/wp-settings.php on line 196
* @since 5.3.0
* @since 5.4.0 Added the `$unfiltered` parameter.
*
* @param int $attachment_id Attachment ID.
* @param bool $unfiltered Optional. Passed through to `get_attached_file()`. Default false.
* @return string|false Path to the original image file or false if the attachment is not an image.
*/
function wp_get_original_image_path( $attachment_id, $unfiltered = false ) {
if ( ! wp_attachment_is_image( $attachment_id ) ) {
return false;
}
$image_meta = wp_get_attachment_metadata( $attachment_id );
$image_file = get_attached_file( $attachment_id, $unfiltered );
if ( empty( $image_meta['original_image'] ) ) {
$original_image = $image_file;
} else {
$original_image = path_join( dirname( $image_file ), $image_meta['original_image'] );
}
/**
* Filters the path to the original image.
*
* @since 5.3.0
*
* @param string $original_image Path to original image file.
* @param int $attachment_id Attachment ID.
*/
return apply_filters( 'wp_get_original_image_path', $original_image, $attachment_id );
}
/**
* Retrieves the URL to an original attachment image.
*
* Similar to `wp_get_attachment_url()` however some images may have been
* processed after uploading. In this case this function returns the URL
* to the originally uploaded image file.
*
* @since 5.3.0
*
* @param int $attachment_id Attachment post ID.
* @return string|false Attachment image URL, false on error or if the attachment is not an image.
*/
function wp_get_original_image_url( $attachment_id ) {
if ( ! wp_attachment_is_image( $attachment_id ) ) {
return false;
}
$image_url = wp_get_attachment_url( $attachment_id );
if ( ! $image_url ) {
return false;
}
$image_meta = wp_get_attachment_metadata( $attachment_id );
if ( empty( $image_meta['original_image'] ) ) {
$original_image_url = $image_url;
} else {
$original_image_url = path_join( dirname( $image_url ), $image_meta['original_image'] );
}
/**
* Filters the URL to the original attachment image.
*
* @since 5.3.0
*
* @param string $original_image_url URL to original image.
* @param int $attachment_id Attachment ID.
*/
return apply_filters( 'wp_get_original_image_url', $original_image_url, $attachment_id );
}
/**
* Filters callback which sets the status of an untrashed post to its previous status.
*
* This can be used as a callback on the `wp_untrash_post_status` filter.
*
* @since 5.6.0
*
* @param string $new_status The new status of the post being restored.
* @param int $post_id The ID of the post being restored.
* @param string $previous_status The status of the post at the point where it was trashed.
* @return string The new status of the post.
*/
function wp_untrash_post_set_previous_status( $new_status, $post_id, $previous_status ) {
return $previous_status;
}
/**
* Returns whether the post can be edited in the block editor.
*
* @since 5.0.0
* @since 6.1.0 Moved to wp-includes from wp-admin.
*
* @param int|WP_Post $post Post ID or WP_Post object.
* @return bool Whether the post can be edited in the block editor.
*/
function use_block_editor_for_post( $post ) {
$post = get_post( $post );
if ( ! $post ) {
return false;
}
// We're in the meta box loader, so don't use the block editor.
if ( is_admin() && isset( $_GET['meta-box-loader'] ) ) {
check_admin_referer( 'meta-box-loader', 'meta-box-loader-nonce' );
return false;
}
$use_block_editor = use_block_editor_for_post_type( $post->post_type );
/**
* Filters whether a post is able to be edited in the block editor.
*
* @since 5.0.0
*
* @param bool $use_block_editor Whether the post can be edited or not.
* @param WP_Post $post The post being checked.
*/
return apply_filters( 'use_block_editor_for_post', $use_block_editor, $post );
}
/**
* Returns whether a post type is compatible with the block editor.
*
* The block editor depends on the REST API, and if the post type is not shown in the
* REST API, then it won't work with the block editor.
*
* @since 5.0.0
* @since 6.1.0 Moved to wp-includes from wp-admin.
*
* @param string $post_type The post type.
* @return bool Whether the post type can be edited with the block editor.
*/
function use_block_editor_for_post_type( $post_type ) {
if ( ! post_type_exists( $post_type ) ) {
return false;
}
if ( ! post_type_supports( $post_type, 'editor' ) ) {
return false;
}
$post_type_object = get_post_type_object( $post_type );
if ( $post_type_object && ! $post_type_object->show_in_rest ) {
return false;
}
/**
* Filters whether a post is able to be edited in the block editor.
*
* @since 5.0.0
*
* @param bool $use_block_editor Whether the post type can be edited or not. Default true.
* @param string $post_type The post type being checked.
*/
return apply_filters( 'use_block_editor_for_post_type', true, $post_type );
}
Fatal error: Uncaught Error: Call to undefined function _get_custom_object_labels() in /var/www/html/abmi.org.br/web/wp-includes/taxonomy.php:681
Stack trace:
#0 /var/www/html/abmi.org.br/web/wp-includes/class-wp-taxonomy.php(485): get_taxonomy_labels(Object(WP_Taxonomy))
#1 /var/www/html/abmi.org.br/web/wp-includes/class-wp-taxonomy.php(289): WP_Taxonomy->set_props('post', Array)
#2 /var/www/html/abmi.org.br/web/wp-includes/taxonomy.php(493): WP_Taxonomy->__construct('category', 'post', Array)
#3 /var/www/html/abmi.org.br/web/wp-includes/taxonomy.php(82): register_taxonomy('category', 'post', Array)
#4 /var/www/html/abmi.org.br/web/wp-settings.php(435): create_initial_taxonomies()
#5 /var/www/html/abmi.org.br/web/wp-config.php(99): require_once('/var/www/html/a...')
#6 /var/www/html/abmi.org.br/web/wp-load.php(50): require_once('/var/www/html/a...')
#7 /var/www/html/abmi.org.br/web/wp-blog-header.php(13): require_once('/var/www/html/a...')
#8 /var/www/html/abmi.org.br/web/index.php(17): require('/var/www/html/a...')
#9 { in /var/www/html/abmi.org.br/web/wp-includes/taxonomy.php on line 681