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

Add phpdoc type hints and add WP 4.5 to build matrix #120

Merged
merged 3 commits into from
Apr 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ php:
- 7.0

env:
- WP_VERSION=4.5 WP_MULTISITE=0
- WP_VERSION=trunk WP_MULTISITE=0
- WP_VERSION=trunk WP_MULTISITE=1

Expand Down
6 changes: 6 additions & 0 deletions php/class-wp-customize-post-field-partial.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ public function render_callback( WP_Customize_Partial $partial, $context = array
return false;
}

/**
* Partial.
*
* @var WP_Customize_Post_Field_Partial $partial
*/

$GLOBALS['post'] = $post; // WPCS: override global ok.
setup_postdata( $post );
if ( 'post_title' === $this->field_id ) {
Expand Down
5 changes: 5 additions & 0 deletions php/class-wp-customize-posts-preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,11 @@ public function export_registered_settings( $results ) {

$results['customize_post_settings'] = array();
foreach ( $this->component->manager->settings() as $setting ) {
/**
* Setting.
*
* @var WP_Customize_Setting $setting
*/
if ( ! $setting->check_capabilities() ) {
continue;
}
Expand Down