関数 edit_post_link()
2015/01/14
関数 edit_post_link()
定義ファイル :/blog/wp-includes/link-template.php 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | function edit_post_link( $text = null, $before = '', $after = '', $id = 0 ) { if ( ! $post = get_post( $id ) ) { return; } if ( ! $url = get_edit_post_link( $post->ID ) ) { return; } if ( null === $text ) { $text = __( 'Edit This' ); } $link = '<a class="post-edit-link" href="' . $url . '">' . $text . '</a>'; echo $before . apply_filters( 'edit_post_link', $link, $post->ID, $text ) . $after; } |