Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Clean up phpdoc and references to snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Dec 3, 2016
1 parent 7b10e16 commit d11cba7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions php/class-wp-customize-posts-preview.php
Expand Up @@ -1438,11 +1438,11 @@ public function amend_with_queried_post_ids( $results ) {
}

/**
* Filter post_status to return snapshot value if available.
* Filter post_status to return customize-previewed value if available.
*
* @param string $post_status Default status. Used if no changes have been made.
* @param WP_Post $post Post object that may have a new value for post_status.
* @return string Value of post_status stored in snapshot, or original value if unchanged.
* @return string Value of post_status stored in customized state, or original value if unchanged.
*/
public function filter_get_post_status( $post_status, $post ) {
if ( empty( $post ) ) {
Expand Down
2 changes: 1 addition & 1 deletion php/class-wp-customize-posts.php
Expand Up @@ -1137,7 +1137,7 @@ public function transition_customize_draft( $new_status, $old_status, $post ) {
*
* @see WP_Customize_Nav_Menus::sanitize_nav_menus_created_posts()
* @param array $value Post IDs.
* @returns array Post IDs.
* @return array Post IDs.
*/
public function sanitize_nav_menus_created_posts( $value ) {
$post_ids = array();
Expand Down
4 changes: 2 additions & 2 deletions tests/php/test-class-wp-customize-posts-preview.php
Expand Up @@ -746,7 +746,7 @@ public function test_filter_get_meta_sql_to_inject_customized_state() {
) );
$this->assertCount( 3, $query_post_with_in_query->posts );

$query_post_where_actual_meta_and_snapshot_with_zero = new WP_Query( array(
$query_post_where_actual_meta_and_previewed_meta_with_zero = new WP_Query( array(
'post_type' => $post_type,
'meta_query' => array(
'relation' => 'AND',
Expand All @@ -757,7 +757,7 @@ public function test_filter_get_meta_sql_to_inject_customized_state() {
),
) );

$this->assertCount( 1, $query_post_where_actual_meta_and_snapshot_with_zero->posts );
$this->assertCount( 1, $query_post_where_actual_meta_and_previewed_meta_with_zero->posts );

$query_post_with_meta_value_as_array_compare_equals = new WP_Query( array(
'post_type' => $post_type,
Expand Down
1 change: 1 addition & 0 deletions tests/php/test-class-wp-customize-posts.php
Expand Up @@ -76,6 +76,7 @@ function tearDown() {
unset( $GLOBALS['wp_customize'] );
unset( $GLOBALS['wp_scripts'] );
unset( $_REQUEST['customize_snapshot_uuid'] );
unset( $_REQUEST['customize_changeset_uuid'] );
parent::tearDown();
}

Expand Down

0 comments on commit d11cba7

Please sign in to comment.