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

Commit

Permalink
Merge pull request #314 from xwp/feature/restore-edit-post-link-in-wp47
Browse files Browse the repository at this point in the history
Restore edit_post_link() in WordPress 4.7
  • Loading branch information
westonruter committed Nov 4, 2016
2 parents 3303db6 + bf03897 commit a54e686
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions php/class-wp-customize-posts-preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public function customize_preview_init() {
add_filter( 'get_avatar', array( $this, 'filter_get_avatar' ), 10, 6 );
add_filter( 'infinite_scroll_results', array( $this, 'amend_with_queried_post_ids' ) );
add_filter( 'customize_render_partials_response', array( $this, 'amend_with_queried_post_ids' ) );
remove_filter( 'get_edit_post_link', '__return_empty_string' ); // See <https://core.trac.wordpress.org/ticket/38648>.
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function test_sanitize_setting() {
$has_setting_validation = method_exists( 'WP_Customize_Setting', 'validate' );

$controller = new WP_Customize_Page_Template_Controller();
$post = get_post( $this->factory()->post->create() );
$post = get_post( $this->factory()->post->create( array( 'post_type' => 'page' ) ) );
$setting_id = WP_Customize_Postmeta_Setting::get_post_meta_setting_id( $post, $controller->meta_key );
$setting = new WP_Customize_Postmeta_Setting( $this->wp_customize, $setting_id );

Expand Down
2 changes: 1 addition & 1 deletion tests/php/test-class-wp-customize-postmeta-setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ function sanitize_abbreviation( $value ) {
function test_sanitize_page_template_setting() {
switch_theme( 'twentytwelve' );

$post_id = $this->factory()->post->create( array( 'post_type' => 'post') );
$post_id = $this->factory()->post->create( array( 'post_type' => 'page' ) );
$meta_key = '_wp_page_template';
register_meta( 'post', $meta_key, array( $this->plugin->page_template_controller, 'sanitize_value' ) );
$setting_id = WP_Customize_Postmeta_Setting::get_post_meta_setting_id( get_post( $post_id ), $meta_key );
Expand Down

0 comments on commit a54e686

Please sign in to comment.