Browse
For agents
About
Yatra – Travel Booking & Tour Operator Software
/
2.2.10
Yatra – Travel Booking & Tour Operator Software
v2.2.10
Switch version
3.0.14
3.0.14.1
3.0.14.2
3.0.12
3.0.13
3.0.11
3.0.10
3.0.9
3.0.8
3.0.7
3.0.6
3.0.5
3.0.5.1
3.0.4
3.0.3
3.0.2.9
3.0.2.7
3.0.2.8
3.0.2.6
trunk
1.0.0
2.0.0
2.0.1
2.0.10
2.0.11
All 82 releases
Overview
Code
yatra
/
core
/
functions
/
pages.php
pages.php
in Yatra – Travel Booking & Tour Operator Software 2.2.10, at core/functions/pages.php
24 lines
581 B
Find file
t
No matching file
Up and down to move
Enter to open
Esc to close
Raw
Download
Zip
View raw
1
<
?
php
2
if
(
!
function_exists
(
'
yatra_has_search_shortcode
'
)
)
{
3
4
function
yatra_has_search_shortcode
(
$
current_page_id
=
0
)
5
{
6
$
current_page_id
=
$
current_page_id
>
0
?
$
current_page_id
:
get_the_ID
(
)
;
7
8
global
$
wpdb
;
9
10
$
page_id
=
$
wpdb
->
get_var
(
'
SELECT
ID
FROM
'
.
$
wpdb
->
prefix
.
'
posts WHERE post_content LIKE "%[yatra_search%" AND post_parent = 0
'
)
;
11
12
if
(
is_wp_error
(
$
page_id
)
)
{
13
return
false
;
14
}
15
16
if
(
absint
(
$
current_page_id
)
===
absint
(
$
page_id
)
)
{
17
return
true
;
18
}
19
20
return
false
;
21
22
23
}
24
}