mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Notice fixing for wp-includes. See #5607 props filosofo.
git-svn-id: https://develop.svn.wordpress.org/trunk@6592 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -142,7 +142,7 @@ function _get_page_link( $id = false ) {
|
||||
|
||||
$pagestruct = $wp_rewrite->get_page_permastruct();
|
||||
|
||||
if ( '' != $pagestruct && 'draft' != $post->post_status ) {
|
||||
if ( '' != $pagestruct && isset($post->post_status) && 'draft' != $post->post_status ) {
|
||||
$link = get_page_uri($id);
|
||||
$link = str_replace('%pagename%', $link, $pagestruct);
|
||||
$link = get_option('home') . "/$link";
|
||||
@@ -597,7 +597,7 @@ function get_pagenum_link($pagenum = 1) {
|
||||
$request = remove_query_arg( 'paged' );
|
||||
|
||||
$home_root = parse_url(get_option('home'));
|
||||
$home_root = $home_root['path'];
|
||||
$home_root = ( isset($home_root['path']) ) ? $home_root['path'] : '';
|
||||
$home_root = preg_quote( trailingslashit( $home_root ), '|' );
|
||||
|
||||
$request = preg_replace('|^'. $home_root . '|', '', $request);
|
||||
|
||||
Reference in New Issue
Block a user