Avoid PHP notices in get_sample_permalink() and get_sample_permalink_html(). Remove unused global reference. props ocean90. fixes #25005.
Built from https://develop.svn.wordpress.org/trunk@25028 git-svn-id: http://core.svn.wordpress.org/trunk@25015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -875,7 +875,7 @@ function wp_list_pages($args = '') {
|
||||
*
|
||||
* <ul>
|
||||
* <li><strong>sort_column</strong> - How to sort the list of pages. Defaults
|
||||
* to page title. Use column for posts table.</li>
|
||||
* to 'menu_order, post_title'. Use column for posts table.</li>
|
||||
* <li><strong>menu_class</strong> - Class to use for the div ID which contains
|
||||
* the page list. Defaults to 'menu'.</li>
|
||||
* <li><strong>echo</strong> - Whether to echo list or return it. Defaults to
|
||||
|
||||
@@ -647,7 +647,10 @@ function preview_theme_ob_filter_callback( $matches ) {
|
||||
)
|
||||
return $matches[1] . "#$matches[2] onclick=$matches[2]return false;" . $matches[4];
|
||||
|
||||
$link = add_query_arg( array( 'preview' => 1, 'template' => $_GET['template'], 'stylesheet' => @$_GET['stylesheet'], 'preview_iframe' => 1 ), $matches[3] );
|
||||
$stylesheet = isset( $_GET['stylesheet'] ) ? $_GET['stylesheet'] : '';
|
||||
$template = isset( $_GET['template'] ) ? $_GET['template'] : '';
|
||||
|
||||
$link = add_query_arg( array( 'preview' => 1, 'template' => $template, 'stylesheet' => $stylesheet, 'preview_iframe' => 1 ), $matches[3] );
|
||||
if ( 0 === strpos($link, 'preview=1') )
|
||||
$link = "?$link";
|
||||
return $matches[1] . esc_attr( $link ) . $matches[4];
|
||||
|
||||
Reference in New Issue
Block a user