|
@@ 317-320 (lines=4) @@
|
| 314 |
|
function get_page_link( $post = false, $leavename = false, $sample = false ) { |
| 315 |
|
$post = get_post( $post ); |
| 316 |
|
|
| 317 |
|
if ( 'page' == get_option( 'show_on_front' ) && $post->ID == get_option( 'page_on_front' ) ) |
| 318 |
|
$link = home_url('/'); |
| 319 |
|
else |
| 320 |
|
$link = _get_page_link( $post, $leavename, $sample ); |
| 321 |
|
|
| 322 |
|
/** |
| 323 |
|
* Filters the permalink for a page. |
|
@@ 646-649 (lines=4) @@
|
| 643 |
|
$unattached = 'attachment' === $post->post_type && 0 === (int) $post->post_parent; |
| 644 |
|
|
| 645 |
|
if ( '' != get_option('permalink_structure') ) { |
| 646 |
|
if ( 'page' == get_option('show_on_front') && $post_id == get_option('page_on_front') ) |
| 647 |
|
$url = _get_page_link( $post_id ); |
| 648 |
|
else |
| 649 |
|
$url = get_permalink($post_id); |
| 650 |
|
|
| 651 |
|
if ( $unattached ) { |
| 652 |
|
$url = home_url( '/feed/' ); |