Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code quality: fix $post param default values in link-template.php #8384

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/wp-includes/link-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ function get_post_permalink( $post = 0, $leavename = false, $sample = false ) {
* Default false.
* @return string The page permalink.
*/
function get_page_link( $post = false, $leavename = false, $sample = false ) {
function get_page_link( $post = 0, $leavename = false, $sample = false ) {
$post = get_post( $post );

if ( 'page' === get_option( 'show_on_front' ) && (int) get_option( 'page_on_front' ) === $post->ID ) {
Expand Down Expand Up @@ -425,7 +425,7 @@ function get_page_link( $post = false, $leavename = false, $sample = false ) {
* Default false.
* @return string The page permalink.
*/
function _get_page_link( $post = false, $leavename = false, $sample = false ) {
function _get_page_link( $post = 0, $leavename = false, $sample = false ) {
global $wp_rewrite;

$post = get_post( $post );
Expand Down Expand Up @@ -834,7 +834,7 @@ function get_post_comments_feed_link( $post_id = 0, $feed = '' ) {
* @param string $feed Optional. Feed type. Possible values include 'rss2', 'atom'.
* Default is the value of get_default_feed().
*/
function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
function post_comments_feed_link( $link_text = '', $post_id = 0, $feed = '' ) {
$url = get_post_comments_feed_link( $post_id, $feed );
if ( empty( $link_text ) ) {
$link_text = __( 'Comments Feed' );
Expand Down
Loading