Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
lstoyanoff committed Apr 16, 2020
2 parents fc52879 + e690755 commit e0bcaab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Define version constant
if ( ! defined( __NAMESPACE__ . '\VERSION' ) ) {
define( __NAMESPACE__ . '\VERSION', '3.1.16' );
define( __NAMESPACE__ . '\VERSION', '3.1.17' );
}

# Define root directory
Expand Down
8 changes: 3 additions & 5 deletions core/Container/Post_Meta_Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,9 @@ protected function get_environment_for_object( $object_id ) {
$post = get_post( intval( $object_id ) );
$post_type = $post->post_type;

if ( $post_type === 'revision' ) {
$parent = get_post( intval( $post->post_parent ) );
if ( $parent ) {
$post_type = $parent->post_type;
}
if ( wp_is_post_revision( $post ) !== false ) {
$post = get_post( intval( $post->post_parent ) );
$post_type = $post->post_type;
}

$environment = array(
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "carbon-fields",
"version": "3.1.16",
"version": "3.1.17",
"description": "WordPress developer-friendly custom fields for post types, taxonomy terms, users, comments, widgets, options, navigation menus and more.",
"directories": {
"test": "tests"
Expand Down

0 comments on commit e0bcaab

Please sign in to comment.