Plugin Directory

Changeset 2885100

Timestamp:
03/22/2023 04:37:23 PM (17 months ago)
Author:
husobj
Message:

Version 1.4.2

Location:
page-parts/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • page-parts/trunk/CHANGELOG.md

    r2650675 r2885100  
    44
    55## [Unreleased]
     6
     7
     8
     9
     10
    611
    712## [1.4.1] - 2021-12-29
     
    135140- First public release.
    136141
    137 [Unreleased]: https://github.com/benhuson/page-parts/compare/1.4.1...HEAD
     142[Unreleased]: https://github.com/benhuson/page-parts/compare/1.4.2...HEAD
     143[1.4.2]: https://github.com/benhuson/page-parts/compare/1.4.1...1.4.2
    138144[1.4.1]: https://github.com/benhuson/page-parts/compare/1.4...1.4.1
    139145[1.4]: https://github.com/benhuson/page-parts/compare/1.3.1...1.4
  • page-parts/trunk/admin/admin.php

    r2650675 r2885100  
    745745            if ( isset( $_POST['parent_id'] ) && current_user_can( 'edit_page', $post_id ) ) {
    746746
    747                 $parent_id = absint( $_POST['parent_id'] );
    748                 $post_type_object = get_post_type_object( get_post_type( $parent_id ) );
    749 
    750                 if ( 0 == $parent_id || ( $post_type_object && current_user_can( $post_type_object->cap->edit_post, $post_id ) ) ) {
    751                     $wpdb->update( $wpdb->posts, array( 'post_parent' => $parent_id ), array( 'ID' => $post_id ) );
     747                // For WPML compatibility, check this is not a duplicate translation
     748                if ( ! $this->is_post_a_wpml_duplicate( $post_id ) ) {
     749
     750                    $parent_id = absint( $_POST['parent_id'] );
     751                    $post_type_object = get_post_type_object( get_post_type( $parent_id ) );
     752
     753                    if ( 0 == $parent_id || ( $post_type_object && current_user_can( $post_type_object->cap->edit_post, $post_id ) ) ) {
     754                        $wpdb->update( $wpdb->posts, array( 'post_parent' => $parent_id ), array( 'ID' => $post_id ) );
     755                    }
     756
    752757                }
    753758
     
    841846
    842847        <?php
     848
     849
     850
     851
     852
     853
     854
     855
     856
     857
     858
     859
     860
     861
     862
     863
     864
     865
     866
     867
     868
    843869    }
    844870
  • page-parts/trunk/page-parts.php

    r2650675 r2885100  
    55Plugin URI: https://github.com/benhuson/page-parts
    66Description: Manage subsections of a page.
    7 Version: 1.4.1
     7Version: 1.4.
    88Author: Ben Huson
    99Author URI: https://github.com/benhuson
     
    1111*/
    1212
    13 define( 'PAGE_PARTS_VERSION', '1.4.1' );
     13define( 'PAGE_PARTS_VERSION', '1.4.' );
    1414define( 'PAGE_PARTS_FILE', __FILE__ );
    1515
  • page-parts/trunk/readme.txt

    r2650675 r2885100  
    33Tags: pages, cms
    44Requires at least: 3.9
    5 Tested up to: 5.8.2
    6 Stable tag: 1.4.1
     5Tested up to:
     6Stable tag: 1.4.
    77License: GPL2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838
    3939= Unreleased =
     40
     41
     42
     43
     44
    4045
    4146= 1.4.1 =
Note: See TracChangeset for help on using the changeset viewer.