Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../public_h.../wp-inclu...
File: class-wp-query.php
[4000] Fix | Delete
/**
[4001] Fix | Delete
* Makes private properties checkable for backward compatibility.
[4002] Fix | Delete
*
[4003] Fix | Delete
* @since 4.0.0
[4004] Fix | Delete
*
[4005] Fix | Delete
* @param string $name Property to check if set.
[4006] Fix | Delete
* @return bool Whether the property is set.
[4007] Fix | Delete
*/
[4008] Fix | Delete
public function __isset( $name ) {
[4009] Fix | Delete
if ( in_array( $name, $this->compat_fields, true ) ) {
[4010] Fix | Delete
return isset( $this->$name );
[4011] Fix | Delete
}
[4012] Fix | Delete
}
[4013] Fix | Delete
[4014] Fix | Delete
/**
[4015] Fix | Delete
* Makes private/protected methods readable for backward compatibility.
[4016] Fix | Delete
*
[4017] Fix | Delete
* @since 4.0.0
[4018] Fix | Delete
*
[4019] Fix | Delete
* @param string $name Method to call.
[4020] Fix | Delete
* @param array $arguments Arguments to pass when calling.
[4021] Fix | Delete
* @return mixed|false Return value of the callback, false otherwise.
[4022] Fix | Delete
*/
[4023] Fix | Delete
public function __call( $name, $arguments ) {
[4024] Fix | Delete
if ( in_array( $name, $this->compat_methods, true ) ) {
[4025] Fix | Delete
return $this->$name( ...$arguments );
[4026] Fix | Delete
}
[4027] Fix | Delete
return false;
[4028] Fix | Delete
}
[4029] Fix | Delete
[4030] Fix | Delete
/**
[4031] Fix | Delete
* Determines whether the query is for an existing archive page.
[4032] Fix | Delete
*
[4033] Fix | Delete
* Archive pages include category, tag, author, date, custom post type,
[4034] Fix | Delete
* and custom taxonomy based archives.
[4035] Fix | Delete
*
[4036] Fix | Delete
* @since 3.1.0
[4037] Fix | Delete
*
[4038] Fix | Delete
* @see WP_Query::is_category()
[4039] Fix | Delete
* @see WP_Query::is_tag()
[4040] Fix | Delete
* @see WP_Query::is_author()
[4041] Fix | Delete
* @see WP_Query::is_date()
[4042] Fix | Delete
* @see WP_Query::is_post_type_archive()
[4043] Fix | Delete
* @see WP_Query::is_tax()
[4044] Fix | Delete
*
[4045] Fix | Delete
* @return bool Whether the query is for an existing archive page.
[4046] Fix | Delete
*/
[4047] Fix | Delete
public function is_archive() {
[4048] Fix | Delete
return (bool) $this->is_archive;
[4049] Fix | Delete
}
[4050] Fix | Delete
[4051] Fix | Delete
/**
[4052] Fix | Delete
* Determines whether the query is for an existing post type archive page.
[4053] Fix | Delete
*
[4054] Fix | Delete
* @since 3.1.0
[4055] Fix | Delete
*
[4056] Fix | Delete
* @param string|string[] $post_types Optional. Post type or array of posts types
[4057] Fix | Delete
* to check against. Default empty.
[4058] Fix | Delete
* @return bool Whether the query is for an existing post type archive page.
[4059] Fix | Delete
*/
[4060] Fix | Delete
public function is_post_type_archive( $post_types = '' ) {
[4061] Fix | Delete
if ( empty( $post_types ) || ! $this->is_post_type_archive ) {
[4062] Fix | Delete
return (bool) $this->is_post_type_archive;
[4063] Fix | Delete
}
[4064] Fix | Delete
[4065] Fix | Delete
$post_type = $this->get( 'post_type' );
[4066] Fix | Delete
if ( is_array( $post_type ) ) {
[4067] Fix | Delete
$post_type = reset( $post_type );
[4068] Fix | Delete
}
[4069] Fix | Delete
$post_type_object = get_post_type_object( $post_type );
[4070] Fix | Delete
[4071] Fix | Delete
if ( ! $post_type_object ) {
[4072] Fix | Delete
return false;
[4073] Fix | Delete
}
[4074] Fix | Delete
[4075] Fix | Delete
return in_array( $post_type_object->name, (array) $post_types, true );
[4076] Fix | Delete
}
[4077] Fix | Delete
[4078] Fix | Delete
/**
[4079] Fix | Delete
* Determines whether the query is for an existing attachment page.
[4080] Fix | Delete
*
[4081] Fix | Delete
* @since 3.1.0
[4082] Fix | Delete
*
[4083] Fix | Delete
* @param int|string|int[]|string[] $attachment Optional. Attachment ID, title, slug, or array of such
[4084] Fix | Delete
* to check against. Default empty.
[4085] Fix | Delete
* @return bool Whether the query is for an existing attachment page.
[4086] Fix | Delete
*/
[4087] Fix | Delete
public function is_attachment( $attachment = '' ) {
[4088] Fix | Delete
if ( ! $this->is_attachment ) {
[4089] Fix | Delete
return false;
[4090] Fix | Delete
}
[4091] Fix | Delete
[4092] Fix | Delete
if ( empty( $attachment ) ) {
[4093] Fix | Delete
return true;
[4094] Fix | Delete
}
[4095] Fix | Delete
[4096] Fix | Delete
$attachment = array_map( 'strval', (array) $attachment );
[4097] Fix | Delete
[4098] Fix | Delete
$post_obj = $this->get_queried_object();
[4099] Fix | Delete
if ( ! $post_obj ) {
[4100] Fix | Delete
return false;
[4101] Fix | Delete
}
[4102] Fix | Delete
[4103] Fix | Delete
if ( in_array( (string) $post_obj->ID, $attachment, true ) ) {
[4104] Fix | Delete
return true;
[4105] Fix | Delete
} elseif ( in_array( $post_obj->post_title, $attachment, true ) ) {
[4106] Fix | Delete
return true;
[4107] Fix | Delete
} elseif ( in_array( $post_obj->post_name, $attachment, true ) ) {
[4108] Fix | Delete
return true;
[4109] Fix | Delete
}
[4110] Fix | Delete
return false;
[4111] Fix | Delete
}
[4112] Fix | Delete
[4113] Fix | Delete
/**
[4114] Fix | Delete
* Determines whether the query is for an existing author archive page.
[4115] Fix | Delete
*
[4116] Fix | Delete
* If the $author parameter is specified, this function will additionally
[4117] Fix | Delete
* check if the query is for one of the authors specified.
[4118] Fix | Delete
*
[4119] Fix | Delete
* @since 3.1.0
[4120] Fix | Delete
*
[4121] Fix | Delete
* @param int|string|int[]|string[] $author Optional. User ID, nickname, nicename, or array of such
[4122] Fix | Delete
* to check against. Default empty.
[4123] Fix | Delete
* @return bool Whether the query is for an existing author archive page.
[4124] Fix | Delete
*/
[4125] Fix | Delete
public function is_author( $author = '' ) {
[4126] Fix | Delete
if ( ! $this->is_author ) {
[4127] Fix | Delete
return false;
[4128] Fix | Delete
}
[4129] Fix | Delete
[4130] Fix | Delete
if ( empty( $author ) ) {
[4131] Fix | Delete
return true;
[4132] Fix | Delete
}
[4133] Fix | Delete
[4134] Fix | Delete
$author_obj = $this->get_queried_object();
[4135] Fix | Delete
if ( ! $author_obj ) {
[4136] Fix | Delete
return false;
[4137] Fix | Delete
}
[4138] Fix | Delete
[4139] Fix | Delete
$author = array_map( 'strval', (array) $author );
[4140] Fix | Delete
[4141] Fix | Delete
if ( in_array( (string) $author_obj->ID, $author, true ) ) {
[4142] Fix | Delete
return true;
[4143] Fix | Delete
} elseif ( in_array( $author_obj->nickname, $author, true ) ) {
[4144] Fix | Delete
return true;
[4145] Fix | Delete
} elseif ( in_array( $author_obj->user_nicename, $author, true ) ) {
[4146] Fix | Delete
return true;
[4147] Fix | Delete
}
[4148] Fix | Delete
[4149] Fix | Delete
return false;
[4150] Fix | Delete
}
[4151] Fix | Delete
[4152] Fix | Delete
/**
[4153] Fix | Delete
* Determines whether the query is for an existing category archive page.
[4154] Fix | Delete
*
[4155] Fix | Delete
* If the $category parameter is specified, this function will additionally
[4156] Fix | Delete
* check if the query is for one of the categories specified.
[4157] Fix | Delete
*
[4158] Fix | Delete
* @since 3.1.0
[4159] Fix | Delete
*
[4160] Fix | Delete
* @param int|string|int[]|string[] $category Optional. Category ID, name, slug, or array of such
[4161] Fix | Delete
* to check against. Default empty.
[4162] Fix | Delete
* @return bool Whether the query is for an existing category archive page.
[4163] Fix | Delete
*/
[4164] Fix | Delete
public function is_category( $category = '' ) {
[4165] Fix | Delete
if ( ! $this->is_category ) {
[4166] Fix | Delete
return false;
[4167] Fix | Delete
}
[4168] Fix | Delete
[4169] Fix | Delete
if ( empty( $category ) ) {
[4170] Fix | Delete
return true;
[4171] Fix | Delete
}
[4172] Fix | Delete
[4173] Fix | Delete
$cat_obj = $this->get_queried_object();
[4174] Fix | Delete
if ( ! $cat_obj ) {
[4175] Fix | Delete
return false;
[4176] Fix | Delete
}
[4177] Fix | Delete
[4178] Fix | Delete
$category = array_map( 'strval', (array) $category );
[4179] Fix | Delete
[4180] Fix | Delete
if ( in_array( (string) $cat_obj->term_id, $category, true ) ) {
[4181] Fix | Delete
return true;
[4182] Fix | Delete
} elseif ( in_array( $cat_obj->name, $category, true ) ) {
[4183] Fix | Delete
return true;
[4184] Fix | Delete
} elseif ( in_array( $cat_obj->slug, $category, true ) ) {
[4185] Fix | Delete
return true;
[4186] Fix | Delete
}
[4187] Fix | Delete
[4188] Fix | Delete
return false;
[4189] Fix | Delete
}
[4190] Fix | Delete
[4191] Fix | Delete
/**
[4192] Fix | Delete
* Determines whether the query is for an existing tag archive page.
[4193] Fix | Delete
*
[4194] Fix | Delete
* If the $tag parameter is specified, this function will additionally
[4195] Fix | Delete
* check if the query is for one of the tags specified.
[4196] Fix | Delete
*
[4197] Fix | Delete
* @since 3.1.0
[4198] Fix | Delete
*
[4199] Fix | Delete
* @param int|string|int[]|string[] $tag Optional. Tag ID, name, slug, or array of such
[4200] Fix | Delete
* to check against. Default empty.
[4201] Fix | Delete
* @return bool Whether the query is for an existing tag archive page.
[4202] Fix | Delete
*/
[4203] Fix | Delete
public function is_tag( $tag = '' ) {
[4204] Fix | Delete
if ( ! $this->is_tag ) {
[4205] Fix | Delete
return false;
[4206] Fix | Delete
}
[4207] Fix | Delete
[4208] Fix | Delete
if ( empty( $tag ) ) {
[4209] Fix | Delete
return true;
[4210] Fix | Delete
}
[4211] Fix | Delete
[4212] Fix | Delete
$tag_obj = $this->get_queried_object();
[4213] Fix | Delete
if ( ! $tag_obj ) {
[4214] Fix | Delete
return false;
[4215] Fix | Delete
}
[4216] Fix | Delete
[4217] Fix | Delete
$tag = array_map( 'strval', (array) $tag );
[4218] Fix | Delete
[4219] Fix | Delete
if ( in_array( (string) $tag_obj->term_id, $tag, true ) ) {
[4220] Fix | Delete
return true;
[4221] Fix | Delete
} elseif ( in_array( $tag_obj->name, $tag, true ) ) {
[4222] Fix | Delete
return true;
[4223] Fix | Delete
} elseif ( in_array( $tag_obj->slug, $tag, true ) ) {
[4224] Fix | Delete
return true;
[4225] Fix | Delete
}
[4226] Fix | Delete
[4227] Fix | Delete
return false;
[4228] Fix | Delete
}
[4229] Fix | Delete
[4230] Fix | Delete
/**
[4231] Fix | Delete
* Determines whether the query is for an existing custom taxonomy archive page.
[4232] Fix | Delete
*
[4233] Fix | Delete
* If the $taxonomy parameter is specified, this function will additionally
[4234] Fix | Delete
* check if the query is for that specific $taxonomy.
[4235] Fix | Delete
*
[4236] Fix | Delete
* If the $term parameter is specified in addition to the $taxonomy parameter,
[4237] Fix | Delete
* this function will additionally check if the query is for one of the terms
[4238] Fix | Delete
* specified.
[4239] Fix | Delete
*
[4240] Fix | Delete
* @since 3.1.0
[4241] Fix | Delete
*
[4242] Fix | Delete
* @global WP_Taxonomy[] $wp_taxonomies Registered taxonomies.
[4243] Fix | Delete
*
[4244] Fix | Delete
* @param string|string[] $taxonomy Optional. Taxonomy slug or slugs to check against.
[4245] Fix | Delete
* Default empty.
[4246] Fix | Delete
* @param int|string|int[]|string[] $term Optional. Term ID, name, slug, or array of such
[4247] Fix | Delete
* to check against. Default empty.
[4248] Fix | Delete
* @return bool Whether the query is for an existing custom taxonomy archive page.
[4249] Fix | Delete
* True for custom taxonomy archive pages, false for built-in taxonomies
[4250] Fix | Delete
* (category and tag archives).
[4251] Fix | Delete
*/
[4252] Fix | Delete
public function is_tax( $taxonomy = '', $term = '' ) {
[4253] Fix | Delete
global $wp_taxonomies;
[4254] Fix | Delete
[4255] Fix | Delete
if ( ! $this->is_tax ) {
[4256] Fix | Delete
return false;
[4257] Fix | Delete
}
[4258] Fix | Delete
[4259] Fix | Delete
if ( empty( $taxonomy ) ) {
[4260] Fix | Delete
return true;
[4261] Fix | Delete
}
[4262] Fix | Delete
[4263] Fix | Delete
$queried_object = $this->get_queried_object();
[4264] Fix | Delete
$tax_array = array_intersect( array_keys( $wp_taxonomies ), (array) $taxonomy );
[4265] Fix | Delete
$term_array = (array) $term;
[4266] Fix | Delete
[4267] Fix | Delete
// Check that the taxonomy matches.
[4268] Fix | Delete
if ( ! ( isset( $queried_object->taxonomy ) && count( $tax_array ) && in_array( $queried_object->taxonomy, $tax_array, true ) ) ) {
[4269] Fix | Delete
return false;
[4270] Fix | Delete
}
[4271] Fix | Delete
[4272] Fix | Delete
// Only a taxonomy provided.
[4273] Fix | Delete
if ( empty( $term ) ) {
[4274] Fix | Delete
return true;
[4275] Fix | Delete
}
[4276] Fix | Delete
[4277] Fix | Delete
return isset( $queried_object->term_id ) &&
[4278] Fix | Delete
count(
[4279] Fix | Delete
array_intersect(
[4280] Fix | Delete
array( $queried_object->term_id, $queried_object->name, $queried_object->slug ),
[4281] Fix | Delete
$term_array
[4282] Fix | Delete
)
[4283] Fix | Delete
);
[4284] Fix | Delete
}
[4285] Fix | Delete
[4286] Fix | Delete
/**
[4287] Fix | Delete
* Determines whether the current URL is within the comments popup window.
[4288] Fix | Delete
*
[4289] Fix | Delete
* @since 3.1.0
[4290] Fix | Delete
* @deprecated 4.5.0
[4291] Fix | Delete
*
[4292] Fix | Delete
* @return false Always returns false.
[4293] Fix | Delete
*/
[4294] Fix | Delete
public function is_comments_popup() {
[4295] Fix | Delete
_deprecated_function( __FUNCTION__, '4.5.0' );
[4296] Fix | Delete
[4297] Fix | Delete
return false;
[4298] Fix | Delete
}
[4299] Fix | Delete
[4300] Fix | Delete
/**
[4301] Fix | Delete
* Determines whether the query is for an existing date archive.
[4302] Fix | Delete
*
[4303] Fix | Delete
* @since 3.1.0
[4304] Fix | Delete
*
[4305] Fix | Delete
* @return bool Whether the query is for an existing date archive.
[4306] Fix | Delete
*/
[4307] Fix | Delete
public function is_date() {
[4308] Fix | Delete
return (bool) $this->is_date;
[4309] Fix | Delete
}
[4310] Fix | Delete
[4311] Fix | Delete
/**
[4312] Fix | Delete
* Determines whether the query is for an existing day archive.
[4313] Fix | Delete
*
[4314] Fix | Delete
* @since 3.1.0
[4315] Fix | Delete
*
[4316] Fix | Delete
* @return bool Whether the query is for an existing day archive.
[4317] Fix | Delete
*/
[4318] Fix | Delete
public function is_day() {
[4319] Fix | Delete
return (bool) $this->is_day;
[4320] Fix | Delete
}
[4321] Fix | Delete
[4322] Fix | Delete
/**
[4323] Fix | Delete
* Determines whether the query is for a feed.
[4324] Fix | Delete
*
[4325] Fix | Delete
* @since 3.1.0
[4326] Fix | Delete
*
[4327] Fix | Delete
* @param string|string[] $feeds Optional. Feed type or array of feed types
[4328] Fix | Delete
* to check against. Default empty.
[4329] Fix | Delete
* @return bool Whether the query is for a feed.
[4330] Fix | Delete
*/
[4331] Fix | Delete
public function is_feed( $feeds = '' ) {
[4332] Fix | Delete
if ( empty( $feeds ) || ! $this->is_feed ) {
[4333] Fix | Delete
return (bool) $this->is_feed;
[4334] Fix | Delete
}
[4335] Fix | Delete
[4336] Fix | Delete
$qv = $this->get( 'feed' );
[4337] Fix | Delete
if ( 'feed' === $qv ) {
[4338] Fix | Delete
$qv = get_default_feed();
[4339] Fix | Delete
}
[4340] Fix | Delete
[4341] Fix | Delete
return in_array( $qv, (array) $feeds, true );
[4342] Fix | Delete
}
[4343] Fix | Delete
[4344] Fix | Delete
/**
[4345] Fix | Delete
* Determines whether the query is for a comments feed.
[4346] Fix | Delete
*
[4347] Fix | Delete
* @since 3.1.0
[4348] Fix | Delete
*
[4349] Fix | Delete
* @return bool Whether the query is for a comments feed.
[4350] Fix | Delete
*/
[4351] Fix | Delete
public function is_comment_feed() {
[4352] Fix | Delete
return (bool) $this->is_comment_feed;
[4353] Fix | Delete
}
[4354] Fix | Delete
[4355] Fix | Delete
/**
[4356] Fix | Delete
* Determines whether the query is for the front page of the site.
[4357] Fix | Delete
*
[4358] Fix | Delete
* This is for what is displayed at your site's main URL.
[4359] Fix | Delete
*
[4360] Fix | Delete
* Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_on_front'.
[4361] Fix | Delete
*
[4362] Fix | Delete
* If you set a static page for the front page of your site, this function will return
[4363] Fix | Delete
* true when viewing that page.
[4364] Fix | Delete
*
[4365] Fix | Delete
* Otherwise the same as {@see WP_Query::is_home()}.
[4366] Fix | Delete
*
[4367] Fix | Delete
* @since 3.1.0
[4368] Fix | Delete
*
[4369] Fix | Delete
* @return bool Whether the query is for the front page of the site.
[4370] Fix | Delete
*/
[4371] Fix | Delete
public function is_front_page() {
[4372] Fix | Delete
// Most likely case.
[4373] Fix | Delete
if ( 'posts' === get_option( 'show_on_front' ) && $this->is_home() ) {
[4374] Fix | Delete
return true;
[4375] Fix | Delete
} elseif ( 'page' === get_option( 'show_on_front' ) && get_option( 'page_on_front' )
[4376] Fix | Delete
&& $this->is_page( get_option( 'page_on_front' ) )
[4377] Fix | Delete
) {
[4378] Fix | Delete
return true;
[4379] Fix | Delete
} else {
[4380] Fix | Delete
return false;
[4381] Fix | Delete
}
[4382] Fix | Delete
}
[4383] Fix | Delete
[4384] Fix | Delete
/**
[4385] Fix | Delete
* Determines whether the query is for the blog homepage.
[4386] Fix | Delete
*
[4387] Fix | Delete
* This is the page which shows the time based blog content of your site.
[4388] Fix | Delete
*
[4389] Fix | Delete
* Depends on the site's "Front page displays" Reading Settings 'show_on_front' and 'page_for_posts'.
[4390] Fix | Delete
*
[4391] Fix | Delete
* If you set a static page for the front page of your site, this function will return
[4392] Fix | Delete
* true only on the page you set as the "Posts page".
[4393] Fix | Delete
*
[4394] Fix | Delete
* @since 3.1.0
[4395] Fix | Delete
*
[4396] Fix | Delete
* @see WP_Query::is_front_page()
[4397] Fix | Delete
*
[4398] Fix | Delete
* @return bool Whether the query is for the blog homepage.
[4399] Fix | Delete
*/
[4400] Fix | Delete
public function is_home() {
[4401] Fix | Delete
return (bool) $this->is_home;
[4402] Fix | Delete
}
[4403] Fix | Delete
[4404] Fix | Delete
/**
[4405] Fix | Delete
* Determines whether the query is for the Privacy Policy page.
[4406] Fix | Delete
*
[4407] Fix | Delete
* This is the page which shows the Privacy Policy content of your site.
[4408] Fix | Delete
*
[4409] Fix | Delete
* Depends on the site's "Change your Privacy Policy page" Privacy Settings 'wp_page_for_privacy_policy'.
[4410] Fix | Delete
*
[4411] Fix | Delete
* This function will return true only on the page you set as the "Privacy Policy page".
[4412] Fix | Delete
*
[4413] Fix | Delete
* @since 5.2.0
[4414] Fix | Delete
*
[4415] Fix | Delete
* @return bool Whether the query is for the Privacy Policy page.
[4416] Fix | Delete
*/
[4417] Fix | Delete
public function is_privacy_policy() {
[4418] Fix | Delete
if ( get_option( 'wp_page_for_privacy_policy' )
[4419] Fix | Delete
&& $this->is_page( get_option( 'wp_page_for_privacy_policy' ) )
[4420] Fix | Delete
) {
[4421] Fix | Delete
return true;
[4422] Fix | Delete
} else {
[4423] Fix | Delete
return false;
[4424] Fix | Delete
}
[4425] Fix | Delete
}
[4426] Fix | Delete
[4427] Fix | Delete
/**
[4428] Fix | Delete
* Determines whether the query is for an existing month archive.
[4429] Fix | Delete
*
[4430] Fix | Delete
* @since 3.1.0
[4431] Fix | Delete
*
[4432] Fix | Delete
* @return bool Whether the query is for an existing month archive.
[4433] Fix | Delete
*/
[4434] Fix | Delete
public function is_month() {
[4435] Fix | Delete
return (bool) $this->is_month;
[4436] Fix | Delete
}
[4437] Fix | Delete
[4438] Fix | Delete
/**
[4439] Fix | Delete
* Determines whether the query is for an existing single page.
[4440] Fix | Delete
*
[4441] Fix | Delete
* If the $page parameter is specified, this function will additionally
[4442] Fix | Delete
* check if the query is for one of the pages specified.
[4443] Fix | Delete
*
[4444] Fix | Delete
* @since 3.1.0
[4445] Fix | Delete
*
[4446] Fix | Delete
* @see WP_Query::is_single()
[4447] Fix | Delete
* @see WP_Query::is_singular()
[4448] Fix | Delete
*
[4449] Fix | Delete
* @param int|string|int[]|string[] $page Optional. Page ID, title, slug, path, or array of such
[4450] Fix | Delete
* to check against. Default empty.
[4451] Fix | Delete
* @return bool Whether the query is for an existing single page.
[4452] Fix | Delete
*/
[4453] Fix | Delete
public function is_page( $page = '' ) {
[4454] Fix | Delete
if ( ! $this->is_page ) {
[4455] Fix | Delete
return false;
[4456] Fix | Delete
}
[4457] Fix | Delete
[4458] Fix | Delete
if ( empty( $page ) ) {
[4459] Fix | Delete
return true;
[4460] Fix | Delete
}
[4461] Fix | Delete
[4462] Fix | Delete
$page_obj = $this->get_queried_object();
[4463] Fix | Delete
if ( ! $page_obj ) {
[4464] Fix | Delete
return false;
[4465] Fix | Delete
}
[4466] Fix | Delete
[4467] Fix | Delete
$page = array_map( 'strval', (array) $page );
[4468] Fix | Delete
[4469] Fix | Delete
if ( in_array( (string) $page_obj->ID, $page, true ) ) {
[4470] Fix | Delete
return true;
[4471] Fix | Delete
} elseif ( in_array( $page_obj->post_title, $page, true ) ) {
[4472] Fix | Delete
return true;
[4473] Fix | Delete
} elseif ( in_array( $page_obj->post_name, $page, true ) ) {
[4474] Fix | Delete
return true;
[4475] Fix | Delete
} else {
[4476] Fix | Delete
foreach ( $page as $pagepath ) {
[4477] Fix | Delete
if ( ! strpos( $pagepath, '/' ) ) {
[4478] Fix | Delete
continue;
[4479] Fix | Delete
}
[4480] Fix | Delete
$pagepath_obj = get_page_by_path( $pagepath );
[4481] Fix | Delete
[4482] Fix | Delete
if ( $pagepath_obj && ( $pagepath_obj->ID == $page_obj->ID ) ) {
[4483] Fix | Delete
return true;
[4484] Fix | Delete
}
[4485] Fix | Delete
}
[4486] Fix | Delete
}
[4487] Fix | Delete
[4488] Fix | Delete
return false;
[4489] Fix | Delete
}
[4490] Fix | Delete
[4491] Fix | Delete
/**
[4492] Fix | Delete
* Determines whether the query is for a paged result and not for the first page.
[4493] Fix | Delete
*
[4494] Fix | Delete
* @since 3.1.0
[4495] Fix | Delete
*
[4496] Fix | Delete
* @return bool Whether the query is for a paged result.
[4497] Fix | Delete
*/
[4498] Fix | Delete
public function is_paged() {
[4499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function