@@ -13,46 +13,46 @@ |
||
13 | 13 | * |
14 | 14 | * @return bool|null true if the ticket is resolved, false if not resolved, null on error |
15 | 15 | */ |
16 | - public static function isTracTicketClosed( $trac_url, $ticket_id ) { |
|
17 | - if ( ! extension_loaded( 'openssl' ) ) { |
|
18 | - $trac_url = preg_replace( "/^https:/", "http:", $trac_url ); |
|
16 | + public static function isTracTicketClosed($trac_url, $ticket_id) { |
|
17 | + if (!extension_loaded('openssl')) { |
|
18 | + $trac_url = preg_replace("/^https:/", "http:", $trac_url); |
|
19 | 19 | } |
20 | 20 | |
21 | - if ( ! isset( self::$trac_ticket_cache[ $trac_url ] ) ) { |
|
21 | + if (!isset(self::$trac_ticket_cache[$trac_url])) { |
|
22 | 22 | // In case you're running the tests offline, keep track of open tickets. |
23 | - $file = DIR_TESTDATA . '/.trac-ticket-cache.' . str_replace( array( 'http://', 'https://', '/' ), array( '', '', '-' ), rtrim( $trac_url, '/' ) ); |
|
24 | - $tickets = @file_get_contents( $trac_url . '/query?status=%21closed&format=csv&col=id' ); |
|
23 | + $file = DIR_TESTDATA.'/.trac-ticket-cache.'.str_replace(array('http://', 'https://', '/'), array('', '', '-'), rtrim($trac_url, '/')); |
|
24 | + $tickets = @file_get_contents($trac_url.'/query?status=%21closed&format=csv&col=id'); |
|
25 | 25 | // Check if our HTTP request failed. |
26 | - if ( false === $tickets ) { |
|
27 | - if ( file_exists( $file ) ) { |
|
28 | - register_shutdown_function( array( 'TracTickets', 'usingLocalCache' ) ); |
|
29 | - $tickets = file_get_contents( $file ); |
|
26 | + if (false === $tickets) { |
|
27 | + if (file_exists($file)) { |
|
28 | + register_shutdown_function(array('TracTickets', 'usingLocalCache')); |
|
29 | + $tickets = file_get_contents($file); |
|
30 | 30 | } else { |
31 | - register_shutdown_function( array( 'TracTickets', 'forcingKnownBugs' ) ); |
|
32 | - self::$trac_ticket_cache[ $trac_url ] = array(); |
|
31 | + register_shutdown_function(array('TracTickets', 'forcingKnownBugs')); |
|
32 | + self::$trac_ticket_cache[$trac_url] = array(); |
|
33 | 33 | return true; // Assume the ticket is closed, which means it gets run. |
34 | 34 | } |
35 | 35 | } else { |
36 | - $tickets = substr( $tickets, 2 ); // remove 'id' column header |
|
37 | - $tickets = trim( $tickets ); |
|
38 | - file_put_contents( $file, $tickets ); |
|
36 | + $tickets = substr($tickets, 2); // remove 'id' column header |
|
37 | + $tickets = trim($tickets); |
|
38 | + file_put_contents($file, $tickets); |
|
39 | 39 | } |
40 | - $tickets = explode( "\r\n", $tickets ); |
|
41 | - self::$trac_ticket_cache[ $trac_url ] = $tickets; |
|
40 | + $tickets = explode("\r\n", $tickets); |
|
41 | + self::$trac_ticket_cache[$trac_url] = $tickets; |
|
42 | 42 | } |
43 | 43 | |
44 | - return ! in_array( $ticket_id, self::$trac_ticket_cache[ $trac_url ] ); |
|
44 | + return !in_array($ticket_id, self::$trac_ticket_cache[$trac_url]); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public static function usingLocalCache() { |
48 | - echo PHP_EOL . "\x1b[0m\x1b[30;43m\x1b[2K"; |
|
49 | - echo 'INFO: Trac was inaccessible, so a local ticket status cache was used.' . PHP_EOL; |
|
48 | + echo PHP_EOL."\x1b[0m\x1b[30;43m\x1b[2K"; |
|
49 | + echo 'INFO: Trac was inaccessible, so a local ticket status cache was used.'.PHP_EOL; |
|
50 | 50 | echo "\x1b[0m\x1b[2K"; |
51 | 51 | } |
52 | 52 | |
53 | 53 | public static function forcingKnownBugs() { |
54 | - echo PHP_EOL . "\x1b[0m\x1b[37;41m\x1b[2K"; |
|
55 | - echo "ERROR: Trac was inaccessible, so known bugs weren't able to be skipped." . PHP_EOL; |
|
54 | + echo PHP_EOL."\x1b[0m\x1b[37;41m\x1b[2K"; |
|
55 | + echo "ERROR: Trac was inaccessible, so known bugs weren't able to be skipped.".PHP_EOL; |
|
56 | 56 | echo "\x1b[0m\x1b[2K"; |
57 | 57 | } |
58 | 58 | } |
@@ -38,13 +38,13 @@ |
||
38 | 38 | <?php |
39 | 39 | global $geodir_signup_error; |
40 | 40 | if ($geodir_signup_error != '') { |
41 | - echo '<p class="error_msg">' . $geodir_signup_error . '</p>'; |
|
41 | + echo '<p class="error_msg">'.$geodir_signup_error.'</p>'; |
|
42 | 42 | unset($geodir_signup_error); |
43 | 43 | } else { |
44 | 44 | if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 1) { |
45 | - echo '<p class="error_msg">' . EMAIL_USERNAME_EXIST_MSG . '</p>'; |
|
45 | + echo '<p class="error_msg">'.EMAIL_USERNAME_EXIST_MSG.'</p>'; |
|
46 | 46 | } else if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'regnewusr') { |
47 | - echo '<p class="error_msg">' . REGISTRATION_DESABLED_MSG . '</p>'; |
|
47 | + echo '<p class="error_msg">'.REGISTRATION_DESABLED_MSG.'</p>'; |
|
48 | 48 | } |
49 | 49 | } |
50 | 50 | ?> |
@@ -9,13 +9,13 @@ discard block |
||
9 | 9 | * @package GeoDirectory |
10 | 10 | */ |
11 | 11 | if (isset($_GET['redirect_to']) && $_GET['redirect_to'] != '') { |
12 | - $redirect_to = $_GET['redirect_to']; |
|
12 | + $redirect_to = $_GET['redirect_to']; |
|
13 | 13 | } else { |
14 | - //echo $_SERVER['HTTP_HOST'] ; |
|
15 | - $redirect_to = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; |
|
16 | - if (strpos($redirect_to, $_SERVER['HTTP_HOST']) === false) { |
|
17 | - $redirect_to = home_url(); |
|
18 | - } |
|
14 | + //echo $_SERVER['HTTP_HOST'] ; |
|
15 | + $redirect_to = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; |
|
16 | + if (strpos($redirect_to, $_SERVER['HTTP_HOST']) === false) { |
|
17 | + $redirect_to = home_url(); |
|
18 | + } |
|
19 | 19 | } |
20 | 20 | ?> |
21 | 21 | <div id="sign_up"> |
@@ -26,28 +26,28 @@ discard block |
||
26 | 26 | <h4> |
27 | 27 | <?php |
28 | 28 | |
29 | - /** |
|
30 | - * Filter the `REGISTRATION_NOW_TEXT` title text on the register form template. |
|
31 | - * |
|
32 | - * @since 1.0.0 |
|
33 | - */ |
|
34 | - echo apply_filters('geodir_registration_page_title', REGISTRATION_NOW_TEXT); |
|
29 | + /** |
|
30 | + * Filter the `REGISTRATION_NOW_TEXT` title text on the register form template. |
|
31 | + * |
|
32 | + * @since 1.0.0 |
|
33 | + */ |
|
34 | + echo apply_filters('geodir_registration_page_title', REGISTRATION_NOW_TEXT); |
|
35 | 35 | |
36 | - ?> |
|
36 | + ?> |
|
37 | 37 | </h4> |
38 | 38 | <?php |
39 | - global $geodir_signup_error; |
|
40 | - if ($geodir_signup_error != '') { |
|
41 | - echo '<p class="error_msg">' . $geodir_signup_error . '</p>'; |
|
42 | - unset($geodir_signup_error); |
|
43 | - } else { |
|
44 | - if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 1) { |
|
45 | - echo '<p class="error_msg">' . EMAIL_USERNAME_EXIST_MSG . '</p>'; |
|
46 | - } else if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'regnewusr') { |
|
47 | - echo '<p class="error_msg">' . REGISTRATION_DESABLED_MSG . '</p>'; |
|
48 | - } |
|
49 | - } |
|
50 | - ?> |
|
39 | + global $geodir_signup_error; |
|
40 | + if ($geodir_signup_error != '') { |
|
41 | + echo '<p class="error_msg">' . $geodir_signup_error . '</p>'; |
|
42 | + unset($geodir_signup_error); |
|
43 | + } else { |
|
44 | + if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 1) { |
|
45 | + echo '<p class="error_msg">' . EMAIL_USERNAME_EXIST_MSG . '</p>'; |
|
46 | + } else if (isset($_REQUEST['emsg']) && $_REQUEST['emsg'] == 'regnewusr') { |
|
47 | + echo '<p class="error_msg">' . REGISTRATION_DESABLED_MSG . '</p>'; |
|
48 | + } |
|
49 | + } |
|
50 | + ?> |
|
51 | 51 | |
52 | 52 | <form name="cus_registerform" id="cus_registerform" method="post"> |
53 | 53 | <input type="hidden" name="action" value="register"/> |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | <div class="form_row clearfix"> |
58 | 58 | <input placeholder='<?php echo FIRST_NAME_TEXT; ?>' type="text" name="user_fname" id="user_fname" |
59 | 59 | class="textfield" value="<?php if (isset($user_fname)) { |
60 | - echo esc_attr(stripslashes($user_fname)); |
|
61 | - } ?>" size="25"/> |
|
60 | + echo esc_attr(stripslashes($user_fname)); |
|
61 | + } ?>" size="25"/> |
|
62 | 62 | <span id="user_fnameInfo"></span> |
63 | 63 | </div> |
64 | 64 | </div> |
@@ -66,10 +66,10 @@ discard block |
||
66 | 66 | <div class="form_row clearfix"> |
67 | 67 | <input placeholder='<?php echo EMAIL_TEXT; ?>' type="text" name="user_email" id="user_email" |
68 | 68 | class="textfield" value="<?php global $user_email; |
69 | - if (!isset($user_email)) { |
|
70 | - $user_email = ''; |
|
71 | - } |
|
72 | - echo esc_attr(stripslashes($user_email)); ?>" size="25"/> |
|
69 | + if (!isset($user_email)) { |
|
70 | + $user_email = ''; |
|
71 | + } |
|
72 | + echo esc_attr(stripslashes($user_email)); ?>" size="25"/> |
|
73 | 73 | |
74 | 74 | <?php if (!get_option('geodir_allow_cpass')) { ?> |
75 | 75 | <div id="reg_passmail"> |
@@ -100,14 +100,14 @@ discard block |
||
100 | 100 | <?php } ?> |
101 | 101 | |
102 | 102 | <?php |
103 | - /** |
|
104 | - * Called just before the register new user button on the register form template. |
|
105 | - * |
|
106 | - * Also used by other plugins to add social connect buttons. |
|
107 | - * |
|
108 | - * @since 1.0.0 |
|
109 | - */ |
|
110 | - do_action('social_connect_form'); ?> |
|
103 | + /** |
|
104 | + * Called just before the register new user button on the register form template. |
|
105 | + * |
|
106 | + * Also used by other plugins to add social connect buttons. |
|
107 | + * |
|
108 | + * @since 1.0.0 |
|
109 | + */ |
|
110 | + do_action('social_connect_form'); ?> |
|
111 | 111 | <input type="submit" name="registernow" value="<?php echo REGISTER_NOW_TEXT; ?>" class="geodir_button"/> |
112 | 112 | </form> |
113 | 113 | </div> |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | |
158 | 158 | $delimiter = ' / '; |
159 | 159 | |
160 | - echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">'; |
|
160 | + echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner '.$breadcrumb_skin_class.'-skin">'; |
|
161 | 161 | |
162 | 162 | echo implode($delimiter, $item); |
163 | 163 | echo "</div></div>"; |
@@ -185,10 +185,10 @@ discard block |
||
185 | 185 | $align = !empty($align) ? $align : 'left'; |
186 | 186 | |
187 | 187 | //$title = 'xxxx'; |
188 | - echo '<section id="mk-page-introduce" class="intro-' . $align . '">'; |
|
188 | + echo '<section id="mk-page-introduce" class="intro-'.$align.'">'; |
|
189 | 189 | echo '<div class="mk-grid">'; |
190 | 190 | if (!empty($title)) { |
191 | - echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>'; |
|
191 | + echo '<h1 class="page-introduce-title '.$shadow_css.'">'.$title.'</h1>'; |
|
192 | 192 | |
193 | 193 | } |
194 | 194 |
@@ -16,28 +16,28 @@ discard block |
||
16 | 16 | */ |
17 | 17 | function jupiter_action_calls() |
18 | 18 | { |
19 | - // REMOVE BREADCRUMB |
|
20 | - remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | - remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | - remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | - remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | - remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | - remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
26 | - |
|
27 | - // REMOVE PAGE TITLES |
|
28 | - remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
29 | - remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10); |
|
30 | - remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
31 | - remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
32 | - remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
33 | - |
|
34 | - |
|
35 | - // CAHNGE PAGE TITLES |
|
36 | - remove_action('page_title', 'mk_page_title'); |
|
37 | - add_action('page_title', 'gd_mk_page_title'); |
|
38 | - // CHANGE BREADCRUMS FOR GD PAGES |
|
39 | - remove_action('theme_breadcrumbs', 'mk_theme_breadcrumbs'); |
|
40 | - add_action('theme_breadcrumbs', 'gd_mk_theme_breadcrumbs'); |
|
19 | + // REMOVE BREADCRUMB |
|
20 | + remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
21 | + remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
22 | + remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
23 | + remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
24 | + remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
25 | + remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
26 | + |
|
27 | + // REMOVE PAGE TITLES |
|
28 | + remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
29 | + remove_action('geodir_add_listing_page_title', 'geodir_action_add_listing_page_title', 10); |
|
30 | + remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
31 | + remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
32 | + remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
33 | + |
|
34 | + |
|
35 | + // CAHNGE PAGE TITLES |
|
36 | + remove_action('page_title', 'mk_page_title'); |
|
37 | + add_action('page_title', 'gd_mk_page_title'); |
|
38 | + // CHANGE BREADCRUMS FOR GD PAGES |
|
39 | + remove_action('theme_breadcrumbs', 'mk_theme_breadcrumbs'); |
|
40 | + add_action('theme_breadcrumbs', 'gd_mk_theme_breadcrumbs'); |
|
41 | 41 | |
42 | 42 | |
43 | 43 | } |
@@ -52,19 +52,19 @@ discard block |
||
52 | 52 | function gd_mk_theme_breadcrumbs() |
53 | 53 | { |
54 | 54 | |
55 | - if (is_page_geodir_home() || geodir_is_page('location') || geodir_is_page('home')) { |
|
56 | - jupiter_geodir_breadcrumb(); |
|
57 | - } elseif (geodir_is_page('listing')) { |
|
58 | - jupiter_geodir_breadcrumb(); |
|
59 | - } elseif (geodir_is_page('detail')) { |
|
60 | - jupiter_geodir_breadcrumb(); |
|
61 | - } elseif (geodir_is_page('search')) { |
|
62 | - jupiter_geodir_breadcrumb(); |
|
63 | - } elseif (geodir_is_page('author')) { |
|
64 | - jupiter_geodir_breadcrumb(); |
|
65 | - } else { |
|
66 | - mk_theme_breadcrumbs(); |
|
67 | - } |
|
55 | + if (is_page_geodir_home() || geodir_is_page('location') || geodir_is_page('home')) { |
|
56 | + jupiter_geodir_breadcrumb(); |
|
57 | + } elseif (geodir_is_page('listing')) { |
|
58 | + jupiter_geodir_breadcrumb(); |
|
59 | + } elseif (geodir_is_page('detail')) { |
|
60 | + jupiter_geodir_breadcrumb(); |
|
61 | + } elseif (geodir_is_page('search')) { |
|
62 | + jupiter_geodir_breadcrumb(); |
|
63 | + } elseif (geodir_is_page('author')) { |
|
64 | + jupiter_geodir_breadcrumb(); |
|
65 | + } else { |
|
66 | + mk_theme_breadcrumbs(); |
|
67 | + } |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -76,35 +76,35 @@ discard block |
||
76 | 76 | */ |
77 | 77 | function gd_mk_page_title() |
78 | 78 | { |
79 | - global $wp; |
|
80 | - |
|
81 | - |
|
82 | - if (is_page_geodir_home() || geodir_is_page('location') || geodir_is_page('home')) { |
|
83 | - jupiter_geodir_page_title(); |
|
84 | - } elseif (geodir_is_page('listing')) { |
|
85 | - ob_start(); // Start buffering; |
|
86 | - geodir_action_listings_title(); |
|
87 | - $gd_title = ob_get_clean(); |
|
88 | - $title_p = explode('">', $gd_title); |
|
89 | - $title = str_replace('</h1></header>', "", $title_p[2]); |
|
90 | - jupiter_geodir_page_title($title); |
|
91 | - } elseif (geodir_is_page('search')) { |
|
92 | - ob_start(); // Start buffering; |
|
93 | - geodir_action_listings_title(); |
|
94 | - $gd_title = ob_get_clean(); |
|
95 | - $title_p = explode('">', $gd_title); |
|
96 | - $title = str_replace('</h1></header>', "", $title_p[2]); |
|
97 | - jupiter_geodir_page_title($title); |
|
98 | - } elseif (geodir_is_page('author')) { |
|
99 | - ob_start(); // Start buffering; |
|
100 | - geodir_action_author_page_title(); |
|
101 | - $gd_title = ob_get_clean(); |
|
102 | - $gd_title = str_replace('<h1>', "", $gd_title); |
|
103 | - $gd_title = str_replace('</h1>', "", $gd_title); |
|
104 | - jupiter_geodir_page_title($gd_title); |
|
105 | - } else { |
|
106 | - mk_page_title(); |
|
107 | - } |
|
79 | + global $wp; |
|
80 | + |
|
81 | + |
|
82 | + if (is_page_geodir_home() || geodir_is_page('location') || geodir_is_page('home')) { |
|
83 | + jupiter_geodir_page_title(); |
|
84 | + } elseif (geodir_is_page('listing')) { |
|
85 | + ob_start(); // Start buffering; |
|
86 | + geodir_action_listings_title(); |
|
87 | + $gd_title = ob_get_clean(); |
|
88 | + $title_p = explode('">', $gd_title); |
|
89 | + $title = str_replace('</h1></header>', "", $title_p[2]); |
|
90 | + jupiter_geodir_page_title($title); |
|
91 | + } elseif (geodir_is_page('search')) { |
|
92 | + ob_start(); // Start buffering; |
|
93 | + geodir_action_listings_title(); |
|
94 | + $gd_title = ob_get_clean(); |
|
95 | + $title_p = explode('">', $gd_title); |
|
96 | + $title = str_replace('</h1></header>', "", $title_p[2]); |
|
97 | + jupiter_geodir_page_title($title); |
|
98 | + } elseif (geodir_is_page('author')) { |
|
99 | + ob_start(); // Start buffering; |
|
100 | + geodir_action_author_page_title(); |
|
101 | + $gd_title = ob_get_clean(); |
|
102 | + $gd_title = str_replace('<h1>', "", $gd_title); |
|
103 | + $gd_title = str_replace('</h1>', "", $gd_title); |
|
104 | + jupiter_geodir_page_title($gd_title); |
|
105 | + } else { |
|
106 | + mk_page_title(); |
|
107 | + } |
|
108 | 108 | |
109 | 109 | |
110 | 110 | } |
@@ -119,48 +119,48 @@ discard block |
||
119 | 119 | */ |
120 | 120 | function jupiter_geodir_breadcrumb() |
121 | 121 | { |
122 | - $item = ''; |
|
123 | - ob_start(); // Start buffering; |
|
124 | - geodir_breadcrumb(); |
|
125 | - $gd_crums = ob_get_clean(); |
|
126 | - if ($gd_crums) { |
|
127 | - $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
128 | - $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
129 | - $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
130 | - $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
131 | - $gd_crums = explode(" > ", $gd_crums); |
|
132 | - $trail_end = array_pop($gd_crums); |
|
133 | - $gd_crums['trail_end'] = $trail_end; |
|
134 | - //print_r($gd_crums);exit; |
|
135 | - //print_r($trail); |
|
136 | - $item = $gd_crums; |
|
137 | - |
|
138 | - } |
|
139 | - if (!$item) { |
|
140 | - return; |
|
141 | - } |
|
142 | - global $mk_options, $post; |
|
143 | - $post_id = global_get_post_id(); |
|
144 | - |
|
145 | - if ($post_id) { |
|
146 | - $local_skining = get_post_meta($post_id, '_enable_local_backgrounds', true); |
|
147 | - $breadcrumb_skin = get_post_meta($post_id, '_breadcrumb_skin', true); |
|
148 | - if ($local_skining == 'true' && !empty($breadcrumb_skin)) { |
|
149 | - $breadcrumb_skin_class = $breadcrumb_skin; |
|
150 | - } else { |
|
151 | - $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
152 | - } |
|
153 | - } else { |
|
154 | - $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
155 | - } |
|
156 | - |
|
157 | - |
|
158 | - $delimiter = ' / '; |
|
159 | - |
|
160 | - echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">'; |
|
161 | - |
|
162 | - echo implode($delimiter, $item); |
|
163 | - echo "</div></div>"; |
|
122 | + $item = ''; |
|
123 | + ob_start(); // Start buffering; |
|
124 | + geodir_breadcrumb(); |
|
125 | + $gd_crums = ob_get_clean(); |
|
126 | + if ($gd_crums) { |
|
127 | + $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
128 | + $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
129 | + $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
130 | + $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
131 | + $gd_crums = explode(" > ", $gd_crums); |
|
132 | + $trail_end = array_pop($gd_crums); |
|
133 | + $gd_crums['trail_end'] = $trail_end; |
|
134 | + //print_r($gd_crums);exit; |
|
135 | + //print_r($trail); |
|
136 | + $item = $gd_crums; |
|
137 | + |
|
138 | + } |
|
139 | + if (!$item) { |
|
140 | + return; |
|
141 | + } |
|
142 | + global $mk_options, $post; |
|
143 | + $post_id = global_get_post_id(); |
|
144 | + |
|
145 | + if ($post_id) { |
|
146 | + $local_skining = get_post_meta($post_id, '_enable_local_backgrounds', true); |
|
147 | + $breadcrumb_skin = get_post_meta($post_id, '_breadcrumb_skin', true); |
|
148 | + if ($local_skining == 'true' && !empty($breadcrumb_skin)) { |
|
149 | + $breadcrumb_skin_class = $breadcrumb_skin; |
|
150 | + } else { |
|
151 | + $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
152 | + } |
|
153 | + } else { |
|
154 | + $breadcrumb_skin_class = $mk_options['breadcrumb_skin']; |
|
155 | + } |
|
156 | + |
|
157 | + |
|
158 | + $delimiter = ' / '; |
|
159 | + |
|
160 | + echo '<div id="mk-breadcrumbs"><div class="mk-breadcrumbs-inner ' . $breadcrumb_skin_class . '-skin">'; |
|
161 | + |
|
162 | + echo implode($delimiter, $item); |
|
163 | + echo "</div></div>"; |
|
164 | 164 | |
165 | 165 | } |
166 | 166 | |
@@ -174,41 +174,41 @@ discard block |
||
174 | 174 | */ |
175 | 175 | function jupiter_geodir_page_title($title = '', $subtitle = '') |
176 | 176 | { |
177 | - global $mk_options; |
|
178 | - |
|
179 | - $post_id = global_get_post_id(); |
|
180 | - $shadow_css = ''; |
|
181 | - if ($mk_options['page_title_shadow'] == 'true') { |
|
182 | - $shadow_css = 'mk-drop-shadow'; |
|
183 | - } |
|
184 | - |
|
185 | - $align = !empty($align) ? $align : 'left'; |
|
186 | - |
|
187 | - //$title = 'xxxx'; |
|
188 | - echo '<section id="mk-page-introduce" class="intro-' . $align . '">'; |
|
189 | - echo '<div class="mk-grid">'; |
|
190 | - if (!empty($title)) { |
|
191 | - echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>'; |
|
192 | - |
|
193 | - } |
|
194 | - |
|
195 | - if (!empty($subtitle)) { |
|
196 | - echo '<div class="page-introduce-subtitle">'; |
|
197 | - echo $subtitle; |
|
198 | - echo '</div>'; |
|
199 | - } |
|
200 | - if ($mk_options['disable_breadcrumb'] == 'true') { |
|
201 | - if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') { |
|
202 | - /** |
|
203 | - * Calls the theme breadcrumbs for Jupiter theme. |
|
204 | - * |
|
205 | - * @since 1.4.0 |
|
206 | - */ |
|
207 | - do_action('theme_breadcrumbs', $post_id); |
|
208 | - } |
|
209 | - } |
|
210 | - |
|
211 | - echo '<div class="clearboth"></div></div></section>'; |
|
177 | + global $mk_options; |
|
178 | + |
|
179 | + $post_id = global_get_post_id(); |
|
180 | + $shadow_css = ''; |
|
181 | + if ($mk_options['page_title_shadow'] == 'true') { |
|
182 | + $shadow_css = 'mk-drop-shadow'; |
|
183 | + } |
|
184 | + |
|
185 | + $align = !empty($align) ? $align : 'left'; |
|
186 | + |
|
187 | + //$title = 'xxxx'; |
|
188 | + echo '<section id="mk-page-introduce" class="intro-' . $align . '">'; |
|
189 | + echo '<div class="mk-grid">'; |
|
190 | + if (!empty($title)) { |
|
191 | + echo '<h1 class="page-introduce-title ' . $shadow_css . '">' . $title . '</h1>'; |
|
192 | + |
|
193 | + } |
|
194 | + |
|
195 | + if (!empty($subtitle)) { |
|
196 | + echo '<div class="page-introduce-subtitle">'; |
|
197 | + echo $subtitle; |
|
198 | + echo '</div>'; |
|
199 | + } |
|
200 | + if ($mk_options['disable_breadcrumb'] == 'true') { |
|
201 | + if (get_post_meta($post_id, '_disable_breadcrumb', true) != 'false') { |
|
202 | + /** |
|
203 | + * Calls the theme breadcrumbs for Jupiter theme. |
|
204 | + * |
|
205 | + * @since 1.4.0 |
|
206 | + */ |
|
207 | + do_action('theme_breadcrumbs', $post_id); |
|
208 | + } |
|
209 | + } |
|
210 | + |
|
211 | + echo '<div class="clearboth"></div></div></section>'; |
|
212 | 212 | |
213 | 213 | |
214 | 214 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | */ |
163 | 163 | function enfold_action_wrapper_open() |
164 | 164 | { |
165 | - echo "<div class='container_wrap container_wrap_first main_color " . avia_layout_class('main', false) . "'>"; |
|
165 | + echo "<div class='container_wrap container_wrap_first main_color ".avia_layout_class('main', false)."'>"; |
|
166 | 166 | echo "<div class='container template-blog '>"; |
167 | 167 | } |
168 | 168 | |
@@ -254,9 +254,9 @@ discard block |
||
254 | 254 | function enfold_action_wrapper_content_open($type = '', $id = '', $class = '') |
255 | 255 | { |
256 | 256 | if (geodir_is_page('login')) { |
257 | - echo "<main class='template-page content twelve alpha units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
257 | + echo "<main class='template-page content twelve alpha units ".$class."' ".avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)).">"; |
|
258 | 258 | } else { |
259 | - echo "<main class='template-page content " . avia_layout_class('content', false) . " units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
259 | + echo "<main class='template-page content ".avia_layout_class('content', false)." units ".$class."' ".avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)).">"; |
|
260 | 260 | } |
261 | 261 | echo '<div class="entry-content-wrapper">'; |
262 | 262 | } |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | function enfold_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '') |
276 | 276 | { |
277 | 277 | $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
278 | - echo "<aside class='sidebar sidebar_right " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
278 | + echo "<aside class='sidebar sidebar_right ".$sidebar_smartphone." ".avia_layout_class('sidebar', false)." units' ".avia_markup_helper(array('context' => 'sidebar', 'echo' => false)).">"; |
|
279 | 279 | echo "<div class='inner_sidebar extralight-border'>"; |
280 | 280 | } |
281 | 281 | |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | function enfold_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '') |
293 | 293 | { |
294 | 294 | $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
295 | - echo "<aside class='sidebar sidebar_left " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
295 | + echo "<aside class='sidebar sidebar_left ".$sidebar_smartphone." ".avia_layout_class('sidebar', false)." units' ".avia_markup_helper(array('context' => 'sidebar', 'echo' => false)).">"; |
|
296 | 296 | echo "<div class='inner_sidebar extralight-border'>"; |
297 | 297 | } |
298 | 298 |
@@ -17,84 +17,84 @@ discard block |
||
17 | 17 | function enfold_action_calls() |
18 | 18 | { |
19 | 19 | |
20 | - /* ACTIONS |
|
20 | + /* ACTIONS |
|
21 | 21 | ****************************************************************************************/ |
22 | 22 | |
23 | - // Add body class for styling purposes |
|
24 | - add_filter('body_class', 'wpgeo_enfold_body_class'); |
|
23 | + // Add body class for styling purposes |
|
24 | + add_filter('body_class', 'wpgeo_enfold_body_class'); |
|
25 | 25 | |
26 | - // Pages using the page-builder shouldn't redirect on successful payment |
|
27 | - if (isset($_REQUEST['pay_action'])) { |
|
28 | - add_action('init', 'geodir_allow_payment_urls_enfold', 15); |
|
29 | - } |
|
26 | + // Pages using the page-builder shouldn't redirect on successful payment |
|
27 | + if (isset($_REQUEST['pay_action'])) { |
|
28 | + add_action('init', 'geodir_allow_payment_urls_enfold', 15); |
|
29 | + } |
|
30 | 30 | |
31 | - // LOCATION MANAGER MENU ACTIONS - set the location menu item before the Enfold search |
|
32 | - if (function_exists('geodir_location_menu_items')) { |
|
33 | - remove_filter('wp_nav_menu_items', 'geodir_location_menu_items', 110); |
|
34 | - add_filter('wp_nav_menu_items', 'geodir_location_menu_items', 8, 2); |
|
35 | - } |
|
36 | - // GEODIR MENU ACTIONS - set the GeoDir menu items before the Enfold search |
|
37 | - remove_filter('wp_nav_menu_items', 'geodir_menu_items', 100); |
|
38 | - add_filter('wp_nav_menu_items', 'geodir_menu_items', 7, 2); |
|
31 | + // LOCATION MANAGER MENU ACTIONS - set the location menu item before the Enfold search |
|
32 | + if (function_exists('geodir_location_menu_items')) { |
|
33 | + remove_filter('wp_nav_menu_items', 'geodir_location_menu_items', 110); |
|
34 | + add_filter('wp_nav_menu_items', 'geodir_location_menu_items', 8, 2); |
|
35 | + } |
|
36 | + // GEODIR MENU ACTIONS - set the GeoDir menu items before the Enfold search |
|
37 | + remove_filter('wp_nav_menu_items', 'geodir_menu_items', 100); |
|
38 | + add_filter('wp_nav_menu_items', 'geodir_menu_items', 7, 2); |
|
39 | 39 | |
40 | - // HOME TOP SIDEBAR |
|
41 | - remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
42 | - remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
43 | - //add_action( 'ava_after_main_container', 'enfold_home_sidebar' ); |
|
40 | + // HOME TOP SIDEBAR |
|
41 | + remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
42 | + remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
43 | + //add_action( 'ava_after_main_container', 'enfold_home_sidebar' ); |
|
44 | 44 | |
45 | 45 | |
46 | - // WRAPPER OPEN ACTIONS |
|
47 | - remove_action('geodir_wrapper_open', 'geodir_action_wrapper_open', 10); |
|
48 | - add_action('geodir_wrapper_open', 'enfold_action_wrapper_open', 9); |
|
49 | - add_action('geodir_wrapper_open', 'enfold_detail_title', 8, 2); // ADD GEODIR TITLE |
|
46 | + // WRAPPER OPEN ACTIONS |
|
47 | + remove_action('geodir_wrapper_open', 'geodir_action_wrapper_open', 10); |
|
48 | + add_action('geodir_wrapper_open', 'enfold_action_wrapper_open', 9); |
|
49 | + add_action('geodir_wrapper_open', 'enfold_detail_title', 8, 2); // ADD GEODIR TITLE |
|
50 | 50 | |
51 | 51 | |
52 | - // WRAPPER CONTENT OPEN ACTIONS |
|
53 | - remove_action('geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10); |
|
54 | - add_action('geodir_wrapper_content_open', 'enfold_action_wrapper_content_open', 9, 3); |
|
52 | + // WRAPPER CONTENT OPEN ACTIONS |
|
53 | + remove_action('geodir_wrapper_content_open', 'geodir_action_wrapper_content_open', 10); |
|
54 | + add_action('geodir_wrapper_content_open', 'enfold_action_wrapper_content_open', 9, 3); |
|
55 | 55 | |
56 | 56 | |
57 | - // SIDEBAR RIGHT OPEN ACTIONS |
|
58 | - remove_action('geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10); |
|
59 | - add_action('geodir_sidebar_right_open', 'enfold_action_sidebar_right_open', 10, 4); |
|
57 | + // SIDEBAR RIGHT OPEN ACTIONS |
|
58 | + remove_action('geodir_sidebar_right_open', 'geodir_action_sidebar_right_open', 10); |
|
59 | + add_action('geodir_sidebar_right_open', 'enfold_action_sidebar_right_open', 10, 4); |
|
60 | 60 | |
61 | - // SIDEBAR LEFT OPEN ACTIONS |
|
62 | - remove_action('geodir_sidebar_left_open', 'geodir_action_sidebar_left_open', 10); |
|
63 | - add_action('geodir_sidebar_left_open', 'enfold_action_sidebar_left_open', 10, 4); |
|
61 | + // SIDEBAR LEFT OPEN ACTIONS |
|
62 | + remove_action('geodir_sidebar_left_open', 'geodir_action_sidebar_left_open', 10); |
|
63 | + add_action('geodir_sidebar_left_open', 'enfold_action_sidebar_left_open', 10, 4); |
|
64 | 64 | |
65 | 65 | |
66 | - // HOME PAGE BREADCRUMBS |
|
67 | - remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
68 | - remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
66 | + // HOME PAGE BREADCRUMBS |
|
67 | + remove_action('geodir_home_before_main_content', 'geodir_breadcrumb', 20); |
|
68 | + remove_action('geodir_location_before_main_content', 'geodir_breadcrumb', 20); |
|
69 | 69 | |
70 | - // LISTINGS PAGE BREADCRUMBS & TITLES |
|
71 | - remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
72 | - remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
70 | + // LISTINGS PAGE BREADCRUMBS & TITLES |
|
71 | + remove_action('geodir_listings_before_main_content', 'geodir_breadcrumb', 20); |
|
72 | + remove_action('geodir_listings_page_title', 'geodir_action_listings_title', 10); |
|
73 | 73 | |
74 | - // DETAILS PAGE BREADCRUMBS & TITLES |
|
75 | - remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
76 | - remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
74 | + // DETAILS PAGE BREADCRUMBS & TITLES |
|
75 | + remove_action('geodir_detail_before_main_content', 'geodir_breadcrumb', 20); |
|
76 | + remove_action('geodir_details_main_content', 'geodir_action_page_title', 20); |
|
77 | 77 | |
78 | - // SEARCH PAGE BREADCRUMBS & TITLES |
|
79 | - remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
80 | - remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
78 | + // SEARCH PAGE BREADCRUMBS & TITLES |
|
79 | + remove_action('geodir_search_before_main_content', 'geodir_breadcrumb', 20); |
|
80 | + remove_action('geodir_search_page_title', 'geodir_action_search_page_title', 10); |
|
81 | 81 | |
82 | - // AUTHOR PAGE BREADCRUMBS & TITLES |
|
83 | - remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
84 | - remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
82 | + // AUTHOR PAGE BREADCRUMBS & TITLES |
|
83 | + remove_action('geodir_author_before_main_content', 'geodir_breadcrumb', 20); |
|
84 | + remove_action('geodir_author_page_title', 'geodir_action_author_page_title', 10); |
|
85 | 85 | |
86 | - // DISABLE ENFOLD MAPS CALL |
|
87 | - add_filter('avf_load_google_map_api', 'gd_enfold_remove_maps_api', 10, 1); |
|
86 | + // DISABLE ENFOLD MAPS CALL |
|
87 | + add_filter('avf_load_google_map_api', 'gd_enfold_remove_maps_api', 10, 1); |
|
88 | 88 | |
89 | - // make top section wide |
|
90 | - remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
91 | - remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
92 | - remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
93 | - remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
94 | - remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
95 | - remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
89 | + // make top section wide |
|
90 | + remove_action('geodir_home_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
91 | + remove_action('geodir_location_before_main_content', 'geodir_action_geodir_sidebar_home_top', 10); |
|
92 | + remove_action('geodir_author_before_main_content', 'geodir_action_geodir_sidebar_author_top', 10); |
|
93 | + remove_action('geodir_search_before_main_content', 'geodir_action_geodir_sidebar_search_top', 10); |
|
94 | + remove_action('geodir_detail_before_main_content', 'geodir_action_geodir_sidebar_detail_top', 10); |
|
95 | + remove_action('geodir_listings_before_main_content', 'geodir_action_geodir_sidebar_listings_top', 10); |
|
96 | 96 | |
97 | - add_action('geodir_wrapper_open', 'gd_enfold_compat_add_top_section_back', 5); |
|
97 | + add_action('geodir_wrapper_open', 'gd_enfold_compat_add_top_section_back', 5); |
|
98 | 98 | |
99 | 99 | } // Close enfold_action_calls |
100 | 100 | |
@@ -108,17 +108,17 @@ discard block |
||
108 | 108 | function gd_enfold_compat_add_top_section_back() |
109 | 109 | { |
110 | 110 | |
111 | - if (is_page_geodir_home() || geodir_is_page('location') || geodir_is_page('home')) { |
|
112 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_home_top', 8); |
|
113 | - } elseif (geodir_is_page('listing')) { |
|
114 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_listings_top', 8); |
|
115 | - } elseif (geodir_is_page('detail')) { |
|
116 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_detail_top', 8); |
|
117 | - } elseif (geodir_is_page('search')) { |
|
118 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_search_top', 8); |
|
119 | - } elseif (geodir_is_page('author')) { |
|
120 | - add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_author_top', 8); |
|
121 | - } |
|
111 | + if (is_page_geodir_home() || geodir_is_page('location') || geodir_is_page('home')) { |
|
112 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_home_top', 8); |
|
113 | + } elseif (geodir_is_page('listing')) { |
|
114 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_listings_top', 8); |
|
115 | + } elseif (geodir_is_page('detail')) { |
|
116 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_detail_top', 8); |
|
117 | + } elseif (geodir_is_page('search')) { |
|
118 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_search_top', 8); |
|
119 | + } elseif (geodir_is_page('author')) { |
|
120 | + add_action('geodir_wrapper_open', 'geodir_action_geodir_sidebar_author_top', 8); |
|
121 | + } |
|
122 | 122 | |
123 | 123 | |
124 | 124 | } |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | */ |
138 | 138 | function wpgeo_enfold_body_class($classes) |
139 | 139 | { |
140 | - $classes[] = 'wpgeo-enfold'; |
|
141 | - return $classes; |
|
140 | + $classes[] = 'wpgeo-enfold'; |
|
141 | + return $classes; |
|
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | */ |
150 | 150 | function geodir_allow_payment_urls_enfold() |
151 | 151 | { |
152 | - global $builder; |
|
153 | - remove_action('template_redirect', array($builder, 'template_redirect'), 1000); |
|
152 | + global $builder; |
|
153 | + remove_action('template_redirect', array($builder, 'template_redirect'), 1000); |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | |
@@ -162,8 +162,8 @@ discard block |
||
162 | 162 | */ |
163 | 163 | function enfold_action_wrapper_open() |
164 | 164 | { |
165 | - echo "<div class='container_wrap container_wrap_first main_color " . avia_layout_class('main', false) . "'>"; |
|
166 | - echo "<div class='container template-blog '>"; |
|
165 | + echo "<div class='container_wrap container_wrap_first main_color " . avia_layout_class('main', false) . "'>"; |
|
166 | + echo "<div class='container template-blog '>"; |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -177,38 +177,38 @@ discard block |
||
177 | 177 | */ |
178 | 178 | function enfold_detail_title($page, $class) |
179 | 179 | { |
180 | - //echo '###'.$page; |
|
181 | - global $wp; |
|
182 | - if (isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id() && !geodir_is_page('login')) { |
|
183 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
184 | - echo avia_title(); |
|
185 | - } elseif ($page == 'details-page') { |
|
186 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
187 | - echo avia_title(); |
|
188 | - } elseif ($page == 'listings-page' || $page == 'search-page') { |
|
189 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
190 | - ob_start(); // Start buffering; |
|
191 | - geodir_action_listings_title(); |
|
192 | - $gd_title = ob_get_clean(); |
|
193 | - $title_p = explode('">', $gd_title); |
|
194 | - $title = str_replace('</h1></header>', "", $title_p[2]); |
|
195 | - //print_r($title_p); |
|
196 | - echo avia_title(array('title' => $title)); |
|
197 | - } elseif ($page == 'author-page') { |
|
198 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
199 | - ob_start(); // Start buffering; |
|
200 | - geodir_action_author_page_title(); |
|
201 | - $gd_title = ob_get_clean(); |
|
202 | - $gd_title = str_replace('<h1>', "", $gd_title); |
|
203 | - $gd_title = str_replace('</h1>', "", $gd_title); |
|
204 | - echo avia_title(array('title' => $gd_title)); |
|
205 | - } elseif ($page == 'add-listing-page') { |
|
206 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
207 | - echo avia_title(); |
|
208 | - } elseif ($page == 'add-listing-page') { |
|
209 | - add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
210 | - echo avia_title(); |
|
211 | - } |
|
180 | + //echo '###'.$page; |
|
181 | + global $wp; |
|
182 | + if (isset($wp->query_vars['page_id']) && $wp->query_vars['page_id'] == geodir_location_page_id() && !geodir_is_page('login')) { |
|
183 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
184 | + echo avia_title(); |
|
185 | + } elseif ($page == 'details-page') { |
|
186 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
187 | + echo avia_title(); |
|
188 | + } elseif ($page == 'listings-page' || $page == 'search-page') { |
|
189 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
190 | + ob_start(); // Start buffering; |
|
191 | + geodir_action_listings_title(); |
|
192 | + $gd_title = ob_get_clean(); |
|
193 | + $title_p = explode('">', $gd_title); |
|
194 | + $title = str_replace('</h1></header>', "", $title_p[2]); |
|
195 | + //print_r($title_p); |
|
196 | + echo avia_title(array('title' => $title)); |
|
197 | + } elseif ($page == 'author-page') { |
|
198 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
199 | + ob_start(); // Start buffering; |
|
200 | + geodir_action_author_page_title(); |
|
201 | + $gd_title = ob_get_clean(); |
|
202 | + $gd_title = str_replace('<h1>', "", $gd_title); |
|
203 | + $gd_title = str_replace('</h1>', "", $gd_title); |
|
204 | + echo avia_title(array('title' => $gd_title)); |
|
205 | + } elseif ($page == 'add-listing-page') { |
|
206 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
207 | + echo avia_title(); |
|
208 | + } elseif ($page == 'add-listing-page') { |
|
209 | + add_action('avia_breadcrumbs_trail', 'enfold_detail_breadcrum', 8, 2); |
|
210 | + echo avia_title(); |
|
211 | + } |
|
212 | 212 | |
213 | 213 | } |
214 | 214 | |
@@ -223,22 +223,22 @@ discard block |
||
223 | 223 | */ |
224 | 224 | function enfold_detail_breadcrum($trail, $args) |
225 | 225 | { |
226 | - ob_start(); // Start buffering; |
|
227 | - geodir_breadcrumb(); |
|
228 | - $gd_crums = ob_get_clean(); |
|
229 | - if ($gd_crums) { |
|
230 | - $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
231 | - $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
232 | - $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
233 | - $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
234 | - $gd_crums = explode(" > ", $gd_crums); |
|
235 | - $trail_end = array_pop($gd_crums); |
|
236 | - $gd_crums['trail_end'] = $trail_end; |
|
237 | - //print_r($gd_crums); |
|
238 | - //print_r($trail); |
|
239 | - $trail = $gd_crums; |
|
240 | - } |
|
241 | - return $trail; |
|
226 | + ob_start(); // Start buffering; |
|
227 | + geodir_breadcrumb(); |
|
228 | + $gd_crums = ob_get_clean(); |
|
229 | + if ($gd_crums) { |
|
230 | + $gd_crums = str_replace('<div class="geodir-breadcrumb clearfix"><ul id="breadcrumbs"><li>', "", $gd_crums); |
|
231 | + $gd_crums = str_replace('</li></ul></div>', "", $gd_crums); |
|
232 | + $gd_crums = str_replace(' > ', " > ", $gd_crums); |
|
233 | + $gd_crums = str_replace('</li><li>', "", $gd_crums); |
|
234 | + $gd_crums = explode(" > ", $gd_crums); |
|
235 | + $trail_end = array_pop($gd_crums); |
|
236 | + $gd_crums['trail_end'] = $trail_end; |
|
237 | + //print_r($gd_crums); |
|
238 | + //print_r($trail); |
|
239 | + $trail = $gd_crums; |
|
240 | + } |
|
241 | + return $trail; |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | |
@@ -253,12 +253,12 @@ discard block |
||
253 | 253 | */ |
254 | 254 | function enfold_action_wrapper_content_open($type = '', $id = '', $class = '') |
255 | 255 | { |
256 | - if (geodir_is_page('login')) { |
|
257 | - echo "<main class='template-page content twelve alpha units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
258 | - } else { |
|
259 | - echo "<main class='template-page content " . avia_layout_class('content', false) . " units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
260 | - } |
|
261 | - echo '<div class="entry-content-wrapper">'; |
|
256 | + if (geodir_is_page('login')) { |
|
257 | + echo "<main class='template-page content twelve alpha units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
258 | + } else { |
|
259 | + echo "<main class='template-page content " . avia_layout_class('content', false) . " units " . $class . "' " . avia_markup_helper(array('context' => 'content', 'post_type' => 'page', 'echo' => false)) . ">"; |
|
260 | + } |
|
261 | + echo '<div class="entry-content-wrapper">'; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | |
@@ -274,9 +274,9 @@ discard block |
||
274 | 274 | */ |
275 | 275 | function enfold_action_sidebar_right_open($type = '', $id = '', $class = '', $itemtype = '') |
276 | 276 | { |
277 | - $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
|
278 | - echo "<aside class='sidebar sidebar_right " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
279 | - echo "<div class='inner_sidebar extralight-border'>"; |
|
277 | + $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
|
278 | + echo "<aside class='sidebar sidebar_right " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
279 | + echo "<div class='inner_sidebar extralight-border'>"; |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | /** |
@@ -291,9 +291,9 @@ discard block |
||
291 | 291 | */ |
292 | 292 | function enfold_action_sidebar_left_open($type = '', $id = '', $class = '', $itemtype = '') |
293 | 293 | { |
294 | - $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
|
295 | - echo "<aside class='sidebar sidebar_left " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
296 | - echo "<div class='inner_sidebar extralight-border'>"; |
|
294 | + $sidebar_smartphone = avia_get_option('smartphones_sidebar') == 'smartphones_sidebar' ? 'smartphones_sidebar_active' : ""; |
|
295 | + echo "<aside class='sidebar sidebar_left " . $sidebar_smartphone . " " . avia_layout_class('sidebar', false) . " units' " . avia_markup_helper(array('context' => 'sidebar', 'echo' => false)) . ">"; |
|
296 | + echo "<div class='inner_sidebar extralight-border'>"; |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | */ |
308 | 308 | function gd_enfold_remove_maps_api($call) |
309 | 309 | { |
310 | - return false; |
|
310 | + return false; |
|
311 | 311 | } |
312 | 312 | |
313 | 313 |
@@ -74,17 +74,20 @@ discard block |
||
74 | 74 | $tab_link = $args['url']; |
75 | 75 | } |
76 | 76 | |
77 | - if (!empty($args['request'])) |
|
78 | - $tab_link = geodir_getlink($tab_link, $args['request']); |
|
77 | + if (!empty($args['request'])) { |
|
78 | + $tab_link = geodir_getlink($tab_link, $args['request']); |
|
79 | + } |
|
79 | 80 | |
80 | 81 | if (isset($args['target']) && $args['target'] != '') { |
81 | 82 | $tab_target = " target='" . sanitize_text_field($args['target']) . "' "; |
82 | - } else |
|
83 | - $tab_target = ''; |
|
83 | + } else { |
|
84 | + $tab_target = ''; |
|
85 | + } |
|
84 | 86 | |
85 | 87 | $tab_active = ''; |
86 | - if ($current_tab == $name) |
|
87 | - $tab_active = ' class="tab-active" '; |
|
88 | + if ($current_tab == $name) { |
|
89 | + $tab_active = ' class="tab-active" '; |
|
90 | + } |
|
88 | 91 | /** |
89 | 92 | * Called before the individual settings tabs are output. |
90 | 93 | * |
@@ -122,8 +125,9 @@ discard block |
||
122 | 125 | |
123 | 126 | <?php |
124 | 127 | unset($subtabs); |
125 | - if (isset($tabs[$current_tab]['subtabs'])) |
|
126 | - $subtabs = $tabs[$current_tab]['subtabs']; |
|
128 | + if (isset($tabs[$current_tab]['subtabs'])) { |
|
129 | + $subtabs = $tabs[$current_tab]['subtabs']; |
|
130 | + } |
|
127 | 131 | $form_action = ''; |
128 | 132 | |
129 | 133 | if (!empty($subtabs)): |
@@ -189,7 +193,10 @@ discard block |
||
189 | 193 | jQuery('#last_tab').val( jQuery(this).attr('href') ); |
190 | 194 | return false;*/ |
191 | 195 | }); |
192 | - <?php if (isset($_GET['subtab']) && $_GET['subtab']) echo 'jQuery(\'ul.subsubsub li a[href="#' . sanitize_text_field($_GET['subtab']) . '"]\').click();'; ?> |
|
196 | + <?php if (isset($_GET['subtab']) && $_GET['subtab']) { |
|
197 | + echo 'jQuery(\'ul.subsubsub li a[href="#' . sanitize_text_field($_GET['subtab']) . '"]\').click();'; |
|
198 | +} |
|
199 | +?> |
|
193 | 200 | // Countries |
194 | 201 | jQuery('select#geodirectory_allowed_countries').change(function () { |
195 | 202 | if (jQuery(this).val() == "specific") { |
@@ -312,10 +319,11 @@ discard block |
||
312 | 319 | geodir_register_defaults(); |
313 | 320 | }*/ |
314 | 321 | |
315 | - if (isset($_REQUEST['active_tab']) && ($_REQUEST['active_tab'] == 'dummy_data_settings' || $_REQUEST['active_tab'] == 'csv_upload_settings')) |
|
316 | - $hide_save_button = "style='display:none;'"; |
|
317 | - else |
|
318 | - $hide_save_button = ''; |
|
322 | + if (isset($_REQUEST['active_tab']) && ($_REQUEST['active_tab'] == 'dummy_data_settings' || $_REQUEST['active_tab'] == 'csv_upload_settings')) { |
|
323 | + $hide_save_button = "style='display:none;'"; |
|
324 | + } else { |
|
325 | + $hide_save_button = ''; |
|
326 | + } |
|
319 | 327 | |
320 | 328 | /** |
321 | 329 | * Filter weather the default save button in the GD admin settings pages should be shown. |
@@ -7,33 +7,33 @@ discard block |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | if (!function_exists('geodir_admin_panel')) { |
10 | - /** |
|
11 | - * GeoDirectory Backend Admin Panel. |
|
12 | - * |
|
13 | - * Handles the display of the main GeoDirectory admin panel. |
|
14 | - * |
|
15 | - * @since 1.0.0 |
|
16 | - * @package GeoDirectory |
|
17 | - * @global string $current_tab Current tab in geodirectory settings. |
|
18 | - * @global object $geodirectory GeoDirectory plugin object. |
|
19 | - */ |
|
20 | - function geodir_admin_panel() |
|
21 | - { |
|
22 | - global $geodirectory; |
|
23 | - global $current_tab; |
|
24 | - |
|
25 | - |
|
26 | - ?> |
|
10 | + /** |
|
11 | + * GeoDirectory Backend Admin Panel. |
|
12 | + * |
|
13 | + * Handles the display of the main GeoDirectory admin panel. |
|
14 | + * |
|
15 | + * @since 1.0.0 |
|
16 | + * @package GeoDirectory |
|
17 | + * @global string $current_tab Current tab in geodirectory settings. |
|
18 | + * @global object $geodirectory GeoDirectory plugin object. |
|
19 | + */ |
|
20 | + function geodir_admin_panel() |
|
21 | + { |
|
22 | + global $geodirectory; |
|
23 | + global $current_tab; |
|
24 | + |
|
25 | + |
|
26 | + ?> |
|
27 | 27 | |
28 | 28 | <div id="gd-wrapper-main" class="wrap geodirectory"> |
29 | 29 | <?php |
30 | - /** |
|
31 | - * Called just after the opening wrapper div for the GD settings page in the admin area. |
|
32 | - * |
|
33 | - * @since 1.0.0 |
|
34 | - */ |
|
35 | - do_action('geodir_before_admin_panel'); |
|
36 | - ?> |
|
30 | + /** |
|
31 | + * Called just after the opening wrapper div for the GD settings page in the admin area. |
|
32 | + * |
|
33 | + * @since 1.0.0 |
|
34 | + */ |
|
35 | + do_action('geodir_before_admin_panel'); |
|
36 | + ?> |
|
37 | 37 | |
38 | 38 | <div class="gd-wrapper gd-wrapper-vr clearfix"> |
39 | 39 | |
@@ -44,75 +44,75 @@ discard block |
||
44 | 44 | alt="geo-logo" class="geo-logoalter"/> |
45 | 45 | <ul> |
46 | 46 | <?php |
47 | - $tabs = array(); |
|
48 | - /** |
|
49 | - * Filter the GD admin settings tabs on the left of the admin menu. |
|
50 | - * |
|
51 | - * @since 1.0.0 |
|
52 | - * @param array $tabs The array of tabs to display. |
|
53 | - */ |
|
54 | - $tabs = apply_filters('geodir_settings_tabs_array', $tabs); |
|
55 | - update_option('geodir_tabs', $tabs);// Important to show settings menu dropdown |
|
56 | - |
|
57 | - foreach ($tabs as $name => $args) : |
|
58 | - $label = $args['label']; |
|
59 | - |
|
60 | - |
|
61 | - $query_string = ''; |
|
62 | - if (isset($args['subtabs']) && !empty($args['subtabs'])): |
|
63 | - |
|
64 | - $subtabs = $args['subtabs']; |
|
65 | - |
|
66 | - $query_string = '&subtab=' . $subtabs[0]['subtab']; |
|
67 | - |
|
68 | - endif; |
|
69 | - |
|
70 | - |
|
71 | - $tab_link = admin_url('admin.php?page=geodirectory&tab=' . $name . $query_string); |
|
72 | - |
|
73 | - if (isset($args['url']) && $args['url'] != '') { |
|
74 | - $tab_link = $args['url']; |
|
75 | - } |
|
76 | - |
|
77 | - if (!empty($args['request'])) |
|
78 | - $tab_link = geodir_getlink($tab_link, $args['request']); |
|
79 | - |
|
80 | - if (isset($args['target']) && $args['target'] != '') { |
|
81 | - $tab_target = " target='" . sanitize_text_field($args['target']) . "' "; |
|
82 | - } else |
|
83 | - $tab_target = ''; |
|
84 | - |
|
85 | - $tab_active = ''; |
|
86 | - if ($current_tab == $name) |
|
87 | - $tab_active = ' class="tab-active" '; |
|
88 | - /** |
|
89 | - * Called before the individual settings tabs are output. |
|
90 | - * |
|
91 | - * @since 1.0.0 |
|
92 | - * @param string $name The name of the settings tab. |
|
93 | - * @see 'geodir_after_settings_tabs' |
|
94 | - */ |
|
95 | - do_action('geodir_before_settings_tabs', $name); |
|
96 | - echo '<li ' . $tab_active . ' ><a href="' . esc_url($tab_link) . '" ' . $tab_target . ' >' . $label . '</a></li>'; |
|
97 | - /** |
|
98 | - * Called after the individual settings tabs are output. |
|
99 | - * |
|
100 | - * @since 1.0.0 |
|
101 | - * @param string $name The name of the settings tab. |
|
102 | - * @see 'geodir_before_settings_tabs' |
|
103 | - */ |
|
104 | - do_action('geodir_after_settings_tabs', $name); |
|
105 | - endforeach; |
|
106 | - |
|
107 | - /** |
|
108 | - * Called after the GD settings tabs have been output. |
|
109 | - * |
|
110 | - * Called before the closing `ul` so can be used to add new settings tab links. |
|
111 | - * |
|
112 | - * @since 1.0.0 |
|
113 | - */ |
|
114 | - do_action('geodir_settings_tabs'); |
|
115 | - ?> |
|
47 | + $tabs = array(); |
|
48 | + /** |
|
49 | + * Filter the GD admin settings tabs on the left of the admin menu. |
|
50 | + * |
|
51 | + * @since 1.0.0 |
|
52 | + * @param array $tabs The array of tabs to display. |
|
53 | + */ |
|
54 | + $tabs = apply_filters('geodir_settings_tabs_array', $tabs); |
|
55 | + update_option('geodir_tabs', $tabs);// Important to show settings menu dropdown |
|
56 | + |
|
57 | + foreach ($tabs as $name => $args) : |
|
58 | + $label = $args['label']; |
|
59 | + |
|
60 | + |
|
61 | + $query_string = ''; |
|
62 | + if (isset($args['subtabs']) && !empty($args['subtabs'])): |
|
63 | + |
|
64 | + $subtabs = $args['subtabs']; |
|
65 | + |
|
66 | + $query_string = '&subtab=' . $subtabs[0]['subtab']; |
|
67 | + |
|
68 | + endif; |
|
69 | + |
|
70 | + |
|
71 | + $tab_link = admin_url('admin.php?page=geodirectory&tab=' . $name . $query_string); |
|
72 | + |
|
73 | + if (isset($args['url']) && $args['url'] != '') { |
|
74 | + $tab_link = $args['url']; |
|
75 | + } |
|
76 | + |
|
77 | + if (!empty($args['request'])) |
|
78 | + $tab_link = geodir_getlink($tab_link, $args['request']); |
|
79 | + |
|
80 | + if (isset($args['target']) && $args['target'] != '') { |
|
81 | + $tab_target = " target='" . sanitize_text_field($args['target']) . "' "; |
|
82 | + } else |
|
83 | + $tab_target = ''; |
|
84 | + |
|
85 | + $tab_active = ''; |
|
86 | + if ($current_tab == $name) |
|
87 | + $tab_active = ' class="tab-active" '; |
|
88 | + /** |
|
89 | + * Called before the individual settings tabs are output. |
|
90 | + * |
|
91 | + * @since 1.0.0 |
|
92 | + * @param string $name The name of the settings tab. |
|
93 | + * @see 'geodir_after_settings_tabs' |
|
94 | + */ |
|
95 | + do_action('geodir_before_settings_tabs', $name); |
|
96 | + echo '<li ' . $tab_active . ' ><a href="' . esc_url($tab_link) . '" ' . $tab_target . ' >' . $label . '</a></li>'; |
|
97 | + /** |
|
98 | + * Called after the individual settings tabs are output. |
|
99 | + * |
|
100 | + * @since 1.0.0 |
|
101 | + * @param string $name The name of the settings tab. |
|
102 | + * @see 'geodir_before_settings_tabs' |
|
103 | + */ |
|
104 | + do_action('geodir_after_settings_tabs', $name); |
|
105 | + endforeach; |
|
106 | + |
|
107 | + /** |
|
108 | + * Called after the GD settings tabs have been output. |
|
109 | + * |
|
110 | + * Called before the closing `ul` so can be used to add new settings tab links. |
|
111 | + * |
|
112 | + * @since 1.0.0 |
|
113 | + */ |
|
114 | + do_action('geodir_settings_tabs'); |
|
115 | + ?> |
|
116 | 116 | </ul> |
117 | 117 | </div> |
118 | 118 | <!--gd-left-nav ends here--> |
@@ -121,52 +121,52 @@ discard block |
||
121 | 121 | <div class="gd-tabs-main"> |
122 | 122 | |
123 | 123 | <?php |
124 | - unset($subtabs); |
|
125 | - if (isset($tabs[$current_tab]['subtabs'])) |
|
126 | - $subtabs = $tabs[$current_tab]['subtabs']; |
|
127 | - $form_action = ''; |
|
124 | + unset($subtabs); |
|
125 | + if (isset($tabs[$current_tab]['subtabs'])) |
|
126 | + $subtabs = $tabs[$current_tab]['subtabs']; |
|
127 | + $form_action = ''; |
|
128 | 128 | |
129 | - if (!empty($subtabs)): |
|
130 | - ?> |
|
129 | + if (!empty($subtabs)): |
|
130 | + ?> |
|
131 | 131 | <dl class="gd-tab-head"> |
132 | 132 | <?php |
133 | - foreach ($subtabs as $sub) { |
|
134 | - $subtab_active = ''; |
|
135 | - if (isset($_REQUEST['subtab']) && $sub['subtab'] == $_REQUEST['subtab']) { |
|
136 | - $subtab_active = 'class="gd-tab-active"'; |
|
137 | - $form_action = isset($sub['form_action']) ? $sub['form_action'] : ''; |
|
138 | - } |
|
139 | - |
|
140 | - $sub_tabs_link = admin_url() . 'admin.php?page=geodirectory&tab=' . $current_tab . '&subtab=' . $sub['subtab']; |
|
141 | - if (isset($sub['request']) && is_array($sub['request']) && !empty($sub['request'])) { |
|
142 | - $sub_tabs_link = geodir_getlink($sub_tabs_link, $sub['request']); |
|
143 | - } |
|
144 | - echo '<dd ' . $subtab_active . ' id="claim_listing"><a href="' . esc_url($sub_tabs_link) . '" >' . sanitize_text_field($sub['label']) . '</a></dd>'; |
|
145 | - } |
|
146 | - ?> |
|
133 | + foreach ($subtabs as $sub) { |
|
134 | + $subtab_active = ''; |
|
135 | + if (isset($_REQUEST['subtab']) && $sub['subtab'] == $_REQUEST['subtab']) { |
|
136 | + $subtab_active = 'class="gd-tab-active"'; |
|
137 | + $form_action = isset($sub['form_action']) ? $sub['form_action'] : ''; |
|
138 | + } |
|
139 | + |
|
140 | + $sub_tabs_link = admin_url() . 'admin.php?page=geodirectory&tab=' . $current_tab . '&subtab=' . $sub['subtab']; |
|
141 | + if (isset($sub['request']) && is_array($sub['request']) && !empty($sub['request'])) { |
|
142 | + $sub_tabs_link = geodir_getlink($sub_tabs_link, $sub['request']); |
|
143 | + } |
|
144 | + echo '<dd ' . $subtab_active . ' id="claim_listing"><a href="' . esc_url($sub_tabs_link) . '" >' . sanitize_text_field($sub['label']) . '</a></dd>'; |
|
145 | + } |
|
146 | + ?> |
|
147 | 147 | </dl> |
148 | 148 | |
149 | 149 | <?php endif; ?> |
150 | 150 | <div class="gd-tab-content <?php if (empty($subtabs)) { |
151 | - echo "inner_contet_tabs"; |
|
152 | - } ?>"> |
|
151 | + echo "inner_contet_tabs"; |
|
152 | + } ?>"> |
|
153 | 153 | <form method="post" id="mainform" |
154 | 154 | class="geodir_optionform <?php echo $current_tab . ' '; ?><?php if (isset($sub['subtab'])) { |
155 | - echo sanitize_text_field($sub['subtab']); |
|
156 | - } ?>" action="<?php echo $form_action; ?>" enctype="multipart/form-data"> |
|
155 | + echo sanitize_text_field($sub['subtab']); |
|
156 | + } ?>" action="<?php echo $form_action; ?>" enctype="multipart/form-data"> |
|
157 | 157 | <input type="hidden" class="active_tab" name="active_tab" |
158 | 158 | value="<?php if (isset($_REQUEST['active_tab'])) { |
159 | - echo sanitize_text_field($_REQUEST['active_tab']); |
|
160 | - } ?>"/> |
|
159 | + echo sanitize_text_field($_REQUEST['active_tab']); |
|
160 | + } ?>"/> |
|
161 | 161 | <?php wp_nonce_field('geodir-settings', '_wpnonce', true, true); ?> |
162 | 162 | <?php wp_nonce_field('geodir-settings-' . $current_tab, '_wpnonce-' . $current_tab, true, true); ?> |
163 | 163 | <?php |
164 | - /** |
|
165 | - * Used to call the content of each GD settings tab page. |
|
166 | - * |
|
167 | - * @since 1.0.0 |
|
168 | - */ |
|
169 | - do_action('geodir_admin_option_form', $current_tab); ?> |
|
164 | + /** |
|
165 | + * Used to call the content of each GD settings tab page. |
|
166 | + * |
|
167 | + * @since 1.0.0 |
|
168 | + */ |
|
169 | + do_action('geodir_admin_option_form', $current_tab); ?> |
|
170 | 170 | </form> |
171 | 171 | </div> |
172 | 172 | |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | </script> |
268 | 268 | <?php |
269 | 269 | |
270 | - } |
|
270 | + } |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | |
@@ -283,48 +283,48 @@ discard block |
||
283 | 283 | function geodir_admin_option_form($tab_name) |
284 | 284 | { |
285 | 285 | |
286 | - //echo $tab_name.'_array.php' ; |
|
287 | - global $geodir_settings, $is_default, $mapzoom; |
|
288 | - if (file_exists(dirname(__FILE__) . '/option-pages/' . $tab_name . '_array.php')) { |
|
289 | - /** |
|
290 | - * Contains settings array for given tab. |
|
291 | - * |
|
292 | - * @since 1.0.0 |
|
293 | - * @package GeoDirectory |
|
294 | - */ |
|
295 | - include_once('option-pages/' . $tab_name . '_array.php'); |
|
296 | - } |
|
297 | - |
|
298 | - $listing_type = isset($_REQUEST['listing_type']) ? $_REQUEST['listing_type'] : ''; |
|
299 | - |
|
300 | - switch ($tab_name) { |
|
301 | - |
|
302 | - case 'general_settings': |
|
303 | - |
|
304 | - geodir_admin_fields($geodir_settings['general_settings']); |
|
305 | - /** |
|
306 | - * |
|
307 | - * Update Taxonomy Options * |
|
308 | - * |
|
309 | - **/ |
|
310 | - /*add_action('updated_option_place_prefix','update_listing_prefix'); |
|
286 | + //echo $tab_name.'_array.php' ; |
|
287 | + global $geodir_settings, $is_default, $mapzoom; |
|
288 | + if (file_exists(dirname(__FILE__) . '/option-pages/' . $tab_name . '_array.php')) { |
|
289 | + /** |
|
290 | + * Contains settings array for given tab. |
|
291 | + * |
|
292 | + * @since 1.0.0 |
|
293 | + * @package GeoDirectory |
|
294 | + */ |
|
295 | + include_once('option-pages/' . $tab_name . '_array.php'); |
|
296 | + } |
|
297 | + |
|
298 | + $listing_type = isset($_REQUEST['listing_type']) ? $_REQUEST['listing_type'] : ''; |
|
299 | + |
|
300 | + switch ($tab_name) { |
|
301 | + |
|
302 | + case 'general_settings': |
|
303 | + |
|
304 | + geodir_admin_fields($geodir_settings['general_settings']); |
|
305 | + /** |
|
306 | + * |
|
307 | + * Update Taxonomy Options * |
|
308 | + * |
|
309 | + **/ |
|
310 | + /*add_action('updated_option_place_prefix','update_listing_prefix'); |
|
311 | 311 | function update_listing_prefix(){ |
312 | 312 | geodir_register_defaults(); |
313 | 313 | }*/ |
314 | 314 | |
315 | - if (isset($_REQUEST['active_tab']) && ($_REQUEST['active_tab'] == 'dummy_data_settings' || $_REQUEST['active_tab'] == 'csv_upload_settings')) |
|
316 | - $hide_save_button = "style='display:none;'"; |
|
317 | - else |
|
318 | - $hide_save_button = ''; |
|
315 | + if (isset($_REQUEST['active_tab']) && ($_REQUEST['active_tab'] == 'dummy_data_settings' || $_REQUEST['active_tab'] == 'csv_upload_settings')) |
|
316 | + $hide_save_button = "style='display:none;'"; |
|
317 | + else |
|
318 | + $hide_save_button = ''; |
|
319 | 319 | |
320 | - /** |
|
321 | - * Filter weather the default save button in the GD admin settings pages should be shown. |
|
322 | - * |
|
323 | - * @since 1.0.0 |
|
324 | - * @param string $hide_save_button The style element, either blank or: style='display:none;'. |
|
325 | - */ |
|
326 | - $hide_save_button = apply_filters('geodir_hide_save_button', $hide_save_button); |
|
327 | - ?> |
|
320 | + /** |
|
321 | + * Filter weather the default save button in the GD admin settings pages should be shown. |
|
322 | + * |
|
323 | + * @since 1.0.0 |
|
324 | + * @param string $hide_save_button The style element, either blank or: style='display:none;'. |
|
325 | + */ |
|
326 | + $hide_save_button = apply_filters('geodir_hide_save_button', $hide_save_button); |
|
327 | + ?> |
|
328 | 328 | |
329 | 329 | <p class="submit"> |
330 | 330 | <input <?php echo $hide_save_button;?> name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" /> |
@@ -334,38 +334,38 @@ discard block |
||
334 | 334 | </div> |
335 | 335 | |
336 | 336 | <?php break; |
337 | - case 'design_settings' : |
|
337 | + case 'design_settings' : |
|
338 | 338 | |
339 | - add_thickbox(); |
|
340 | - geodir_admin_fields($geodir_settings['design_settings']); |
|
339 | + add_thickbox(); |
|
340 | + geodir_admin_fields($geodir_settings['design_settings']); |
|
341 | 341 | |
342 | 342 | |
343 | 343 | |
344 | - ?> |
|
344 | + ?> |
|
345 | 345 | <p class="submit"> |
346 | 346 | <input name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" /> |
347 | 347 | <input type="hidden" name="subtab" id="last_tab" /> |
348 | 348 | </p> |
349 | 349 | </div> |
350 | 350 | <?php break; |
351 | - case 'permalink_settings' : |
|
352 | - geodir_admin_fields($geodir_settings['permalink_settings']); ?> |
|
351 | + case 'permalink_settings' : |
|
352 | + geodir_admin_fields($geodir_settings['permalink_settings']); ?> |
|
353 | 353 | <p class="submit"> |
354 | 354 | <input name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" /> |
355 | 355 | <input type="hidden" name="subtab" id="last_tab" /> |
356 | 356 | </p> |
357 | 357 | </div> |
358 | 358 | <?php break; |
359 | - case 'title_meta_settings' : |
|
360 | - geodir_admin_fields($geodir_settings['title_meta_settings']); ?> |
|
359 | + case 'title_meta_settings' : |
|
360 | + geodir_admin_fields($geodir_settings['title_meta_settings']); ?> |
|
361 | 361 | <p class="submit"> |
362 | 362 | <input name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" /> |
363 | 363 | <input type="hidden" name="subtab" id="last_tab" /> |
364 | 364 | </p> |
365 | 365 | </div> |
366 | 366 | <?php break; |
367 | - case 'notifications_settings' : |
|
368 | - geodir_admin_fields($geodir_settings['notifications_settings']); ?> |
|
367 | + case 'notifications_settings' : |
|
368 | + geodir_admin_fields($geodir_settings['notifications_settings']); ?> |
|
369 | 369 | |
370 | 370 | <p class="submit"> |
371 | 371 | |
@@ -375,36 +375,36 @@ discard block |
||
375 | 375 | </div> |
376 | 376 | |
377 | 377 | <?php break; |
378 | - case 'default_location_settings' : |
|
379 | - ?> |
|
378 | + case 'default_location_settings' : |
|
379 | + ?> |
|
380 | 380 | <div class="inner_content_tab_main"> |
381 | 381 | <div class="gd-content-heading"> |
382 | 382 | <?php global $wpdb; |
383 | 383 | |
384 | 384 | |
385 | - $location_result = geodir_get_default_location(); |
|
385 | + $location_result = geodir_get_default_location(); |
|
386 | 386 | |
387 | - $prefix = ''; |
|
387 | + $prefix = ''; |
|
388 | 388 | |
389 | 389 | |
390 | - $lat = isset($location_result->city_latitude) ? $location_result->city_latitude : ''; |
|
391 | - $lng = isset($location_result->city_longitude) ? $location_result->city_longitude : ''; |
|
392 | - $city = isset($location_result->city) ? $location_result->city : ''; |
|
393 | - $region = isset($location_result->region) ? $location_result->region : ''; |
|
394 | - $country = isset($location_result->country) ? $location_result->country : ''; |
|
390 | + $lat = isset($location_result->city_latitude) ? $location_result->city_latitude : ''; |
|
391 | + $lng = isset($location_result->city_longitude) ? $location_result->city_longitude : ''; |
|
392 | + $city = isset($location_result->city) ? $location_result->city : ''; |
|
393 | + $region = isset($location_result->region) ? $location_result->region : ''; |
|
394 | + $country = isset($location_result->country) ? $location_result->country : ''; |
|
395 | 395 | |
396 | 396 | |
397 | - $map_title = __("Set Address On Map", 'geodirectory'); |
|
397 | + $map_title = __("Set Address On Map", 'geodirectory'); |
|
398 | 398 | |
399 | - ?> |
|
399 | + ?> |
|
400 | 400 | |
401 | 401 | <h3><?php _e('Set Default Location', 'geodirectory');?></h3> |
402 | 402 | |
403 | 403 | <input type="hidden" name="add_location" value="location"> |
404 | 404 | |
405 | 405 | <input type="hidden" name="update_city" value="<?php if (isset($location_result->location_id)) { |
406 | - echo $location_result->location_id; |
|
407 | - } ?>"> |
|
406 | + echo $location_result->location_id; |
|
407 | + } ?>"> |
|
408 | 408 | |
409 | 409 | <input type="hidden" name="address" id="<?php echo $prefix;?>address" value=""> |
410 | 410 | |
@@ -417,8 +417,8 @@ discard block |
||
417 | 417 | <input class="require" type="text" size="80" style="width:440px" |
418 | 418 | id="<?php echo $prefix;?>city" name="city" |
419 | 419 | value="<?php if (isset($location_result->city)) { |
420 | - echo $location_result->city; |
|
421 | - } ?>"/> |
|
420 | + echo $location_result->city; |
|
421 | + } ?>"/> |
|
422 | 422 | |
423 | 423 | <div |
424 | 424 | class="gd-location_message_error"> <?php _e('This field is required.', 'geodirectory'); ?></div> |
@@ -433,8 +433,8 @@ discard block |
||
433 | 433 | <input class="require" type="text" size="80" style="width:440px" |
434 | 434 | id="<?php echo $prefix;?>region" name="region" |
435 | 435 | value="<?php if (isset($location_result->region)) { |
436 | - echo $location_result->region; |
|
437 | - } ?>"/> |
|
436 | + echo $location_result->region; |
|
437 | + } ?>"/> |
|
438 | 438 | |
439 | 439 | <div |
440 | 440 | class="gd-location_message_error"> <?php _e('This field is required.', 'geodirectory'); ?></div> |
@@ -448,8 +448,8 @@ discard block |
||
448 | 448 | <div class="gtd-formfeild required" style="padding-top:10px;"> |
449 | 449 | <?php |
450 | 450 | |
451 | - $country_result = isset($location_result->country) ? $location_result->country : ''; |
|
452 | - ?> |
|
451 | + $country_result = isset($location_result->country) ? $location_result->country : ''; |
|
452 | + ?> |
|
453 | 453 | <select id="<?php echo $prefix ?>country" class="chosen_select" |
454 | 454 | data-location_type="country" name="<?php echo $prefix ?>country" |
455 | 455 | data-placeholder="<?php _e('Choose a country.', 'geodirectory');?>" |
@@ -472,12 +472,12 @@ discard block |
||
472 | 472 | scope="row"><?php _e('Set Location on Map', 'geodirectory');?></th> |
473 | 473 | <td class="forminp"> |
474 | 474 | <?php |
475 | - /** |
|
476 | - * Contains add listing page map functions. |
|
477 | - * |
|
478 | - * @since 1.0.0 |
|
479 | - */ |
|
480 | - include(geodir_plugin_path() . "/geodirectory-functions/map-functions/map_on_add_listing_page.php");?> |
|
475 | + /** |
|
476 | + * Contains add listing page map functions. |
|
477 | + * |
|
478 | + * @since 1.0.0 |
|
479 | + */ |
|
480 | + include(geodir_plugin_path() . "/geodirectory-functions/map-functions/map_on_add_listing_page.php");?> |
|
481 | 481 | </td> |
482 | 482 | </tr> |
483 | 483 | <tr valign="top" class="single_select_page"> |
@@ -487,8 +487,8 @@ discard block |
||
487 | 487 | <input type="text" class="require" size="80" style="width:440px" |
488 | 488 | id="<?php echo $prefix;?>latitude" name="latitude" |
489 | 489 | value="<?php if (isset($location_result->city_latitude)) { |
490 | - echo $location_result->city_latitude; |
|
491 | - } ?>"/> |
|
490 | + echo $location_result->city_latitude; |
|
491 | + } ?>"/> |
|
492 | 492 | |
493 | 493 | <div |
494 | 494 | class="gd-location_message_error"><?php _e('This field is required.', 'geodirectory'); ?></div> |
@@ -504,8 +504,8 @@ discard block |
||
504 | 504 | <input type="text" class="require" size="80" style="width:440px" |
505 | 505 | id="<?php echo $prefix;?>longitude" name="longitude" |
506 | 506 | value="<?php if (isset($location_result->city_longitude)) { |
507 | - echo $location_result->city_longitude; |
|
508 | - } ?>"/> |
|
507 | + echo $location_result->city_longitude; |
|
508 | + } ?>"/> |
|
509 | 509 | |
510 | 510 | <div |
511 | 511 | class="gd-location_message_error"><?php _e('This field is required.', 'geodirectory'); ?></div> |
@@ -537,22 +537,22 @@ discard block |
||
537 | 537 | </div> |
538 | 538 | </div> |
539 | 539 | <?php break; |
540 | - case $listing_type . '_fields_settings' : |
|
540 | + case $listing_type . '_fields_settings' : |
|
541 | 541 | |
542 | - geodir_custom_post_type_form(); |
|
542 | + geodir_custom_post_type_form(); |
|
543 | 543 | |
544 | - break; |
|
545 | - case 'tools_settings' : |
|
546 | - geodir_diagnostic_tools_setting_page(); |
|
547 | - break; |
|
548 | - case 'compatibility_settings' : |
|
549 | - geodir_theme_compatibility_setting_page(); |
|
550 | - break; |
|
544 | + break; |
|
545 | + case 'tools_settings' : |
|
546 | + geodir_diagnostic_tools_setting_page(); |
|
547 | + break; |
|
548 | + case 'compatibility_settings' : |
|
549 | + geodir_theme_compatibility_setting_page(); |
|
550 | + break; |
|
551 | 551 | case 'import_export' : |
552 | - geodir_import_export_page(); |
|
553 | - break; |
|
552 | + geodir_import_export_page(); |
|
553 | + break; |
|
554 | 554 | |
555 | - }// end of switch |
|
555 | + }// end of switch |
|
556 | 556 | } |
557 | 557 | |
558 | 558 | |
@@ -592,170 +592,170 @@ discard block |
||
592 | 592 | function geodir_update_options_compatibility_settings() |
593 | 593 | { |
594 | 594 | |
595 | - global $wpdb; |
|
595 | + global $wpdb; |
|
596 | 596 | |
597 | 597 | |
598 | - $theme_settings = array(); |
|
598 | + $theme_settings = array(); |
|
599 | 599 | |
600 | - $theme_settings['geodir_wrapper_open_id'] = $_POST['geodir_wrapper_open_id']; |
|
601 | - $theme_settings['geodir_wrapper_open_class'] = $_POST['geodir_wrapper_open_class']; |
|
602 | - $theme_settings['geodir_wrapper_open_replace'] = stripslashes($_POST['geodir_wrapper_open_replace']); |
|
600 | + $theme_settings['geodir_wrapper_open_id'] = $_POST['geodir_wrapper_open_id']; |
|
601 | + $theme_settings['geodir_wrapper_open_class'] = $_POST['geodir_wrapper_open_class']; |
|
602 | + $theme_settings['geodir_wrapper_open_replace'] = stripslashes($_POST['geodir_wrapper_open_replace']); |
|
603 | 603 | |
604 | - $theme_settings['geodir_wrapper_close_replace'] = stripslashes($_POST['geodir_wrapper_close_replace']); |
|
604 | + $theme_settings['geodir_wrapper_close_replace'] = stripslashes($_POST['geodir_wrapper_close_replace']); |
|
605 | 605 | |
606 | - $theme_settings['geodir_wrapper_content_open_id'] = $_POST['geodir_wrapper_content_open_id']; |
|
607 | - $theme_settings['geodir_wrapper_content_open_class'] = $_POST['geodir_wrapper_content_open_class']; |
|
608 | - $theme_settings['geodir_wrapper_content_open_replace'] = stripslashes($_POST['geodir_wrapper_content_open_replace']); |
|
606 | + $theme_settings['geodir_wrapper_content_open_id'] = $_POST['geodir_wrapper_content_open_id']; |
|
607 | + $theme_settings['geodir_wrapper_content_open_class'] = $_POST['geodir_wrapper_content_open_class']; |
|
608 | + $theme_settings['geodir_wrapper_content_open_replace'] = stripslashes($_POST['geodir_wrapper_content_open_replace']); |
|
609 | 609 | |
610 | - $theme_settings['geodir_wrapper_content_close_replace'] = stripslashes($_POST['geodir_wrapper_content_close_replace']); |
|
610 | + $theme_settings['geodir_wrapper_content_close_replace'] = stripslashes($_POST['geodir_wrapper_content_close_replace']); |
|
611 | 611 | |
612 | - $theme_settings['geodir_article_open_id'] = $_POST['geodir_article_open_id']; |
|
613 | - $theme_settings['geodir_article_open_class'] = $_POST['geodir_article_open_class']; |
|
614 | - $theme_settings['geodir_article_open_replace'] = stripslashes($_POST['geodir_article_open_replace']); |
|
612 | + $theme_settings['geodir_article_open_id'] = $_POST['geodir_article_open_id']; |
|
613 | + $theme_settings['geodir_article_open_class'] = $_POST['geodir_article_open_class']; |
|
614 | + $theme_settings['geodir_article_open_replace'] = stripslashes($_POST['geodir_article_open_replace']); |
|
615 | 615 | |
616 | - $theme_settings['geodir_article_close_replace'] = stripslashes($_POST['geodir_article_close_replace']); |
|
616 | + $theme_settings['geodir_article_close_replace'] = stripslashes($_POST['geodir_article_close_replace']); |
|
617 | 617 | |
618 | - $theme_settings['geodir_sidebar_right_open_id'] = $_POST['geodir_sidebar_right_open_id']; |
|
619 | - $theme_settings['geodir_sidebar_right_open_class'] = $_POST['geodir_sidebar_right_open_class']; |
|
620 | - $theme_settings['geodir_sidebar_right_open_replace'] = stripslashes($_POST['geodir_sidebar_right_open_replace']); |
|
618 | + $theme_settings['geodir_sidebar_right_open_id'] = $_POST['geodir_sidebar_right_open_id']; |
|
619 | + $theme_settings['geodir_sidebar_right_open_class'] = $_POST['geodir_sidebar_right_open_class']; |
|
620 | + $theme_settings['geodir_sidebar_right_open_replace'] = stripslashes($_POST['geodir_sidebar_right_open_replace']); |
|
621 | 621 | |
622 | - $theme_settings['geodir_sidebar_right_close_replace'] = stripslashes($_POST['geodir_sidebar_right_close_replace']); |
|
622 | + $theme_settings['geodir_sidebar_right_close_replace'] = stripslashes($_POST['geodir_sidebar_right_close_replace']); |
|
623 | 623 | |
624 | - $theme_settings['geodir_sidebar_left_open_id'] = $_POST['geodir_sidebar_left_open_id']; |
|
625 | - $theme_settings['geodir_sidebar_left_open_class'] = $_POST['geodir_sidebar_left_open_class']; |
|
626 | - $theme_settings['geodir_sidebar_left_open_replace'] = stripslashes($_POST['geodir_sidebar_left_open_replace']); |
|
624 | + $theme_settings['geodir_sidebar_left_open_id'] = $_POST['geodir_sidebar_left_open_id']; |
|
625 | + $theme_settings['geodir_sidebar_left_open_class'] = $_POST['geodir_sidebar_left_open_class']; |
|
626 | + $theme_settings['geodir_sidebar_left_open_replace'] = stripslashes($_POST['geodir_sidebar_left_open_replace']); |
|
627 | 627 | |
628 | - $theme_settings['geodir_sidebar_left_close_replace'] = stripslashes($_POST['geodir_sidebar_left_close_replace']); |
|
628 | + $theme_settings['geodir_sidebar_left_close_replace'] = stripslashes($_POST['geodir_sidebar_left_close_replace']); |
|
629 | 629 | |
630 | - $theme_settings['geodir_main_content_open_id'] = $_POST['geodir_main_content_open_id']; |
|
631 | - $theme_settings['geodir_main_content_open_class'] = $_POST['geodir_main_content_open_class']; |
|
632 | - $theme_settings['geodir_main_content_open_replace'] = stripslashes($_POST['geodir_main_content_open_replace']); |
|
630 | + $theme_settings['geodir_main_content_open_id'] = $_POST['geodir_main_content_open_id']; |
|
631 | + $theme_settings['geodir_main_content_open_class'] = $_POST['geodir_main_content_open_class']; |
|
632 | + $theme_settings['geodir_main_content_open_replace'] = stripslashes($_POST['geodir_main_content_open_replace']); |
|
633 | 633 | |
634 | - $theme_settings['geodir_main_content_close_replace'] = stripslashes($_POST['geodir_main_content_close_replace']); |
|
634 | + $theme_settings['geodir_main_content_close_replace'] = stripslashes($_POST['geodir_main_content_close_replace']); |
|
635 | 635 | |
636 | 636 | // Other Actions |
637 | - $theme_settings['geodir_top_content_add'] = stripslashes($_POST['geodir_top_content_add']); |
|
638 | - $theme_settings['geodir_before_main_content_add'] = stripslashes($_POST['geodir_before_main_content_add']); |
|
637 | + $theme_settings['geodir_top_content_add'] = stripslashes($_POST['geodir_top_content_add']); |
|
638 | + $theme_settings['geodir_before_main_content_add'] = stripslashes($_POST['geodir_before_main_content_add']); |
|
639 | 639 | |
640 | 640 | // Filters |
641 | - $theme_settings['geodir_full_page_class_filter'] = stripslashes($_POST['geodir_full_page_class_filter']); |
|
642 | - $theme_settings['geodir_before_widget_filter'] = stripslashes($_POST['geodir_before_widget_filter']); |
|
643 | - $theme_settings['geodir_after_widget_filter'] = stripslashes($_POST['geodir_after_widget_filter']); |
|
644 | - $theme_settings['geodir_before_title_filter'] = stripslashes($_POST['geodir_before_title_filter']); |
|
645 | - $theme_settings['geodir_after_title_filter'] = stripslashes($_POST['geodir_after_title_filter']); |
|
646 | - $theme_settings['geodir_menu_li_class_filter'] = stripslashes($_POST['geodir_menu_li_class_filter']); |
|
647 | - $theme_settings['geodir_sub_menu_ul_class_filter'] = stripslashes($_POST['geodir_sub_menu_ul_class_filter']); |
|
648 | - $theme_settings['geodir_sub_menu_li_class_filter'] = stripslashes($_POST['geodir_sub_menu_li_class_filter']); |
|
649 | - $theme_settings['geodir_menu_a_class_filter'] = stripslashes($_POST['geodir_menu_a_class_filter']); |
|
650 | - $theme_settings['geodir_sub_menu_a_class_filter'] = stripslashes($_POST['geodir_sub_menu_a_class_filter']); |
|
641 | + $theme_settings['geodir_full_page_class_filter'] = stripslashes($_POST['geodir_full_page_class_filter']); |
|
642 | + $theme_settings['geodir_before_widget_filter'] = stripslashes($_POST['geodir_before_widget_filter']); |
|
643 | + $theme_settings['geodir_after_widget_filter'] = stripslashes($_POST['geodir_after_widget_filter']); |
|
644 | + $theme_settings['geodir_before_title_filter'] = stripslashes($_POST['geodir_before_title_filter']); |
|
645 | + $theme_settings['geodir_after_title_filter'] = stripslashes($_POST['geodir_after_title_filter']); |
|
646 | + $theme_settings['geodir_menu_li_class_filter'] = stripslashes($_POST['geodir_menu_li_class_filter']); |
|
647 | + $theme_settings['geodir_sub_menu_ul_class_filter'] = stripslashes($_POST['geodir_sub_menu_ul_class_filter']); |
|
648 | + $theme_settings['geodir_sub_menu_li_class_filter'] = stripslashes($_POST['geodir_sub_menu_li_class_filter']); |
|
649 | + $theme_settings['geodir_menu_a_class_filter'] = stripslashes($_POST['geodir_menu_a_class_filter']); |
|
650 | + $theme_settings['geodir_sub_menu_a_class_filter'] = stripslashes($_POST['geodir_sub_menu_a_class_filter']); |
|
651 | 651 | //location manager filters |
652 | - $theme_settings['geodir_location_switcher_menu_li_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_li_class_filter']); |
|
653 | - $theme_settings['geodir_location_switcher_menu_a_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_a_class_filter']); |
|
654 | - $theme_settings['geodir_location_switcher_menu_sub_ul_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_sub_ul_class_filter']); |
|
655 | - $theme_settings['geodir_location_switcher_menu_sub_li_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_sub_li_class_filter']); |
|
652 | + $theme_settings['geodir_location_switcher_menu_li_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_li_class_filter']); |
|
653 | + $theme_settings['geodir_location_switcher_menu_a_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_a_class_filter']); |
|
654 | + $theme_settings['geodir_location_switcher_menu_sub_ul_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_sub_ul_class_filter']); |
|
655 | + $theme_settings['geodir_location_switcher_menu_sub_li_class_filter'] = stripslashes($_POST['geodir_location_switcher_menu_sub_li_class_filter']); |
|
656 | 656 | |
657 | 657 | |
658 | 658 | // theme required css |
659 | - $theme_settings['geodir_theme_compat_css'] = stripslashes($_POST['geodir_theme_compat_css']); |
|
659 | + $theme_settings['geodir_theme_compat_css'] = stripslashes($_POST['geodir_theme_compat_css']); |
|
660 | 660 | |
661 | 661 | // theme required js |
662 | - $theme_settings['geodir_theme_compat_js'] = stripslashes($_POST['geodir_theme_compat_js']); |
|
662 | + $theme_settings['geodir_theme_compat_js'] = stripslashes($_POST['geodir_theme_compat_js']); |
|
663 | 663 | |
664 | 664 | // theme compat name |
665 | - $theme_settings['gd_theme_compat'] = $_POST['gd_theme_compat']; |
|
666 | - if ($theme_settings['gd_theme_compat'] == '') { |
|
667 | - update_option('gd_theme_compat', ''); |
|
668 | - update_option('theme_compatibility_setting', ''); |
|
669 | - return; |
|
670 | - } |
|
665 | + $theme_settings['gd_theme_compat'] = $_POST['gd_theme_compat']; |
|
666 | + if ($theme_settings['gd_theme_compat'] == '') { |
|
667 | + update_option('gd_theme_compat', ''); |
|
668 | + update_option('theme_compatibility_setting', ''); |
|
669 | + return; |
|
670 | + } |
|
671 | 671 | |
672 | 672 | // theme default options |
673 | - $theme_settings['geodir_theme_compat_default_options'] = ''; |
|
673 | + $theme_settings['geodir_theme_compat_default_options'] = ''; |
|
674 | 674 | |
675 | 675 | |
676 | 676 | //supported theme code |
677 | - $theme_settings['geodir_theme_compat_code'] = false; |
|
678 | - |
|
679 | - $theme = wp_get_theme(); |
|
680 | - |
|
681 | - if ($theme->parent()) { |
|
682 | - $theme_name = str_replace(" ", "_", $theme->parent()->get('Name')); |
|
683 | - } else { |
|
684 | - $theme_name = str_replace(" ", "_", $theme->get('Name')); |
|
685 | - } |
|
686 | - |
|
687 | - if (in_array($theme_name, array('Avada', 'Enfold', 'X', 'Divi', 'Genesis', 'Jupiter', 'Multi_News','Kleo','Twenty_Seventeen'))) {// list of themes that have php files |
|
688 | - $theme_settings['geodir_theme_compat_code'] = $theme_name; |
|
689 | - } |
|
690 | - |
|
691 | - |
|
692 | - $theme_name = $theme_name . "_custom"; |
|
693 | - $theme_arr = get_option('gd_theme_compats'); |
|
694 | - update_option('gd_theme_compat', $theme_name); |
|
695 | - /** |
|
696 | - * Called before the theme compatibility settings are saved to the DB. |
|
697 | - * |
|
698 | - * @since 1.4.0 |
|
699 | - * @param array $theme_settings { |
|
700 | - * Attributes of the theme compatibility settings array. |
|
701 | - * |
|
702 | - * @type string $geodir_wrapper_open_id Geodir wrapper open html id. |
|
703 | - * @type string $geodir_wrapper_open_class Geodir wrapper open html class. |
|
704 | - * @type string $geodir_wrapper_open_replace Geodir wrapper open content replace. |
|
705 | - * @type string $geodir_wrapper_close_replace Geodir wrapper close content replace. |
|
706 | - * @type string $geodir_wrapper_content_open_id Geodir wrapper content open html id. |
|
707 | - * @type string $geodir_wrapper_content_open_class Geodir wrapper content open html class. |
|
708 | - * @type string $geodir_wrapper_content_open_replace Geodir wrapper content open content replace. |
|
709 | - * @type string $geodir_wrapper_content_close_replace Geodir wrapper content close content replace. |
|
710 | - * @type string $geodir_article_open_id Geodir article open html id. |
|
711 | - * @type string $geodir_article_open_class Geodir article open html class. |
|
712 | - * @type string $geodir_article_open_replace Geodir article open content replace. |
|
713 | - * @type string $geodir_article_close_replace Geodir article close content replace. |
|
714 | - * @type string $geodir_sidebar_right_open_id Geodir sidebar right open html id. |
|
715 | - * @type string $geodir_sidebar_right_open_class Geodir sidebar right open html class. |
|
716 | - * @type string $geodir_sidebar_right_open_replace Geodir sidebar right open content replace. |
|
717 | - * @type string $geodir_sidebar_right_close_replace Geodir sidebar right close content replace. |
|
718 | - * @type string $geodir_sidebar_left_open_id Geodir sidebar left open html id. |
|
719 | - * @type string $geodir_sidebar_left_open_class Geodir sidebar left open html class. |
|
720 | - * @type string $geodir_sidebar_left_open_replace Geodir sidebar left open content replace. |
|
721 | - * @type string $geodir_sidebar_left_close_replace Geodir sidebar left close content replace. |
|
722 | - * @type string $geodir_main_content_open_id Geodir main content open html id. |
|
723 | - * @type string $geodir_main_content_open_class Geodir main content open html class. |
|
724 | - * @type string $geodir_main_content_open_replace Geodir main content open content replace. |
|
725 | - * @type string $geodir_main_content_close_replace Geodir main content close content replace. |
|
726 | - * @type string $geodir_top_content_add Geodir top content add. |
|
727 | - * @type string $geodir_before_main_content_add Geodir before main content add. |
|
728 | - * @type string $geodir_full_page_class_filter Geodir full page class filter. |
|
729 | - * @type string $geodir_before_widget_filter Geodir before widget filter. |
|
730 | - * @type string $geodir_after_widget_filter Geodir after widget filter. |
|
731 | - * @type string $geodir_before_title_filter Geodir before title filter. |
|
732 | - * @type string $geodir_after_title_filter Geodir after title filter. |
|
733 | - * @type string $geodir_menu_li_class_filter Geodir menu li class filter. |
|
734 | - * @type string $geodir_sub_menu_ul_class_filter Geodir sub menu ul class filter. |
|
735 | - * @type string $geodir_sub_menu_li_class_filter Geodir sub menu li class filter. |
|
736 | - * @type string $geodir_menu_a_class_filter Geodir menu a class filter. |
|
737 | - * @type string $geodir_sub_menu_a_class_filter Geodir sub menu a class filter. |
|
738 | - * @type string $geodir_location_switcher_menu_li_class_filter Geodir location switcher menu li class filter. |
|
739 | - * @type string $geodir_location_switcher_menu_a_class_filter Geodir location switcher menu a class filter. |
|
740 | - * @type string $geodir_location_switcher_menu_sub_ul_class_filter Geodir location switcher menu sub ul class filter. |
|
741 | - * @type string $geodir_location_switcher_menu_sub_li_class_filter Geodir location switcher menu sub li class filter. |
|
742 | - * @type string $geodir_theme_compat_css Geodir theme compatibility css. |
|
743 | - * @type string $geodir_theme_compat_js Geodir theme compatibility js. |
|
744 | - * @type string $gd_theme_compat Gd theme compatibility. |
|
745 | - * @type string $geodir_theme_compat_default_options Geodir theme compatibility default options. |
|
746 | - * @type bool $geodir_theme_compat_code Geodir theme compatibility code Ex: 'Avada. |
|
747 | - * |
|
748 | - * } |
|
749 | - */ |
|
750 | - do_action('gd_compat_save_settings', $theme_settings); |
|
677 | + $theme_settings['geodir_theme_compat_code'] = false; |
|
678 | + |
|
679 | + $theme = wp_get_theme(); |
|
680 | + |
|
681 | + if ($theme->parent()) { |
|
682 | + $theme_name = str_replace(" ", "_", $theme->parent()->get('Name')); |
|
683 | + } else { |
|
684 | + $theme_name = str_replace(" ", "_", $theme->get('Name')); |
|
685 | + } |
|
686 | + |
|
687 | + if (in_array($theme_name, array('Avada', 'Enfold', 'X', 'Divi', 'Genesis', 'Jupiter', 'Multi_News','Kleo','Twenty_Seventeen'))) {// list of themes that have php files |
|
688 | + $theme_settings['geodir_theme_compat_code'] = $theme_name; |
|
689 | + } |
|
690 | + |
|
691 | + |
|
692 | + $theme_name = $theme_name . "_custom"; |
|
693 | + $theme_arr = get_option('gd_theme_compats'); |
|
694 | + update_option('gd_theme_compat', $theme_name); |
|
695 | + /** |
|
696 | + * Called before the theme compatibility settings are saved to the DB. |
|
697 | + * |
|
698 | + * @since 1.4.0 |
|
699 | + * @param array $theme_settings { |
|
700 | + * Attributes of the theme compatibility settings array. |
|
701 | + * |
|
702 | + * @type string $geodir_wrapper_open_id Geodir wrapper open html id. |
|
703 | + * @type string $geodir_wrapper_open_class Geodir wrapper open html class. |
|
704 | + * @type string $geodir_wrapper_open_replace Geodir wrapper open content replace. |
|
705 | + * @type string $geodir_wrapper_close_replace Geodir wrapper close content replace. |
|
706 | + * @type string $geodir_wrapper_content_open_id Geodir wrapper content open html id. |
|
707 | + * @type string $geodir_wrapper_content_open_class Geodir wrapper content open html class. |
|
708 | + * @type string $geodir_wrapper_content_open_replace Geodir wrapper content open content replace. |
|
709 | + * @type string $geodir_wrapper_content_close_replace Geodir wrapper content close content replace. |
|
710 | + * @type string $geodir_article_open_id Geodir article open html id. |
|
711 | + * @type string $geodir_article_open_class Geodir article open html class. |
|
712 | + * @type string $geodir_article_open_replace Geodir article open content replace. |
|
713 | + * @type string $geodir_article_close_replace Geodir article close content replace. |
|
714 | + * @type string $geodir_sidebar_right_open_id Geodir sidebar right open html id. |
|
715 | + * @type string $geodir_sidebar_right_open_class Geodir sidebar right open html class. |
|
716 | + * @type string $geodir_sidebar_right_open_replace Geodir sidebar right open content replace. |
|
717 | + * @type string $geodir_sidebar_right_close_replace Geodir sidebar right close content replace. |
|
718 | + * @type string $geodir_sidebar_left_open_id Geodir sidebar left open html id. |
|
719 | + * @type string $geodir_sidebar_left_open_class Geodir sidebar left open html class. |
|
720 | + * @type string $geodir_sidebar_left_open_replace Geodir sidebar left open content replace. |
|
721 | + * @type string $geodir_sidebar_left_close_replace Geodir sidebar left close content replace. |
|
722 | + * @type string $geodir_main_content_open_id Geodir main content open html id. |
|
723 | + * @type string $geodir_main_content_open_class Geodir main content open html class. |
|
724 | + * @type string $geodir_main_content_open_replace Geodir main content open content replace. |
|
725 | + * @type string $geodir_main_content_close_replace Geodir main content close content replace. |
|
726 | + * @type string $geodir_top_content_add Geodir top content add. |
|
727 | + * @type string $geodir_before_main_content_add Geodir before main content add. |
|
728 | + * @type string $geodir_full_page_class_filter Geodir full page class filter. |
|
729 | + * @type string $geodir_before_widget_filter Geodir before widget filter. |
|
730 | + * @type string $geodir_after_widget_filter Geodir after widget filter. |
|
731 | + * @type string $geodir_before_title_filter Geodir before title filter. |
|
732 | + * @type string $geodir_after_title_filter Geodir after title filter. |
|
733 | + * @type string $geodir_menu_li_class_filter Geodir menu li class filter. |
|
734 | + * @type string $geodir_sub_menu_ul_class_filter Geodir sub menu ul class filter. |
|
735 | + * @type string $geodir_sub_menu_li_class_filter Geodir sub menu li class filter. |
|
736 | + * @type string $geodir_menu_a_class_filter Geodir menu a class filter. |
|
737 | + * @type string $geodir_sub_menu_a_class_filter Geodir sub menu a class filter. |
|
738 | + * @type string $geodir_location_switcher_menu_li_class_filter Geodir location switcher menu li class filter. |
|
739 | + * @type string $geodir_location_switcher_menu_a_class_filter Geodir location switcher menu a class filter. |
|
740 | + * @type string $geodir_location_switcher_menu_sub_ul_class_filter Geodir location switcher menu sub ul class filter. |
|
741 | + * @type string $geodir_location_switcher_menu_sub_li_class_filter Geodir location switcher menu sub li class filter. |
|
742 | + * @type string $geodir_theme_compat_css Geodir theme compatibility css. |
|
743 | + * @type string $geodir_theme_compat_js Geodir theme compatibility js. |
|
744 | + * @type string $gd_theme_compat Gd theme compatibility. |
|
745 | + * @type string $geodir_theme_compat_default_options Geodir theme compatibility default options. |
|
746 | + * @type bool $geodir_theme_compat_code Geodir theme compatibility code Ex: 'Avada. |
|
747 | + * |
|
748 | + * } |
|
749 | + */ |
|
750 | + do_action('gd_compat_save_settings', $theme_settings); |
|
751 | 751 | |
752 | 752 | //if($_POST['gd_theme_compat'])== |
753 | - $theme_arr[$theme_name] = $theme_settings; |
|
754 | - update_option('gd_theme_compats', $theme_arr); |
|
753 | + $theme_arr[$theme_name] = $theme_settings; |
|
754 | + update_option('gd_theme_compats', $theme_arr); |
|
755 | 755 | |
756 | 756 | |
757 | 757 | //print_r($theme_settings);exit; |
758 | - update_option('theme_compatibility_setting', $theme_settings); |
|
758 | + update_option('theme_compatibility_setting', $theme_settings); |
|
759 | 759 | |
760 | 760 | } |
761 | 761 | |
@@ -768,12 +768,12 @@ discard block |
||
768 | 768 | */ |
769 | 769 | function geodir_theme_compatibility_setting_page() |
770 | 770 | { |
771 | - global $wpdb; |
|
772 | - $tc = get_option('theme_compatibility_setting'); |
|
773 | - //print_r($tc); |
|
774 | - //print_r(wp_get_theme()); |
|
771 | + global $wpdb; |
|
772 | + $tc = get_option('theme_compatibility_setting'); |
|
773 | + //print_r($tc); |
|
774 | + //print_r(wp_get_theme()); |
|
775 | 775 | |
776 | - ?> |
|
776 | + ?> |
|
777 | 777 | <div class="inner_content_tab_main"> |
778 | 778 | <div class="gd-content-heading"> |
779 | 779 | |
@@ -815,21 +815,21 @@ discard block |
||
815 | 815 | <option value=""><?php _e('Select Theme', 'geodirectory');?></option> |
816 | 816 | <option value="custom"><?php _e('Custom', 'geodirectory');?></option> |
817 | 817 | <?php |
818 | - $theme_arr = get_option('gd_theme_compats'); |
|
819 | - $theme_active = get_option('gd_theme_compat'); |
|
820 | - if (is_array($theme_arr)) { |
|
821 | - foreach ($theme_arr as $key => $theme) { |
|
822 | - $sel = ''; |
|
823 | - if ($theme_active == $key) { |
|
824 | - $sel = "selected"; |
|
825 | - } |
|
826 | - echo "<option $sel>$key</option>"; |
|
827 | - } |
|
818 | + $theme_arr = get_option('gd_theme_compats'); |
|
819 | + $theme_active = get_option('gd_theme_compat'); |
|
820 | + if (is_array($theme_arr)) { |
|
821 | + foreach ($theme_arr as $key => $theme) { |
|
822 | + $sel = ''; |
|
823 | + if ($theme_active == $key) { |
|
824 | + $sel = "selected"; |
|
825 | + } |
|
826 | + echo "<option $sel>$key</option>"; |
|
827 | + } |
|
828 | 828 | |
829 | 829 | |
830 | - } |
|
830 | + } |
|
831 | 831 | |
832 | - ?> |
|
832 | + ?> |
|
833 | 833 | </select> |
834 | 834 | <button onclick="gd_comp_export();" type="button" |
835 | 835 | class="button-primary"><?php _e('Export', 'geodirectory');?></button> |
@@ -938,11 +938,11 @@ discard block |
||
938 | 938 | <small>geodir_wrapper_open</small> |
939 | 939 | </td> |
940 | 940 | <td><input value="<?php if (isset($tc['geodir_wrapper_open_id'])) { |
941 | - echo $tc['geodir_wrapper_open_id']; |
|
942 | - }?>" type="text" name="geodir_wrapper_open_id" placeholder="geodir-wrapper"/></td> |
|
941 | + echo $tc['geodir_wrapper_open_id']; |
|
942 | + }?>" type="text" name="geodir_wrapper_open_id" placeholder="geodir-wrapper"/></td> |
|
943 | 943 | <td><input value="<?php if (isset($tc['geodir_wrapper_open_class'])) { |
944 | - echo $tc['geodir_wrapper_open_class']; |
|
945 | - }?>" type="text" name="geodir_wrapper_open_class" placeholder=""/></td> |
|
944 | + echo $tc['geodir_wrapper_open_class']; |
|
945 | + }?>" type="text" name="geodir_wrapper_open_class" placeholder=""/></td> |
|
946 | 946 | </tr> |
947 | 947 | |
948 | 948 | <tr class="gd-theme-comp-out"> |
@@ -950,8 +950,8 @@ discard block |
||
950 | 950 | <span><?php _e('Output:', 'geodirectory');?></span> |
951 | 951 | <textarea name="geodir_wrapper_open_replace" |
952 | 952 | placeholder='<div id="[id]" class="[class]">'><?php if (isset($tc['geodir_wrapper_open_replace'])) { |
953 | - echo $tc['geodir_wrapper_open_replace']; |
|
954 | - }?></textarea> |
|
953 | + echo $tc['geodir_wrapper_open_replace']; |
|
954 | + }?></textarea> |
|
955 | 955 | </td> |
956 | 956 | </tr> |
957 | 957 | |
@@ -971,8 +971,8 @@ discard block |
||
971 | 971 | <span><?php _e('Output:', 'geodirectory');?></span> |
972 | 972 | <textarea name="geodir_wrapper_close_replace" |
973 | 973 | placeholder='</div><!-- wrapper ends here-->'><?php if (isset($tc['geodir_wrapper_close_replace'])) { |
974 | - echo $tc['geodir_wrapper_close_replace']; |
|
975 | - }?></textarea> |
|
974 | + echo $tc['geodir_wrapper_close_replace']; |
|
975 | + }?></textarea> |
|
976 | 976 | </td> |
977 | 977 | </tr> |
978 | 978 | |
@@ -982,12 +982,12 @@ discard block |
||
982 | 982 | <small>geodir_wrapper_content_open</small> |
983 | 983 | </td> |
984 | 984 | <td><input value="<?php if (isset($tc['geodir_wrapper_content_open_id'])) { |
985 | - echo $tc['geodir_wrapper_content_open_id']; |
|
986 | - }?>" type="text" name="geodir_wrapper_content_open_id" placeholder="geodir-wrapper-content"/> |
|
985 | + echo $tc['geodir_wrapper_content_open_id']; |
|
986 | + }?>" type="text" name="geodir_wrapper_content_open_id" placeholder="geodir-wrapper-content"/> |
|
987 | 987 | </td> |
988 | 988 | <td><input value="<?php if (isset($tc['geodir_wrapper_content_open_class'])) { |
989 | - echo $tc['geodir_wrapper_content_open_class']; |
|
990 | - }?>" type="text" name="geodir_wrapper_content_open_class" placeholder=""/></td> |
|
989 | + echo $tc['geodir_wrapper_content_open_class']; |
|
990 | + }?>" type="text" name="geodir_wrapper_content_open_class" placeholder=""/></td> |
|
991 | 991 | </tr> |
992 | 992 | |
993 | 993 | <tr class="gd-theme-comp-out"> |
@@ -995,8 +995,8 @@ discard block |
||
995 | 995 | <span><?php _e('Output:', 'geodirectory');?></span> |
996 | 996 | <textarea name="geodir_wrapper_content_open_replace" |
997 | 997 | placeholder='<div id="[id]" class="[class]" role="main" [width_css]>'><?php if (isset($tc['geodir_wrapper_content_open_replace'])) { |
998 | - echo $tc['geodir_wrapper_content_open_replace']; |
|
999 | - }?></textarea> |
|
998 | + echo $tc['geodir_wrapper_content_open_replace']; |
|
999 | + }?></textarea> |
|
1000 | 1000 | </td> |
1001 | 1001 | </tr> |
1002 | 1002 | |
@@ -1016,8 +1016,8 @@ discard block |
||
1016 | 1016 | <span><?php _e('Output:', 'geodirectory');?></span> |
1017 | 1017 | <textarea name="geodir_wrapper_content_close_replace" |
1018 | 1018 | placeholder='</div><!-- content ends here-->'><?php if (isset($tc['geodir_wrapper_content_close_replace'])) { |
1019 | - echo $tc['geodir_wrapper_content_close_replace']; |
|
1020 | - }?></textarea> |
|
1019 | + echo $tc['geodir_wrapper_content_close_replace']; |
|
1020 | + }?></textarea> |
|
1021 | 1021 | </td> |
1022 | 1022 | </tr> |
1023 | 1023 | |
@@ -1026,11 +1026,11 @@ discard block |
||
1026 | 1026 | <small>geodir_article_open</small> |
1027 | 1027 | </td> |
1028 | 1028 | <td><input value="<?php if (isset($tc['geodir_article_open_id'])) { |
1029 | - echo $tc['geodir_article_open_id']; |
|
1030 | - }?>" type="text" name="geodir_article_open_id" placeholder="geodir-wrapper-content"/></td> |
|
1029 | + echo $tc['geodir_article_open_id']; |
|
1030 | + }?>" type="text" name="geodir_article_open_id" placeholder="geodir-wrapper-content"/></td> |
|
1031 | 1031 | <td><input value="<?php if (isset($tc['geodir_article_open_class'])) { |
1032 | - echo $tc['geodir_article_open_class']; |
|
1033 | - }?>" type="text" name="geodir_article_open_class" placeholder=""/></td> |
|
1032 | + echo $tc['geodir_article_open_class']; |
|
1033 | + }?>" type="text" name="geodir_article_open_class" placeholder=""/></td> |
|
1034 | 1034 | </tr> |
1035 | 1035 | |
1036 | 1036 | <tr class="gd-theme-comp-out"> |
@@ -1038,8 +1038,8 @@ discard block |
||
1038 | 1038 | <span><?php _e('Output:', 'geodirectory');?></span> |
1039 | 1039 | <textarea name="geodir_article_open_replace" |
1040 | 1040 | placeholder='<article id="[id]" class="[class]" itemscope itemtype="[itemtype]">'><?php if (isset($tc['geodir_article_open_replace'])) { |
1041 | - echo $tc['geodir_article_open_replace']; |
|
1042 | - }?></textarea> |
|
1041 | + echo $tc['geodir_article_open_replace']; |
|
1042 | + }?></textarea> |
|
1043 | 1043 | </td> |
1044 | 1044 | </tr> |
1045 | 1045 | |
@@ -1058,8 +1058,8 @@ discard block |
||
1058 | 1058 | <span><?php _e('Output:', 'geodirectory');?></span> |
1059 | 1059 | <textarea name="geodir_article_close_replace" |
1060 | 1060 | placeholder='</article><!-- article ends here-->'><?php if (isset($tc['geodir_article_close_replace'])) { |
1061 | - echo $tc['geodir_article_close_replace']; |
|
1062 | - }?></textarea> |
|
1061 | + echo $tc['geodir_article_close_replace']; |
|
1062 | + }?></textarea> |
|
1063 | 1063 | </td> |
1064 | 1064 | </tr> |
1065 | 1065 | |
@@ -1068,11 +1068,11 @@ discard block |
||
1068 | 1068 | <small>geodir_sidebar_right_open</small> |
1069 | 1069 | </td> |
1070 | 1070 | <td><input value="<?php if (isset($tc['geodir_sidebar_right_open_id'])) { |
1071 | - echo $tc['geodir_sidebar_right_open_id']; |
|
1072 | - }?>" type="text" name="geodir_sidebar_right_open_id" placeholder="geodir-sidebar-right"/></td> |
|
1071 | + echo $tc['geodir_sidebar_right_open_id']; |
|
1072 | + }?>" type="text" name="geodir_sidebar_right_open_id" placeholder="geodir-sidebar-right"/></td> |
|
1073 | 1073 | <td><input value="<?php if (isset($tc['geodir_sidebar_right_open_class'])) { |
1074 | - echo $tc['geodir_sidebar_right_open_class']; |
|
1075 | - }?>" type="text" name="geodir_sidebar_right_open_class" |
|
1074 | + echo $tc['geodir_sidebar_right_open_class']; |
|
1075 | + }?>" type="text" name="geodir_sidebar_right_open_class" |
|
1076 | 1076 | placeholder="geodir-sidebar-right geodir-listings-sidebar-right"/></td> |
1077 | 1077 | </tr> |
1078 | 1078 | |
@@ -1081,8 +1081,8 @@ discard block |
||
1081 | 1081 | <span><?php _e('Output:', 'geodirectory');?></span> |
1082 | 1082 | <textarea name="geodir_sidebar_right_open_replace" |
1083 | 1083 | placeholder='<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>'><?php if (isset($tc['geodir_sidebar_right_open_replace'])) { |
1084 | - echo $tc['geodir_sidebar_right_open_replace']; |
|
1085 | - }?></textarea> |
|
1084 | + echo $tc['geodir_sidebar_right_open_replace']; |
|
1085 | + }?></textarea> |
|
1086 | 1086 | </td> |
1087 | 1087 | </tr> |
1088 | 1088 | |
@@ -1101,8 +1101,8 @@ discard block |
||
1101 | 1101 | <span><?php _e('Output:', 'geodirectory');?></span> |
1102 | 1102 | <textarea name="geodir_sidebar_right_close_replace" |
1103 | 1103 | placeholder='</aside><!-- sidebar ends here-->'><?php if (isset($tc['geodir_sidebar_right_close_replace'])) { |
1104 | - echo $tc['geodir_sidebar_right_close_replace']; |
|
1105 | - }?></textarea> |
|
1104 | + echo $tc['geodir_sidebar_right_close_replace']; |
|
1105 | + }?></textarea> |
|
1106 | 1106 | </td> |
1107 | 1107 | </tr> |
1108 | 1108 | |
@@ -1112,11 +1112,11 @@ discard block |
||
1112 | 1112 | <small>geodir_sidebar_left_open</small> |
1113 | 1113 | </td> |
1114 | 1114 | <td><input value="<?php if (isset($tc['geodir_sidebar_left_open_id'])) { |
1115 | - echo $tc['geodir_sidebar_left_open_id']; |
|
1116 | - }?>" type="text" name="geodir_sidebar_left_open_id" placeholder="geodir-sidebar-left"/></td> |
|
1115 | + echo $tc['geodir_sidebar_left_open_id']; |
|
1116 | + }?>" type="text" name="geodir_sidebar_left_open_id" placeholder="geodir-sidebar-left"/></td> |
|
1117 | 1117 | <td><input value="<?php if (isset($tc['geodir_sidebar_left_open_class'])) { |
1118 | - echo $tc['geodir_sidebar_left_open_class']; |
|
1119 | - }?>" type="text" name="geodir_sidebar_left_open_class" |
|
1118 | + echo $tc['geodir_sidebar_left_open_class']; |
|
1119 | + }?>" type="text" name="geodir_sidebar_left_open_class" |
|
1120 | 1120 | placeholder="geodir-sidebar-left geodir-listings-sidebar-left"/></td> |
1121 | 1121 | </tr> |
1122 | 1122 | |
@@ -1125,8 +1125,8 @@ discard block |
||
1125 | 1125 | <span><?php _e('Output:', 'geodirectory');?></span> |
1126 | 1126 | <textarea name="geodir_sidebar_left_open_replace" |
1127 | 1127 | placeholder='<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>'><?php if (isset($tc['geodir_sidebar_left_open_replace'])) { |
1128 | - echo $tc['geodir_sidebar_left_open_replace']; |
|
1129 | - }?></textarea> |
|
1128 | + echo $tc['geodir_sidebar_left_open_replace']; |
|
1129 | + }?></textarea> |
|
1130 | 1130 | </td> |
1131 | 1131 | </tr> |
1132 | 1132 | |
@@ -1145,8 +1145,8 @@ discard block |
||
1145 | 1145 | <span><?php _e('Output:', 'geodirectory');?></span> |
1146 | 1146 | <textarea name="geodir_sidebar_left_close_replace" |
1147 | 1147 | placeholder='</aside><!-- sidebar ends here-->'><?php if (isset($tc['geodir_sidebar_left_close_replace'])) { |
1148 | - echo $tc['geodir_sidebar_left_close_replace']; |
|
1149 | - }?></textarea> |
|
1148 | + echo $tc['geodir_sidebar_left_close_replace']; |
|
1149 | + }?></textarea> |
|
1150 | 1150 | </td> |
1151 | 1151 | </tr> |
1152 | 1152 | |
@@ -1155,11 +1155,11 @@ discard block |
||
1155 | 1155 | <small>geodir_main_content_open</small> |
1156 | 1156 | </td> |
1157 | 1157 | <td><input value="<?php if (isset($tc['geodir_main_content_open_id'])) { |
1158 | - echo $tc['geodir_main_content_open_id']; |
|
1159 | - }?>" type="text" name="geodir_main_content_open_id" placeholder="geodir-main-content"/></td> |
|
1158 | + echo $tc['geodir_main_content_open_id']; |
|
1159 | + }?>" type="text" name="geodir_main_content_open_id" placeholder="geodir-main-content"/></td> |
|
1160 | 1160 | <td><input value="<?php if (isset($tc['geodir_main_content_open_class'])) { |
1161 | - echo $tc['geodir_main_content_open_class']; |
|
1162 | - }?>" type="text" name="geodir_main_content_open_class" placeholder="CURRENT-PAGE-page"/></td> |
|
1161 | + echo $tc['geodir_main_content_open_class']; |
|
1162 | + }?>" type="text" name="geodir_main_content_open_class" placeholder="CURRENT-PAGE-page"/></td> |
|
1163 | 1163 | </tr> |
1164 | 1164 | |
1165 | 1165 | <tr class="gd-theme-comp-out"> |
@@ -1167,8 +1167,8 @@ discard block |
||
1167 | 1167 | <span><?php _e('Output:', 'geodirectory');?></span> |
1168 | 1168 | <textarea name="geodir_main_content_open_replace" |
1169 | 1169 | placeholder='<main id="[id]" class="[class]" role="main">'><?php if (isset($tc['geodir_main_content_open_replace'])) { |
1170 | - echo $tc['geodir_main_content_open_replace']; |
|
1171 | - }?></textarea> |
|
1170 | + echo $tc['geodir_main_content_open_replace']; |
|
1171 | + }?></textarea> |
|
1172 | 1172 | </td> |
1173 | 1173 | </tr> |
1174 | 1174 | |
@@ -1187,8 +1187,8 @@ discard block |
||
1187 | 1187 | <span><?php _e('Output:', 'geodirectory');?></span> |
1188 | 1188 | <textarea name="geodir_main_content_close_replace" |
1189 | 1189 | placeholder='</main><!-- main ends here-->'><?php if (isset($tc['geodir_main_content_close_replace'])) { |
1190 | - echo $tc['geodir_main_content_close_replace']; |
|
1191 | - }?></textarea> |
|
1190 | + echo $tc['geodir_main_content_close_replace']; |
|
1191 | + }?></textarea> |
|
1192 | 1192 | </td> |
1193 | 1193 | </tr> |
1194 | 1194 | |
@@ -1212,8 +1212,8 @@ discard block |
||
1212 | 1212 | </td> |
1213 | 1213 | <td><textarea name="geodir_top_content_add" |
1214 | 1214 | placeholder=''><?php if (isset($tc['geodir_top_content_add'])) { |
1215 | - echo $tc['geodir_top_content_add']; |
|
1216 | - }?></textarea></td> |
|
1215 | + echo $tc['geodir_top_content_add']; |
|
1216 | + }?></textarea></td> |
|
1217 | 1217 | </tr> |
1218 | 1218 | |
1219 | 1219 | <tr> |
@@ -1222,8 +1222,8 @@ discard block |
||
1222 | 1222 | </td> |
1223 | 1223 | <td><textarea name="geodir_before_main_content_add" |
1224 | 1224 | placeholder=''><?php if (isset($tc['geodir_before_main_content_add'])) { |
1225 | - echo $tc['geodir_before_main_content_add']; |
|
1226 | - }?></textarea></td> |
|
1225 | + echo $tc['geodir_before_main_content_add']; |
|
1226 | + }?></textarea></td> |
|
1227 | 1227 | </tr> |
1228 | 1228 | |
1229 | 1229 | |
@@ -1246,8 +1246,8 @@ discard block |
||
1246 | 1246 | </td> |
1247 | 1247 | <td><textarea name="geodir_full_page_class_filter" |
1248 | 1248 | placeholder='geodir_full_page clearfix'><?php if (isset($tc['geodir_full_page_class_filter'])) { |
1249 | - echo $tc['geodir_full_page_class_filter']; |
|
1250 | - }?></textarea></td> |
|
1249 | + echo $tc['geodir_full_page_class_filter']; |
|
1250 | + }?></textarea></td> |
|
1251 | 1251 | </tr> |
1252 | 1252 | |
1253 | 1253 | <tr> |
@@ -1256,8 +1256,8 @@ discard block |
||
1256 | 1256 | </td> |
1257 | 1257 | <td><textarea name="geodir_before_widget_filter" |
1258 | 1258 | placeholder='<section id="%1$s" class="widget geodir-widget %2$s">'><?php if (isset($tc['geodir_before_widget_filter'])) { |
1259 | - echo $tc['geodir_before_widget_filter']; |
|
1260 | - }?></textarea></td> |
|
1259 | + echo $tc['geodir_before_widget_filter']; |
|
1260 | + }?></textarea></td> |
|
1261 | 1261 | </tr> |
1262 | 1262 | |
1263 | 1263 | <tr> |
@@ -1266,8 +1266,8 @@ discard block |
||
1266 | 1266 | </td> |
1267 | 1267 | <td><textarea name="geodir_after_widget_filter" |
1268 | 1268 | placeholder='</section>'><?php if (isset($tc['geodir_after_widget_filter'])) { |
1269 | - echo $tc['geodir_after_widget_filter']; |
|
1270 | - }?></textarea></td> |
|
1269 | + echo $tc['geodir_after_widget_filter']; |
|
1270 | + }?></textarea></td> |
|
1271 | 1271 | </tr> |
1272 | 1272 | |
1273 | 1273 | <tr> |
@@ -1276,8 +1276,8 @@ discard block |
||
1276 | 1276 | </td> |
1277 | 1277 | <td><textarea name="geodir_before_title_filter" |
1278 | 1278 | placeholder='<h3 class="widget-title">'><?php if (isset($tc['geodir_before_title_filter'])) { |
1279 | - echo $tc['geodir_before_title_filter']; |
|
1280 | - }?></textarea></td> |
|
1279 | + echo $tc['geodir_before_title_filter']; |
|
1280 | + }?></textarea></td> |
|
1281 | 1281 | </tr> |
1282 | 1282 | |
1283 | 1283 | <tr> |
@@ -1286,8 +1286,8 @@ discard block |
||
1286 | 1286 | </td> |
1287 | 1287 | <td><textarea name="geodir_after_title_filter" |
1288 | 1288 | placeholder='</h3>'><?php if (isset($tc['geodir_after_title_filter'])) { |
1289 | - echo $tc['geodir_after_title_filter']; |
|
1290 | - }?></textarea></td> |
|
1289 | + echo $tc['geodir_after_title_filter']; |
|
1290 | + }?></textarea></td> |
|
1291 | 1291 | </tr> |
1292 | 1292 | |
1293 | 1293 | <tr> |
@@ -1296,8 +1296,8 @@ discard block |
||
1296 | 1296 | </td> |
1297 | 1297 | <td><textarea name="geodir_menu_li_class_filter" |
1298 | 1298 | placeholder='menu-item'><?php if (isset($tc['geodir_menu_li_class_filter'])) { |
1299 | - echo $tc['geodir_menu_li_class_filter']; |
|
1300 | - }?></textarea></td> |
|
1299 | + echo $tc['geodir_menu_li_class_filter']; |
|
1300 | + }?></textarea></td> |
|
1301 | 1301 | </tr> |
1302 | 1302 | |
1303 | 1303 | <tr> |
@@ -1306,8 +1306,8 @@ discard block |
||
1306 | 1306 | </td> |
1307 | 1307 | <td><textarea name="geodir_sub_menu_ul_class_filter" |
1308 | 1308 | placeholder='sub-menu'><?php if (isset($tc['geodir_sub_menu_ul_class_filter'])) { |
1309 | - echo $tc['geodir_sub_menu_ul_class_filter']; |
|
1310 | - }?></textarea></td> |
|
1309 | + echo $tc['geodir_sub_menu_ul_class_filter']; |
|
1310 | + }?></textarea></td> |
|
1311 | 1311 | </tr> |
1312 | 1312 | |
1313 | 1313 | <tr> |
@@ -1316,8 +1316,8 @@ discard block |
||
1316 | 1316 | </td> |
1317 | 1317 | <td><textarea name="geodir_sub_menu_li_class_filter" |
1318 | 1318 | placeholder='menu-item'><?php if (isset($tc['geodir_sub_menu_li_class_filter'])) { |
1319 | - echo $tc['geodir_sub_menu_li_class_filter']; |
|
1320 | - }?></textarea></td> |
|
1319 | + echo $tc['geodir_sub_menu_li_class_filter']; |
|
1320 | + }?></textarea></td> |
|
1321 | 1321 | </tr> |
1322 | 1322 | |
1323 | 1323 | <tr> |
@@ -1326,8 +1326,8 @@ discard block |
||
1326 | 1326 | </td> |
1327 | 1327 | <td><textarea name="geodir_menu_a_class_filter" |
1328 | 1328 | placeholder=''><?php if (isset($tc['geodir_menu_a_class_filter'])) { |
1329 | - echo $tc['geodir_menu_a_class_filter']; |
|
1330 | - }?></textarea></td> |
|
1329 | + echo $tc['geodir_menu_a_class_filter']; |
|
1330 | + }?></textarea></td> |
|
1331 | 1331 | </tr> |
1332 | 1332 | |
1333 | 1333 | <tr> |
@@ -1336,8 +1336,8 @@ discard block |
||
1336 | 1336 | </td> |
1337 | 1337 | <td><textarea name="geodir_sub_menu_a_class_filter" |
1338 | 1338 | placeholder=''><?php if (isset($tc['geodir_sub_menu_a_class_filter'])) { |
1339 | - echo $tc['geodir_sub_menu_a_class_filter']; |
|
1340 | - }?></textarea></td> |
|
1339 | + echo $tc['geodir_sub_menu_a_class_filter']; |
|
1340 | + }?></textarea></td> |
|
1341 | 1341 | </tr> |
1342 | 1342 | |
1343 | 1343 | |
@@ -1347,8 +1347,8 @@ discard block |
||
1347 | 1347 | </td> |
1348 | 1348 | <td><textarea name="geodir_location_switcher_menu_li_class_filter" |
1349 | 1349 | placeholder='menu-item menu-item-type-social menu-item-type-social gd-location-switcher'><?php if (isset($tc['geodir_location_switcher_menu_li_class_filter'])) { |
1350 | - echo $tc['geodir_location_switcher_menu_li_class_filter']; |
|
1351 | - }?></textarea></td> |
|
1350 | + echo $tc['geodir_location_switcher_menu_li_class_filter']; |
|
1351 | + }?></textarea></td> |
|
1352 | 1352 | </tr> |
1353 | 1353 | |
1354 | 1354 | <tr> |
@@ -1357,8 +1357,8 @@ discard block |
||
1357 | 1357 | </td> |
1358 | 1358 | <td><textarea name="geodir_location_switcher_menu_a_class_filter" |
1359 | 1359 | placeholder=''><?php if (isset($tc['geodir_location_switcher_menu_a_class_filter'])) { |
1360 | - echo $tc['geodir_location_switcher_menu_a_class_filter']; |
|
1361 | - }?></textarea></td> |
|
1360 | + echo $tc['geodir_location_switcher_menu_a_class_filter']; |
|
1361 | + }?></textarea></td> |
|
1362 | 1362 | </tr> |
1363 | 1363 | |
1364 | 1364 | <tr> |
@@ -1367,8 +1367,8 @@ discard block |
||
1367 | 1367 | </td> |
1368 | 1368 | <td><textarea name="geodir_location_switcher_menu_sub_ul_class_filter" |
1369 | 1369 | placeholder='sub-menu'><?php if (isset($tc['geodir_location_switcher_menu_sub_ul_class_filter'])) { |
1370 | - echo $tc['geodir_location_switcher_menu_sub_ul_class_filter']; |
|
1371 | - }?></textarea></td> |
|
1370 | + echo $tc['geodir_location_switcher_menu_sub_ul_class_filter']; |
|
1371 | + }?></textarea></td> |
|
1372 | 1372 | </tr> |
1373 | 1373 | |
1374 | 1374 | <tr> |
@@ -1377,21 +1377,21 @@ discard block |
||
1377 | 1377 | </td> |
1378 | 1378 | <td><textarea name="geodir_location_switcher_menu_sub_li_class_filter" |
1379 | 1379 | placeholder='menu-item gd-location-switcher-menu-item'><?php if (isset($tc['geodir_location_switcher_menu_sub_li_class_filter'])) { |
1380 | - echo $tc['geodir_location_switcher_menu_sub_li_class_filter']; |
|
1381 | - }?></textarea></td> |
|
1380 | + echo $tc['geodir_location_switcher_menu_sub_li_class_filter']; |
|
1381 | + }?></textarea></td> |
|
1382 | 1382 | </tr> |
1383 | 1383 | |
1384 | 1384 | |
1385 | 1385 | |
1386 | 1386 | <?php |
1387 | - /** |
|
1388 | - * Allows more filter setting to be added to theme compatibility settings page. |
|
1389 | - * |
|
1390 | - * Called after the last setting in "Other filters" section of theme compatibility settings. |
|
1391 | - * |
|
1392 | - * @since 1.4.0 |
|
1393 | - */ |
|
1394 | - do_action('gd_compat_other_filters');?> |
|
1387 | + /** |
|
1388 | + * Allows more filter setting to be added to theme compatibility settings page. |
|
1389 | + * |
|
1390 | + * Called after the last setting in "Other filters" section of theme compatibility settings. |
|
1391 | + * |
|
1392 | + * @since 1.4.0 |
|
1393 | + */ |
|
1394 | + do_action('gd_compat_other_filters');?> |
|
1395 | 1395 | |
1396 | 1396 | </tbody> |
1397 | 1397 | </table> |
@@ -1404,8 +1404,8 @@ discard block |
||
1404 | 1404 | <tr> |
1405 | 1405 | <td><textarea name="geodir_theme_compat_css" |
1406 | 1406 | placeholder=''><?php if (isset($tc['geodir_theme_compat_css'])) { |
1407 | - echo $tc['geodir_theme_compat_css']; |
|
1408 | - }?></textarea></td> |
|
1407 | + echo $tc['geodir_theme_compat_css']; |
|
1408 | + }?></textarea></td> |
|
1409 | 1409 | </tr> |
1410 | 1410 | |
1411 | 1411 | |
@@ -1419,8 +1419,8 @@ discard block |
||
1419 | 1419 | <tr> |
1420 | 1420 | <td><textarea name="geodir_theme_compat_js" |
1421 | 1421 | placeholder=''><?php if (isset($tc['geodir_theme_compat_js'])) { |
1422 | - echo $tc['geodir_theme_compat_js']; |
|
1423 | - }?></textarea></td> |
|
1422 | + echo $tc['geodir_theme_compat_js']; |
|
1423 | + }?></textarea></td> |
|
1424 | 1424 | </tr> |
1425 | 1425 | |
1426 | 1426 | |
@@ -1447,23 +1447,23 @@ discard block |
||
1447 | 1447 | */ |
1448 | 1448 | function geodir_custom_post_type_form() |
1449 | 1449 | { |
1450 | - $listing_type = ($_REQUEST['listing_type'] != '') ? $_REQUEST['listing_type'] : 'gd_place'; |
|
1450 | + $listing_type = ($_REQUEST['listing_type'] != '') ? $_REQUEST['listing_type'] : 'gd_place'; |
|
1451 | 1451 | |
1452 | - $sub_tab = ($_REQUEST['subtab'] != '') ? $_REQUEST['subtab'] : ''; |
|
1452 | + $sub_tab = ($_REQUEST['subtab'] != '') ? $_REQUEST['subtab'] : ''; |
|
1453 | 1453 | |
1454 | 1454 | |
1455 | - ?> |
|
1455 | + ?> |
|
1456 | 1456 | |
1457 | 1457 | <div class="gd-content-heading"> |
1458 | 1458 | <?php |
1459 | - /** |
|
1460 | - * Filter custom fields panel heading. |
|
1461 | - * |
|
1462 | - * @since 1.0.0 |
|
1463 | - * @param string $sub_tab Sub tab name. |
|
1464 | - * @param string $listing_type Post type. |
|
1465 | - */ |
|
1466 | - ?> |
|
1459 | + /** |
|
1460 | + * Filter custom fields panel heading. |
|
1461 | + * |
|
1462 | + * @since 1.0.0 |
|
1463 | + * @param string $sub_tab Sub tab name. |
|
1464 | + * @param string $listing_type Post type. |
|
1465 | + */ |
|
1466 | + ?> |
|
1467 | 1467 | <h3><?php echo apply_filters('geodir_custom_fields_panel_head', '', $sub_tab, $listing_type);?></h3> |
1468 | 1468 | </div> |
1469 | 1469 | <div id="container_general" class="clearfix"> |
@@ -1471,25 +1471,25 @@ discard block |
||
1471 | 1471 | |
1472 | 1472 | <div class="side-sortables" id="geodir-available-fields"> |
1473 | 1473 | <?php |
1474 | - /** |
|
1475 | - * Filter custom field available fields heading. |
|
1476 | - * |
|
1477 | - * @since 1.0.0 |
|
1478 | - * @param string $sub_tab Sub tab name. |
|
1479 | - * @param string $listing_type Post type. |
|
1480 | - */ |
|
1481 | - ?> |
|
1474 | + /** |
|
1475 | + * Filter custom field available fields heading. |
|
1476 | + * |
|
1477 | + * @since 1.0.0 |
|
1478 | + * @param string $sub_tab Sub tab name. |
|
1479 | + * @param string $listing_type Post type. |
|
1480 | + */ |
|
1481 | + ?> |
|
1482 | 1482 | <h3 class="hndle"><span><?php echo apply_filters('geodir_cf_panel_available_fields_head', '', $sub_tab, $listing_type);?> |
1483 | 1483 | </span></h3> |
1484 | 1484 | <?php |
1485 | - /** |
|
1486 | - * Filter custom field available fields note text. |
|
1487 | - * |
|
1488 | - * @since 1.0.0 |
|
1489 | - * @param string $sub_tab Sub tab name. |
|
1490 | - * @param string $listing_type Post type. |
|
1491 | - */ |
|
1492 | - ?> |
|
1485 | + /** |
|
1486 | + * Filter custom field available fields note text. |
|
1487 | + * |
|
1488 | + * @since 1.0.0 |
|
1489 | + * @param string $sub_tab Sub tab name. |
|
1490 | + * @param string $listing_type Post type. |
|
1491 | + */ |
|
1492 | + ?> |
|
1493 | 1493 | <p><?php echo apply_filters('geodir_cf_panel_available_fields_note', '', $sub_tab, $listing_type);?></p> |
1494 | 1494 | |
1495 | 1495 | <h3><?php _e('Setup New Field','geodirectory');?></h3> |
@@ -1498,13 +1498,13 @@ discard block |
||
1498 | 1498 | <div id="gt-form-builder-tab" class="gt-tabs-panel"> |
1499 | 1499 | |
1500 | 1500 | <?php |
1501 | - /** |
|
1502 | - * Adds the available fields to the custom fields settings page per post type. |
|
1503 | - * |
|
1504 | - * @since 1.0.0 |
|
1505 | - * @param string $sub_tab The current settings tab name. |
|
1506 | - */ |
|
1507 | - do_action('geodir_manage_available_fields', $sub_tab); ?> |
|
1501 | + /** |
|
1502 | + * Adds the available fields to the custom fields settings page per post type. |
|
1503 | + * |
|
1504 | + * @since 1.0.0 |
|
1505 | + * @param string $sub_tab The current settings tab name. |
|
1506 | + */ |
|
1507 | + do_action('geodir_manage_available_fields', $sub_tab); ?> |
|
1508 | 1508 | |
1509 | 1509 | <div style="clear:both"></div> |
1510 | 1510 | </div> |
@@ -1519,13 +1519,13 @@ discard block |
||
1519 | 1519 | <div id="gt-form-builder-tab" class="gt-tabs-panel"> |
1520 | 1520 | |
1521 | 1521 | <?php |
1522 | - /** |
|
1523 | - * Adds the available fields to the custom fields predefined settings page per post type. |
|
1524 | - * |
|
1525 | - * @since 1.6.9 |
|
1526 | - * @param string $sub_tab The current settings tab name. |
|
1527 | - */ |
|
1528 | - do_action('geodir_manage_available_fields_predefined', $sub_tab); ?> |
|
1522 | + /** |
|
1523 | + * Adds the available fields to the custom fields predefined settings page per post type. |
|
1524 | + * |
|
1525 | + * @since 1.6.9 |
|
1526 | + * @param string $sub_tab The current settings tab name. |
|
1527 | + */ |
|
1528 | + do_action('geodir_manage_available_fields_predefined', $sub_tab); ?> |
|
1529 | 1529 | |
1530 | 1530 | <div style="clear:both"></div> |
1531 | 1531 | </div> |
@@ -1538,13 +1538,13 @@ discard block |
||
1538 | 1538 | <div id="gt-form-builder-tab" class="gt-tabs-panel"> |
1539 | 1539 | |
1540 | 1540 | <?php |
1541 | - /** |
|
1542 | - * Adds the available fields to the custom fields custom added settings page per post type. |
|
1543 | - * |
|
1544 | - * @since 1.6.9 |
|
1545 | - * @param string $sub_tab The current settings tab name. |
|
1546 | - */ |
|
1547 | - do_action('geodir_manage_available_fields_custom', $sub_tab); ?> |
|
1541 | + /** |
|
1542 | + * Adds the available fields to the custom fields custom added settings page per post type. |
|
1543 | + * |
|
1544 | + * @since 1.6.9 |
|
1545 | + * @param string $sub_tab The current settings tab name. |
|
1546 | + */ |
|
1547 | + do_action('geodir_manage_available_fields_custom', $sub_tab); ?> |
|
1548 | 1548 | |
1549 | 1549 | <div style="clear:both"></div> |
1550 | 1550 | </div> |
@@ -1561,25 +1561,25 @@ discard block |
||
1561 | 1561 | <div class="side-sortables" id="geodir-selected-fields"> |
1562 | 1562 | <h3 class="hndle"> |
1563 | 1563 | <?php |
1564 | - /** |
|
1565 | - * Filter custom field selected fields heading. |
|
1566 | - * |
|
1567 | - * @since 1.0.0 |
|
1568 | - * @param string $sub_tab Sub tab name. |
|
1569 | - * @param string $listing_type Post type. |
|
1570 | - */ |
|
1571 | - ?> |
|
1564 | + /** |
|
1565 | + * Filter custom field selected fields heading. |
|
1566 | + * |
|
1567 | + * @since 1.0.0 |
|
1568 | + * @param string $sub_tab Sub tab name. |
|
1569 | + * @param string $listing_type Post type. |
|
1570 | + */ |
|
1571 | + ?> |
|
1572 | 1572 | <span><?php echo apply_filters('geodir_cf_panel_selected_fields_head', '', $sub_tab, $listing_type);?></span> |
1573 | 1573 | </h3> |
1574 | 1574 | <?php |
1575 | - /** |
|
1576 | - * Filter custom field selected fields note text. |
|
1577 | - * |
|
1578 | - * @since 1.0.0 |
|
1579 | - * @param string $sub_tab Sub tab name. |
|
1580 | - * @param string $listing_type Post type. |
|
1581 | - */ |
|
1582 | - ?> |
|
1575 | + /** |
|
1576 | + * Filter custom field selected fields note text. |
|
1577 | + * |
|
1578 | + * @since 1.0.0 |
|
1579 | + * @param string $sub_tab Sub tab name. |
|
1580 | + * @param string $listing_type Post type. |
|
1581 | + */ |
|
1582 | + ?> |
|
1583 | 1583 | <p><?php echo apply_filters('geodir_cf_panel_selected_fields_note', '', $sub_tab, $listing_type);?></p> |
1584 | 1584 | |
1585 | 1585 | <div class="inside"> |
@@ -1587,13 +1587,13 @@ discard block |
||
1587 | 1587 | <div id="gt-form-builder-tab" class="gt-tabs-panel"> |
1588 | 1588 | <div class="field_row_main"> |
1589 | 1589 | <?php |
1590 | - /** |
|
1591 | - * Adds the selected fields and setting to the custom fields settings page per post type. |
|
1592 | - * |
|
1593 | - * @since 1.0.0 |
|
1594 | - * @param string $sub_tab The current settings tab name. |
|
1595 | - */ |
|
1596 | - do_action('geodir_manage_selected_fields', $sub_tab); ?> |
|
1590 | + /** |
|
1591 | + * Adds the selected fields and setting to the custom fields settings page per post type. |
|
1592 | + * |
|
1593 | + * @since 1.0.0 |
|
1594 | + * @param string $sub_tab The current settings tab name. |
|
1595 | + */ |
|
1596 | + do_action('geodir_manage_selected_fields', $sub_tab); ?> |
|
1597 | 1597 | </div> |
1598 | 1598 | <div style="clear:both"></div> |
1599 | 1599 | </div> |
@@ -1616,7 +1616,7 @@ discard block |
||
1616 | 1616 | */ |
1617 | 1617 | function geodir_diagnostic_tools_setting_page() |
1618 | 1618 | { |
1619 | - ?> |
|
1619 | + ?> |
|
1620 | 1620 | <div class="inner_content_tab_main"> |
1621 | 1621 | <div class="gd-content-heading"> |
1622 | 1622 | |
@@ -1680,27 +1680,27 @@ discard block |
||
1680 | 1680 | |
1681 | 1681 | <tr> |
1682 | 1682 | <?php |
1683 | - $l_count = geodir_total_listings_count(); |
|
1684 | - $step_max_items = geodir_get_diagnose_step_max_items(); |
|
1685 | - if ($l_count > $step_max_items) { |
|
1686 | - $multiple = 'data-step="1"'; |
|
1687 | - } else { |
|
1688 | - $multiple = ""; |
|
1689 | - } |
|
1690 | - ?> |
|
1683 | + $l_count = geodir_total_listings_count(); |
|
1684 | + $step_max_items = geodir_get_diagnose_step_max_items(); |
|
1685 | + if ($l_count > $step_max_items) { |
|
1686 | + $multiple = 'data-step="1"'; |
|
1687 | + } else { |
|
1688 | + $multiple = ""; |
|
1689 | + } |
|
1690 | + ?> |
|
1691 | 1691 | <td><?php _e('Sync GD tags', 'geodirectory');?></td> |
1692 | 1692 | <td> |
1693 | 1693 | <small><?php _e('This tool can be used when tags are showing in the backend but missing from the front end.', 'geodirectory');?></small> |
1694 | 1694 | <?php |
1695 | - if ($l_count > $step_max_items) { |
|
1696 | - ?> |
|
1695 | + if ($l_count > $step_max_items) { |
|
1696 | + ?> |
|
1697 | 1697 | <table id="tags_sync_sub_table" class="widefat" style="display: none"> |
1698 | 1698 | <?php |
1699 | - $all_postypes = geodir_get_posttypes('array'); |
|
1699 | + $all_postypes = geodir_get_posttypes('array'); |
|
1700 | 1700 | |
1701 | - if (!empty($all_postypes)) { |
|
1702 | - foreach ($all_postypes as $key => $value) { |
|
1703 | - ?> |
|
1701 | + if (!empty($all_postypes)) { |
|
1702 | + foreach ($all_postypes as $key => $value) { |
|
1703 | + ?> |
|
1704 | 1704 | <tr id="tags_sync_<?php echo $key; ?>"> |
1705 | 1705 | <td> |
1706 | 1706 | <?php echo $value['labels']['name']; ?> |
@@ -1711,13 +1711,13 @@ discard block |
||
1711 | 1711 | </td> |
1712 | 1712 | </tr> |
1713 | 1713 | <?php |
1714 | - } |
|
1715 | - } |
|
1716 | - ?> |
|
1714 | + } |
|
1715 | + } |
|
1716 | + ?> |
|
1717 | 1717 | </table> |
1718 | 1718 | <?php |
1719 | - } |
|
1720 | - ?> |
|
1719 | + } |
|
1720 | + ?> |
|
1721 | 1721 | </td> |
1722 | 1722 | <td> |
1723 | 1723 | <input type="button" value="<?php _e('Run', 'geodirectory');?>" |
@@ -1765,13 +1765,13 @@ discard block |
||
1765 | 1765 | </td> |
1766 | 1766 | </tr> |
1767 | 1767 | <?php |
1768 | - /** |
|
1769 | - * Allows you to add more setting to the GD>Tools settings page. |
|
1770 | - * |
|
1771 | - * Called after the last setting on the GD>Tools page. |
|
1772 | - * @since 1.0.0 |
|
1773 | - */ |
|
1774 | - do_action('geodir_diagnostic_tool');?> |
|
1768 | + /** |
|
1769 | + * Allows you to add more setting to the GD>Tools settings page. |
|
1770 | + * |
|
1771 | + * Called after the last setting on the GD>Tools page. |
|
1772 | + * @since 1.0.0 |
|
1773 | + */ |
|
1774 | + do_action('geodir_diagnostic_tool');?> |
|
1775 | 1775 | |
1776 | 1776 | </tbody> |
1777 | 1777 | </table> |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @param array $tabs The array of tabs to display. |
53 | 53 | */ |
54 | 54 | $tabs = apply_filters('geodir_settings_tabs_array', $tabs); |
55 | - update_option('geodir_tabs', $tabs);// Important to show settings menu dropdown |
|
55 | + update_option('geodir_tabs', $tabs); // Important to show settings menu dropdown |
|
56 | 56 | |
57 | 57 | foreach ($tabs as $name => $args) : |
58 | 58 | $label = $args['label']; |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | |
64 | 64 | $subtabs = $args['subtabs']; |
65 | 65 | |
66 | - $query_string = '&subtab=' . $subtabs[0]['subtab']; |
|
66 | + $query_string = '&subtab='.$subtabs[0]['subtab']; |
|
67 | 67 | |
68 | 68 | endif; |
69 | 69 | |
70 | 70 | |
71 | - $tab_link = admin_url('admin.php?page=geodirectory&tab=' . $name . $query_string); |
|
71 | + $tab_link = admin_url('admin.php?page=geodirectory&tab='.$name.$query_string); |
|
72 | 72 | |
73 | 73 | if (isset($args['url']) && $args['url'] != '') { |
74 | 74 | $tab_link = $args['url']; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $tab_link = geodir_getlink($tab_link, $args['request']); |
79 | 79 | |
80 | 80 | if (isset($args['target']) && $args['target'] != '') { |
81 | - $tab_target = " target='" . sanitize_text_field($args['target']) . "' "; |
|
81 | + $tab_target = " target='".sanitize_text_field($args['target'])."' "; |
|
82 | 82 | } else |
83 | 83 | $tab_target = ''; |
84 | 84 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * @see 'geodir_after_settings_tabs' |
94 | 94 | */ |
95 | 95 | do_action('geodir_before_settings_tabs', $name); |
96 | - echo '<li ' . $tab_active . ' ><a href="' . esc_url($tab_link) . '" ' . $tab_target . ' >' . $label . '</a></li>'; |
|
96 | + echo '<li '.$tab_active.' ><a href="'.esc_url($tab_link).'" '.$tab_target.' >'.$label.'</a></li>'; |
|
97 | 97 | /** |
98 | 98 | * Called after the individual settings tabs are output. |
99 | 99 | * |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | $form_action = isset($sub['form_action']) ? $sub['form_action'] : ''; |
138 | 138 | } |
139 | 139 | |
140 | - $sub_tabs_link = admin_url() . 'admin.php?page=geodirectory&tab=' . $current_tab . '&subtab=' . $sub['subtab']; |
|
140 | + $sub_tabs_link = admin_url().'admin.php?page=geodirectory&tab='.$current_tab.'&subtab='.$sub['subtab']; |
|
141 | 141 | if (isset($sub['request']) && is_array($sub['request']) && !empty($sub['request'])) { |
142 | 142 | $sub_tabs_link = geodir_getlink($sub_tabs_link, $sub['request']); |
143 | 143 | } |
144 | - echo '<dd ' . $subtab_active . ' id="claim_listing"><a href="' . esc_url($sub_tabs_link) . '" >' . sanitize_text_field($sub['label']) . '</a></dd>'; |
|
144 | + echo '<dd '.$subtab_active.' id="claim_listing"><a href="'.esc_url($sub_tabs_link).'" >'.sanitize_text_field($sub['label']).'</a></dd>'; |
|
145 | 145 | } |
146 | 146 | ?> |
147 | 147 | </dl> |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | echo "inner_contet_tabs"; |
152 | 152 | } ?>"> |
153 | 153 | <form method="post" id="mainform" |
154 | - class="geodir_optionform <?php echo $current_tab . ' '; ?><?php if (isset($sub['subtab'])) { |
|
154 | + class="geodir_optionform <?php echo $current_tab.' '; ?><?php if (isset($sub['subtab'])) { |
|
155 | 155 | echo sanitize_text_field($sub['subtab']); |
156 | 156 | } ?>" action="<?php echo $form_action; ?>" enctype="multipart/form-data"> |
157 | 157 | <input type="hidden" class="active_tab" name="active_tab" |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | echo sanitize_text_field($_REQUEST['active_tab']); |
160 | 160 | } ?>"/> |
161 | 161 | <?php wp_nonce_field('geodir-settings', '_wpnonce', true, true); ?> |
162 | - <?php wp_nonce_field('geodir-settings-' . $current_tab, '_wpnonce-' . $current_tab, true, true); ?> |
|
162 | + <?php wp_nonce_field('geodir-settings-'.$current_tab, '_wpnonce-'.$current_tab, true, true); ?> |
|
163 | 163 | <?php |
164 | 164 | /** |
165 | 165 | * Used to call the content of each GD settings tab page. |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | jQuery('#last_tab').val( jQuery(this).attr('href') ); |
190 | 190 | return false;*/ |
191 | 191 | }); |
192 | - <?php if (isset($_GET['subtab']) && $_GET['subtab']) echo 'jQuery(\'ul.subsubsub li a[href="#' . sanitize_text_field($_GET['subtab']) . '"]\').click();'; ?> |
|
192 | + <?php if (isset($_GET['subtab']) && $_GET['subtab']) echo 'jQuery(\'ul.subsubsub li a[href="#'.sanitize_text_field($_GET['subtab']).'"]\').click();'; ?> |
|
193 | 193 | // Countries |
194 | 194 | jQuery('select#geodirectory_allowed_countries').change(function () { |
195 | 195 | if (jQuery(this).val() == "specific") { |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | jQuery('.geodirectory-nav-tab-wrapper a').click(function () { |
223 | 223 | if (changed) { |
224 | 224 | window.onbeforeunload = function () { |
225 | - return '<?php echo __( 'The changes you made will be lost if you navigate away from this page.', 'geodirectory'); ?>'; |
|
225 | + return '<?php echo __('The changes you made will be lost if you navigate away from this page.', 'geodirectory'); ?>'; |
|
226 | 226 | } |
227 | 227 | } else { |
228 | 228 | window.onbeforeunload = ''; |
@@ -285,14 +285,14 @@ discard block |
||
285 | 285 | |
286 | 286 | //echo $tab_name.'_array.php' ; |
287 | 287 | global $geodir_settings, $is_default, $mapzoom; |
288 | - if (file_exists(dirname(__FILE__) . '/option-pages/' . $tab_name . '_array.php')) { |
|
288 | + if (file_exists(dirname(__FILE__).'/option-pages/'.$tab_name.'_array.php')) { |
|
289 | 289 | /** |
290 | 290 | * Contains settings array for given tab. |
291 | 291 | * |
292 | 292 | * @since 1.0.0 |
293 | 293 | * @package GeoDirectory |
294 | 294 | */ |
295 | - include_once('option-pages/' . $tab_name . '_array.php'); |
|
295 | + include_once('option-pages/'.$tab_name.'_array.php'); |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | $listing_type = isset($_REQUEST['listing_type']) ? $_REQUEST['listing_type'] : ''; |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | ?> |
328 | 328 | |
329 | 329 | <p class="submit"> |
330 | - <input <?php echo $hide_save_button;?> name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" /> |
|
330 | + <input <?php echo $hide_save_button; ?> name="save" class="button-primary" type="submit" value="<?php _e('Save changes', 'geodirectory'); ?>" /> |
|
331 | 331 | <input type="hidden" name="subtab" id="last_tab" /> |
332 | 332 | </p> |
333 | 333 | |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | |
399 | 399 | ?> |
400 | 400 | |
401 | - <h3><?php _e('Set Default Location', 'geodirectory');?></h3> |
|
401 | + <h3><?php _e('Set Default Location', 'geodirectory'); ?></h3> |
|
402 | 402 | |
403 | 403 | <input type="hidden" name="add_location" value="location"> |
404 | 404 | |
@@ -406,16 +406,16 @@ discard block |
||
406 | 406 | echo $location_result->location_id; |
407 | 407 | } ?>"> |
408 | 408 | |
409 | - <input type="hidden" name="address" id="<?php echo $prefix;?>address" value=""> |
|
409 | + <input type="hidden" name="address" id="<?php echo $prefix; ?>address" value=""> |
|
410 | 410 | |
411 | 411 | <table class="form-table default_location_form"> |
412 | 412 | <tbody> |
413 | 413 | <tr valign="top" class="single_select_page"> |
414 | - <th class="titledesc" scope="row"><?php _e('City', 'geodirectory');?></th> |
|
414 | + <th class="titledesc" scope="row"><?php _e('City', 'geodirectory'); ?></th> |
|
415 | 415 | <td class="forminp"> |
416 | 416 | <div class="gtd-formfeild required"> |
417 | 417 | <input class="require" type="text" size="80" style="width:440px" |
418 | - id="<?php echo $prefix;?>city" name="city" |
|
418 | + id="<?php echo $prefix; ?>city" name="city" |
|
419 | 419 | value="<?php if (isset($location_result->city)) { |
420 | 420 | echo $location_result->city; |
421 | 421 | } ?>"/> |
@@ -427,11 +427,11 @@ discard block |
||
427 | 427 | </td> |
428 | 428 | </tr> |
429 | 429 | <tr valign="top" class="single_select_page"> |
430 | - <th class="titledesc" scope="row"><?php _e('Region', 'geodirectory');?></th> |
|
430 | + <th class="titledesc" scope="row"><?php _e('Region', 'geodirectory'); ?></th> |
|
431 | 431 | <td class="forminp"> |
432 | 432 | <div class="gtd-formfeild required"> |
433 | 433 | <input class="require" type="text" size="80" style="width:440px" |
434 | - id="<?php echo $prefix;?>region" name="region" |
|
434 | + id="<?php echo $prefix; ?>region" name="region" |
|
435 | 435 | value="<?php if (isset($location_result->region)) { |
436 | 436 | echo $location_result->region; |
437 | 437 | } ?>"/> |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | </td> |
444 | 444 | </tr> |
445 | 445 | <tr valign="top" class="single_select_page"> |
446 | - <th class="titledesc" scope="row"><?php _e('Country', 'geodirectory');?></th> |
|
446 | + <th class="titledesc" scope="row"><?php _e('Country', 'geodirectory'); ?></th> |
|
447 | 447 | <td class="forminp"> |
448 | 448 | <div class="gtd-formfeild required" style="padding-top:10px;"> |
449 | 449 | <?php |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | ?> |
453 | 453 | <select id="<?php echo $prefix ?>country" class="chosen_select" |
454 | 454 | data-location_type="country" name="<?php echo $prefix ?>country" |
455 | - data-placeholder="<?php _e('Choose a country.', 'geodirectory');?>" |
|
455 | + data-placeholder="<?php _e('Choose a country.', 'geodirectory'); ?>" |
|
456 | 456 | data-addsearchtermonnorecord="1" data-ajaxchosen="0" data-autoredirect="0" |
457 | 457 | data-showeverywhere="0"> |
458 | 458 | <?php geodir_get_country_dl($country, $prefix); ?> |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | </tr> |
470 | 470 | <tr valign="top" class="single_select_page gd-add-location-map"> |
471 | 471 | <th class="titledesc" |
472 | - scope="row"><?php _e('Set Location on Map', 'geodirectory');?></th> |
|
472 | + scope="row"><?php _e('Set Location on Map', 'geodirectory'); ?></th> |
|
473 | 473 | <td class="forminp"> |
474 | 474 | <?php |
475 | 475 | /** |
@@ -477,15 +477,15 @@ discard block |
||
477 | 477 | * |
478 | 478 | * @since 1.0.0 |
479 | 479 | */ |
480 | - include(geodir_plugin_path() . "/geodirectory-functions/map-functions/map_on_add_listing_page.php");?> |
|
480 | + include(geodir_plugin_path()."/geodirectory-functions/map-functions/map_on_add_listing_page.php"); ?> |
|
481 | 481 | </td> |
482 | 482 | </tr> |
483 | 483 | <tr valign="top" class="single_select_page"> |
484 | - <th class="titledesc" scope="row"><?php _e('City Latitude', 'geodirectory');?></th> |
|
484 | + <th class="titledesc" scope="row"><?php _e('City Latitude', 'geodirectory'); ?></th> |
|
485 | 485 | <td class="forminp"> |
486 | 486 | <div class="gtd-formfeild required" style="padding-top:10px;"> |
487 | 487 | <input type="text" class="require" size="80" style="width:440px" |
488 | - id="<?php echo $prefix;?>latitude" name="latitude" |
|
488 | + id="<?php echo $prefix; ?>latitude" name="latitude" |
|
489 | 489 | value="<?php if (isset($location_result->city_latitude)) { |
490 | 490 | echo $location_result->city_latitude; |
491 | 491 | } ?>"/> |
@@ -498,11 +498,11 @@ discard block |
||
498 | 498 | </tr> |
499 | 499 | <tr valign="top" class="single_select_page"> |
500 | 500 | <th class="titledesc" |
501 | - scope="row"><?php _e('City Longitude', 'geodirectory');?></th> |
|
501 | + scope="row"><?php _e('City Longitude', 'geodirectory'); ?></th> |
|
502 | 502 | <td class="forminp"> |
503 | 503 | <div class="gtd-formfeild required" style="padding-top:10px;"> |
504 | 504 | <input type="text" class="require" size="80" style="width:440px" |
505 | - id="<?php echo $prefix;?>longitude" name="longitude" |
|
505 | + id="<?php echo $prefix; ?>longitude" name="longitude" |
|
506 | 506 | value="<?php if (isset($location_result->city_longitude)) { |
507 | 507 | echo $location_result->city_longitude; |
508 | 508 | } ?>"/> |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | </div> |
538 | 538 | </div> |
539 | 539 | <?php break; |
540 | - case $listing_type . '_fields_settings' : |
|
540 | + case $listing_type.'_fields_settings' : |
|
541 | 541 | |
542 | 542 | geodir_custom_post_type_form(); |
543 | 543 | |
@@ -684,12 +684,12 @@ discard block |
||
684 | 684 | $theme_name = str_replace(" ", "_", $theme->get('Name')); |
685 | 685 | } |
686 | 686 | |
687 | - if (in_array($theme_name, array('Avada', 'Enfold', 'X', 'Divi', 'Genesis', 'Jupiter', 'Multi_News','Kleo','Twenty_Seventeen'))) {// list of themes that have php files |
|
687 | + if (in_array($theme_name, array('Avada', 'Enfold', 'X', 'Divi', 'Genesis', 'Jupiter', 'Multi_News', 'Kleo', 'Twenty_Seventeen'))) {// list of themes that have php files |
|
688 | 688 | $theme_settings['geodir_theme_compat_code'] = $theme_name; |
689 | 689 | } |
690 | 690 | |
691 | 691 | |
692 | - $theme_name = $theme_name . "_custom"; |
|
692 | + $theme_name = $theme_name."_custom"; |
|
693 | 693 | $theme_arr = get_option('gd_theme_compats'); |
694 | 694 | update_option('gd_theme_compat', $theme_name); |
695 | 695 | /** |
@@ -778,7 +778,7 @@ discard block |
||
778 | 778 | <div class="gd-content-heading"> |
779 | 779 | |
780 | 780 | |
781 | - <h3><?php _e('Theme Compatibility Settings', 'geodirectory');?></h3> |
|
781 | + <h3><?php _e('Theme Compatibility Settings', 'geodirectory'); ?></h3> |
|
782 | 782 | <style> |
783 | 783 | .gd-theme-compat-table { |
784 | 784 | width: 100%; |
@@ -809,11 +809,11 @@ discard block |
||
809 | 809 | </div> |
810 | 810 | <?php }?> |
811 | 811 | |
812 | - <h4><?php _e('Select Theme Compatibility Pack', 'geodirectory');?></h4> |
|
812 | + <h4><?php _e('Select Theme Compatibility Pack', 'geodirectory'); ?></h4> |
|
813 | 813 | |
814 | 814 | <select name="gd_theme_compat" id="gd_theme_compat"> |
815 | - <option value=""><?php _e('Select Theme', 'geodirectory');?></option> |
|
816 | - <option value="custom"><?php _e('Custom', 'geodirectory');?></option> |
|
815 | + <option value=""><?php _e('Select Theme', 'geodirectory'); ?></option> |
|
816 | + <option value="custom"><?php _e('Custom', 'geodirectory'); ?></option> |
|
817 | 817 | <?php |
818 | 818 | $theme_arr = get_option('gd_theme_compats'); |
819 | 819 | $theme_active = get_option('gd_theme_compat'); |
@@ -832,20 +832,20 @@ discard block |
||
832 | 832 | ?> |
833 | 833 | </select> |
834 | 834 | <button onclick="gd_comp_export();" type="button" |
835 | - class="button-primary"><?php _e('Export', 'geodirectory');?></button> |
|
835 | + class="button-primary"><?php _e('Export', 'geodirectory'); ?></button> |
|
836 | 836 | <button onclick="gd_comp_import();" type="button" |
837 | - class="button-primary"><?php _e('Import', 'geodirectory');?></button> |
|
837 | + class="button-primary"><?php _e('Import', 'geodirectory'); ?></button> |
|
838 | 838 | |
839 | 839 | <div class="gd-comp-import-export"> |
840 | 840 | <textarea id="gd-import-export-theme-comp" |
841 | - placeholder="<?php _e('Paste the JSON code here and then click import again', 'geodirectory');?>"></textarea> |
|
841 | + placeholder="<?php _e('Paste the JSON code here and then click import again', 'geodirectory'); ?>"></textarea> |
|
842 | 842 | </div> |
843 | 843 | <script> |
844 | 844 | |
845 | 845 | function gd_comp_export() { |
846 | 846 | theme = jQuery('#gd_theme_compat').val(); |
847 | 847 | if (theme == '' || theme == 'custom') { |
848 | - alert("<?php _e('Please select a theme to export','geodirectory');?>"); |
|
848 | + alert("<?php _e('Please select a theme to export', 'geodirectory'); ?>"); |
|
849 | 849 | return false; |
850 | 850 | } |
851 | 851 | jQuery('.gd-comp-import-export').show(); |
@@ -879,9 +879,9 @@ discard block |
||
879 | 879 | |
880 | 880 | jQuery.post(ajaxurl, data, function (response) { |
881 | 881 | if (response == '0') { |
882 | - alert("<?php _e('Something went wrong','geodirectory');?>"); |
|
882 | + alert("<?php _e('Something went wrong', 'geodirectory'); ?>"); |
|
883 | 883 | } else { |
884 | - alert("<?php _e('Theme Compatibility Imported','geodirectory');?>"); |
|
884 | + alert("<?php _e('Theme Compatibility Imported', 'geodirectory'); ?>"); |
|
885 | 885 | jQuery('#gd-import-export-theme-comp').val(''); |
886 | 886 | jQuery('.gd-comp-import-export').hide(); |
887 | 887 | jQuery('#gd_theme_compat').append(new Option(response, response)); |
@@ -922,14 +922,14 @@ discard block |
||
922 | 922 | |
923 | 923 | </script> |
924 | 924 | |
925 | - <h4><?php _e('Main Wrapper Actions', 'geodirectory');?></h4> |
|
925 | + <h4><?php _e('Main Wrapper Actions', 'geodirectory'); ?></h4> |
|
926 | 926 | |
927 | 927 | <table class="form-table gd-theme-compat-table"> |
928 | 928 | <tbody> |
929 | 929 | <tr> |
930 | - <td><strong><?php _e('Hook', 'geodirectory');?></strong></td> |
|
931 | - <td><strong><?php _e('ID', 'geodirectory');?></strong></td> |
|
932 | - <td><strong><?php _e('Class', 'geodirectory');?></strong></td> |
|
930 | + <td><strong><?php _e('Hook', 'geodirectory'); ?></strong></td> |
|
931 | + <td><strong><?php _e('ID', 'geodirectory'); ?></strong></td> |
|
932 | + <td><strong><?php _e('Class', 'geodirectory'); ?></strong></td> |
|
933 | 933 | </tr> |
934 | 934 | |
935 | 935 | |
@@ -947,7 +947,7 @@ discard block |
||
947 | 947 | |
948 | 948 | <tr class="gd-theme-comp-out"> |
949 | 949 | <td colspan="3"> |
950 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
950 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
951 | 951 | <textarea name="geodir_wrapper_open_replace" |
952 | 952 | placeholder='<div id="[id]" class="[class]">'><?php if (isset($tc['geodir_wrapper_open_replace'])) { |
953 | 953 | echo $tc['geodir_wrapper_open_replace']; |
@@ -961,14 +961,14 @@ discard block |
||
961 | 961 | <small>geodir_wrapper_close</small> |
962 | 962 | </td> |
963 | 963 | <td><input disabled="disabled" type="text" name="geodir_wrapper_open_id" |
964 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
964 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
965 | 965 | <td><input disabled="disabled" type="text" name="geodir_wrapper_open_class" |
966 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
966 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
967 | 967 | </tr> |
968 | 968 | |
969 | 969 | <tr class="gd-theme-comp-out"> |
970 | 970 | <td colspan="3"> |
971 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
971 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
972 | 972 | <textarea name="geodir_wrapper_close_replace" |
973 | 973 | placeholder='</div><!-- wrapper ends here-->'><?php if (isset($tc['geodir_wrapper_close_replace'])) { |
974 | 974 | echo $tc['geodir_wrapper_close_replace']; |
@@ -992,7 +992,7 @@ discard block |
||
992 | 992 | |
993 | 993 | <tr class="gd-theme-comp-out"> |
994 | 994 | <td colspan="3"> |
995 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
995 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
996 | 996 | <textarea name="geodir_wrapper_content_open_replace" |
997 | 997 | placeholder='<div id="[id]" class="[class]" role="main" [width_css]>'><?php if (isset($tc['geodir_wrapper_content_open_replace'])) { |
998 | 998 | echo $tc['geodir_wrapper_content_open_replace']; |
@@ -1006,14 +1006,14 @@ discard block |
||
1006 | 1006 | <small>geodir_wrapper_content_close</small> |
1007 | 1007 | </td> |
1008 | 1008 | <td><input disabled="disabled" type="text" name="geodir_wrapper_content_close_id" |
1009 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1009 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1010 | 1010 | <td><input disabled="disabled" type="text" name="geodir_wrapper_content_close_class" |
1011 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1011 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1012 | 1012 | </tr> |
1013 | 1013 | |
1014 | 1014 | <tr class="gd-theme-comp-out"> |
1015 | 1015 | <td colspan="3"> |
1016 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
1016 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
1017 | 1017 | <textarea name="geodir_wrapper_content_close_replace" |
1018 | 1018 | placeholder='</div><!-- content ends here-->'><?php if (isset($tc['geodir_wrapper_content_close_replace'])) { |
1019 | 1019 | echo $tc['geodir_wrapper_content_close_replace']; |
@@ -1035,7 +1035,7 @@ discard block |
||
1035 | 1035 | |
1036 | 1036 | <tr class="gd-theme-comp-out"> |
1037 | 1037 | <td colspan="3"> |
1038 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
1038 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
1039 | 1039 | <textarea name="geodir_article_open_replace" |
1040 | 1040 | placeholder='<article id="[id]" class="[class]" itemscope itemtype="[itemtype]">'><?php if (isset($tc['geodir_article_open_replace'])) { |
1041 | 1041 | echo $tc['geodir_article_open_replace']; |
@@ -1048,14 +1048,14 @@ discard block |
||
1048 | 1048 | <small>geodir_article_close</small> |
1049 | 1049 | </td> |
1050 | 1050 | <td><input disabled="disabled" type="text" name="geodir_article_close_id" |
1051 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1051 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1052 | 1052 | <td><input disabled="disabled" type="text" name="geodir_article_close_class" |
1053 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1053 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1054 | 1054 | </tr> |
1055 | 1055 | |
1056 | 1056 | <tr class="gd-theme-comp-out"> |
1057 | 1057 | <td colspan="3"> |
1058 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
1058 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
1059 | 1059 | <textarea name="geodir_article_close_replace" |
1060 | 1060 | placeholder='</article><!-- article ends here-->'><?php if (isset($tc['geodir_article_close_replace'])) { |
1061 | 1061 | echo $tc['geodir_article_close_replace']; |
@@ -1078,7 +1078,7 @@ discard block |
||
1078 | 1078 | |
1079 | 1079 | <tr class="gd-theme-comp-out"> |
1080 | 1080 | <td colspan="3"> |
1081 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
1081 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
1082 | 1082 | <textarea name="geodir_sidebar_right_open_replace" |
1083 | 1083 | placeholder='<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>'><?php if (isset($tc['geodir_sidebar_right_open_replace'])) { |
1084 | 1084 | echo $tc['geodir_sidebar_right_open_replace']; |
@@ -1091,14 +1091,14 @@ discard block |
||
1091 | 1091 | <small>geodir_sidebar_right_close</small> |
1092 | 1092 | </td> |
1093 | 1093 | <td><input disabled="disabled" type="text" name="geodir_sidebar_right_close_id" |
1094 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1094 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1095 | 1095 | <td><input disabled="disabled" type="text" name="geodir_sidebar_right_close_class" |
1096 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1096 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1097 | 1097 | </tr> |
1098 | 1098 | |
1099 | 1099 | <tr class="gd-theme-comp-out"> |
1100 | 1100 | <td colspan="3"> |
1101 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
1101 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
1102 | 1102 | <textarea name="geodir_sidebar_right_close_replace" |
1103 | 1103 | placeholder='</aside><!-- sidebar ends here-->'><?php if (isset($tc['geodir_sidebar_right_close_replace'])) { |
1104 | 1104 | echo $tc['geodir_sidebar_right_close_replace']; |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | |
1123 | 1123 | <tr class="gd-theme-comp-out"> |
1124 | 1124 | <td colspan="3"> |
1125 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
1125 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
1126 | 1126 | <textarea name="geodir_sidebar_left_open_replace" |
1127 | 1127 | placeholder='<aside id="[id]" class="[class]" role="complementary" itemscope itemtype="[itemtype]" [width_css]>'><?php if (isset($tc['geodir_sidebar_left_open_replace'])) { |
1128 | 1128 | echo $tc['geodir_sidebar_left_open_replace']; |
@@ -1135,14 +1135,14 @@ discard block |
||
1135 | 1135 | <small>geodir_sidebar_left_close</small> |
1136 | 1136 | </td> |
1137 | 1137 | <td><input disabled="disabled" type="text" name="geodir_sidebar_left_close_id" |
1138 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1138 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1139 | 1139 | <td><input disabled="disabled" type="text" name="geodir_sidebar_left_close_class" |
1140 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1140 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1141 | 1141 | </tr> |
1142 | 1142 | |
1143 | 1143 | <tr class="gd-theme-comp-out"> |
1144 | 1144 | <td colspan="3"> |
1145 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
1145 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
1146 | 1146 | <textarea name="geodir_sidebar_left_close_replace" |
1147 | 1147 | placeholder='</aside><!-- sidebar ends here-->'><?php if (isset($tc['geodir_sidebar_left_close_replace'])) { |
1148 | 1148 | echo $tc['geodir_sidebar_left_close_replace']; |
@@ -1164,7 +1164,7 @@ discard block |
||
1164 | 1164 | |
1165 | 1165 | <tr class="gd-theme-comp-out"> |
1166 | 1166 | <td colspan="3"> |
1167 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
1167 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
1168 | 1168 | <textarea name="geodir_main_content_open_replace" |
1169 | 1169 | placeholder='<main id="[id]" class="[class]" role="main">'><?php if (isset($tc['geodir_main_content_open_replace'])) { |
1170 | 1170 | echo $tc['geodir_main_content_open_replace']; |
@@ -1177,14 +1177,14 @@ discard block |
||
1177 | 1177 | <small>geodir_main_content_close</small> |
1178 | 1178 | </td> |
1179 | 1179 | <td><input disabled="disabled" type="text" name="geodir_main_content_close_id" |
1180 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1180 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1181 | 1181 | <td><input disabled="disabled" type="text" name="geodir_main_content_close_class" |
1182 | - placeholder="<?php _e('Not used', 'geodirectory');?>"/></td> |
|
1182 | + placeholder="<?php _e('Not used', 'geodirectory'); ?>"/></td> |
|
1183 | 1183 | </tr> |
1184 | 1184 | |
1185 | 1185 | <tr class="gd-theme-comp-out"> |
1186 | 1186 | <td colspan="3"> |
1187 | - <span><?php _e('Output:', 'geodirectory');?></span> |
|
1187 | + <span><?php _e('Output:', 'geodirectory'); ?></span> |
|
1188 | 1188 | <textarea name="geodir_main_content_close_replace" |
1189 | 1189 | placeholder='</main><!-- main ends here-->'><?php if (isset($tc['geodir_main_content_close_replace'])) { |
1190 | 1190 | echo $tc['geodir_main_content_close_replace']; |
@@ -1196,13 +1196,13 @@ discard block |
||
1196 | 1196 | </tbody> |
1197 | 1197 | </table> |
1198 | 1198 | |
1199 | - <h4><?php _e('Other Actions', 'geodirectory');?></h4> |
|
1199 | + <h4><?php _e('Other Actions', 'geodirectory'); ?></h4> |
|
1200 | 1200 | |
1201 | 1201 | <table class="form-table gd-theme-compat-table"> |
1202 | 1202 | <tbody> |
1203 | 1203 | <tr> |
1204 | - <td><strong><?php _e('Hook', 'geodirectory');?></strong></td> |
|
1205 | - <td><strong><?php _e('Content', 'geodirectory');?></strong></td> |
|
1204 | + <td><strong><?php _e('Hook', 'geodirectory'); ?></strong></td> |
|
1205 | + <td><strong><?php _e('Content', 'geodirectory'); ?></strong></td> |
|
1206 | 1206 | </tr> |
1207 | 1207 | |
1208 | 1208 | |
@@ -1231,13 +1231,13 @@ discard block |
||
1231 | 1231 | </table> |
1232 | 1232 | |
1233 | 1233 | |
1234 | - <h4><?php _e('Other Filters', 'geodirectory');?></h4> |
|
1234 | + <h4><?php _e('Other Filters', 'geodirectory'); ?></h4> |
|
1235 | 1235 | |
1236 | 1236 | <table class="form-table gd-theme-compat-table"> |
1237 | 1237 | <tbody> |
1238 | 1238 | <tr> |
1239 | - <td><strong><?php _e('Filter', 'geodirectory');?></strong></td> |
|
1240 | - <td><strong><?php _e('Content', 'geodirectory');?></strong></td> |
|
1239 | + <td><strong><?php _e('Filter', 'geodirectory'); ?></strong></td> |
|
1240 | + <td><strong><?php _e('Content', 'geodirectory'); ?></strong></td> |
|
1241 | 1241 | </tr> |
1242 | 1242 | |
1243 | 1243 | <tr> |
@@ -1391,13 +1391,13 @@ discard block |
||
1391 | 1391 | * |
1392 | 1392 | * @since 1.4.0 |
1393 | 1393 | */ |
1394 | - do_action('gd_compat_other_filters');?> |
|
1394 | + do_action('gd_compat_other_filters'); ?> |
|
1395 | 1395 | |
1396 | 1396 | </tbody> |
1397 | 1397 | </table> |
1398 | 1398 | |
1399 | 1399 | |
1400 | - <h4><?php _e('Required CSS', 'geodirectory');?></h4> |
|
1400 | + <h4><?php _e('Required CSS', 'geodirectory'); ?></h4> |
|
1401 | 1401 | |
1402 | 1402 | <table class="form-table gd-theme-compat-table"> |
1403 | 1403 | <tbody> |
@@ -1412,7 +1412,7 @@ discard block |
||
1412 | 1412 | </tbody> |
1413 | 1413 | </table> |
1414 | 1414 | |
1415 | - <h4><?php _e('Required JS', 'geodirectory');?></h4> |
|
1415 | + <h4><?php _e('Required JS', 'geodirectory'); ?></h4> |
|
1416 | 1416 | |
1417 | 1417 | <table class="form-table gd-theme-compat-table"> |
1418 | 1418 | <tbody> |
@@ -1430,7 +1430,7 @@ discard block |
||
1430 | 1430 | |
1431 | 1431 | <p class="submit"> |
1432 | 1432 | <input name="save" class="button-primary" type="submit" |
1433 | - value="<?php _e('Save changes', 'geodirectory');?>"> |
|
1433 | + value="<?php _e('Save changes', 'geodirectory'); ?>"> |
|
1434 | 1434 | </p> |
1435 | 1435 | |
1436 | 1436 | </div> |
@@ -1464,7 +1464,7 @@ discard block |
||
1464 | 1464 | * @param string $listing_type Post type. |
1465 | 1465 | */ |
1466 | 1466 | ?> |
1467 | - <h3><?php echo apply_filters('geodir_custom_fields_panel_head', '', $sub_tab, $listing_type);?></h3> |
|
1467 | + <h3><?php echo apply_filters('geodir_custom_fields_panel_head', '', $sub_tab, $listing_type); ?></h3> |
|
1468 | 1468 | </div> |
1469 | 1469 | <div id="container_general" class="clearfix"> |
1470 | 1470 | <div class="general-form-builder-frame"> |
@@ -1479,7 +1479,7 @@ discard block |
||
1479 | 1479 | * @param string $listing_type Post type. |
1480 | 1480 | */ |
1481 | 1481 | ?> |
1482 | - <h3 class="hndle"><span><?php echo apply_filters('geodir_cf_panel_available_fields_head', '', $sub_tab, $listing_type);?> |
|
1482 | + <h3 class="hndle"><span><?php echo apply_filters('geodir_cf_panel_available_fields_head', '', $sub_tab, $listing_type); ?> |
|
1483 | 1483 | </span></h3> |
1484 | 1484 | <?php |
1485 | 1485 | /** |
@@ -1490,9 +1490,9 @@ discard block |
||
1490 | 1490 | * @param string $listing_type Post type. |
1491 | 1491 | */ |
1492 | 1492 | ?> |
1493 | - <p><?php echo apply_filters('geodir_cf_panel_available_fields_note', '', $sub_tab, $listing_type);?></p> |
|
1493 | + <p><?php echo apply_filters('geodir_cf_panel_available_fields_note', '', $sub_tab, $listing_type); ?></p> |
|
1494 | 1494 | |
1495 | - <h3><?php _e('Setup New Field','geodirectory');?></h3> |
|
1495 | + <h3><?php _e('Setup New Field', 'geodirectory'); ?></h3> |
|
1496 | 1496 | <div class="inside"> |
1497 | 1497 | |
1498 | 1498 | <div id="gt-form-builder-tab" class="gt-tabs-panel"> |
@@ -1511,9 +1511,9 @@ discard block |
||
1511 | 1511 | |
1512 | 1512 | </div> |
1513 | 1513 | |
1514 | - <?php if($sub_tab=='custom_fields'){ ?> |
|
1514 | + <?php if ($sub_tab == 'custom_fields') { ?> |
|
1515 | 1515 | |
1516 | - <h3><?php _e('Predefined Fields','geodirectory');?></h3> |
|
1516 | + <h3><?php _e('Predefined Fields', 'geodirectory'); ?></h3> |
|
1517 | 1517 | <div class="inside"> |
1518 | 1518 | |
1519 | 1519 | <div id="gt-form-builder-tab" class="gt-tabs-panel"> |
@@ -1532,7 +1532,7 @@ discard block |
||
1532 | 1532 | |
1533 | 1533 | </div> |
1534 | 1534 | |
1535 | - <h3><?php _e('Custom Fields','geodirectory');?></h3> |
|
1535 | + <h3><?php _e('Custom Fields', 'geodirectory'); ?></h3> |
|
1536 | 1536 | <div class="inside"> |
1537 | 1537 | |
1538 | 1538 | <div id="gt-form-builder-tab" class="gt-tabs-panel"> |
@@ -1569,7 +1569,7 @@ discard block |
||
1569 | 1569 | * @param string $listing_type Post type. |
1570 | 1570 | */ |
1571 | 1571 | ?> |
1572 | - <span><?php echo apply_filters('geodir_cf_panel_selected_fields_head', '', $sub_tab, $listing_type);?></span> |
|
1572 | + <span><?php echo apply_filters('geodir_cf_panel_selected_fields_head', '', $sub_tab, $listing_type); ?></span> |
|
1573 | 1573 | </h3> |
1574 | 1574 | <?php |
1575 | 1575 | /** |
@@ -1580,7 +1580,7 @@ discard block |
||
1580 | 1580 | * @param string $listing_type Post type. |
1581 | 1581 | */ |
1582 | 1582 | ?> |
1583 | - <p><?php echo apply_filters('geodir_cf_panel_selected_fields_note', '', $sub_tab, $listing_type);?></p> |
|
1583 | + <p><?php echo apply_filters('geodir_cf_panel_selected_fields_note', '', $sub_tab, $listing_type); ?></p> |
|
1584 | 1584 | |
1585 | 1585 | <div class="inside"> |
1586 | 1586 | |
@@ -1621,7 +1621,7 @@ discard block |
||
1621 | 1621 | <div class="gd-content-heading"> |
1622 | 1622 | |
1623 | 1623 | |
1624 | - <h3><?php _e('GD Diagnostic Tools', 'geodirectory');?></h3> |
|
1624 | + <h3><?php _e('GD Diagnostic Tools', 'geodirectory'); ?></h3> |
|
1625 | 1625 | <style> |
1626 | 1626 | .gd-tools-table { |
1627 | 1627 | width: 100%; |
@@ -1640,40 +1640,40 @@ discard block |
||
1640 | 1640 | <table class="form-table gd-tools-table"> |
1641 | 1641 | <tbody> |
1642 | 1642 | <tr> |
1643 | - <td><strong><?php _e('Tool', 'geodirectory');?></strong></td> |
|
1644 | - <td><strong><?php _e('Description', 'geodirectory');?></strong></td> |
|
1645 | - <td><strong><?php _e('Action', 'geodirectory');?></strong></td> |
|
1643 | + <td><strong><?php _e('Tool', 'geodirectory'); ?></strong></td> |
|
1644 | + <td><strong><?php _e('Description', 'geodirectory'); ?></strong></td> |
|
1645 | + <td><strong><?php _e('Action', 'geodirectory'); ?></strong></td> |
|
1646 | 1646 | </tr> |
1647 | 1647 | |
1648 | 1648 | |
1649 | 1649 | <tr> |
1650 | - <td><?php _e('GD pages check', 'geodirectory');?></td> |
|
1650 | + <td><?php _e('GD pages check', 'geodirectory'); ?></td> |
|
1651 | 1651 | <td> |
1652 | - <small><?php _e('Checks if the GD pages are installed correctly or not.', 'geodirectory');?></small> |
|
1652 | + <small><?php _e('Checks if the GD pages are installed correctly or not.', 'geodirectory'); ?></small> |
|
1653 | 1653 | </td> |
1654 | 1654 | <td> |
1655 | - <input type="button" value="<?php _e('Run', 'geodirectory');?>" |
|
1655 | + <input type="button" value="<?php _e('Run', 'geodirectory'); ?>" |
|
1656 | 1656 | class="button-primary geodir_diagnosis_button" data-diagnose="default_pages"/> |
1657 | 1657 | </td> |
1658 | 1658 | </tr> |
1659 | 1659 | |
1660 | 1660 | |
1661 | 1661 | <tr> |
1662 | - <td><?php _e('Multisite DB conversion check', 'geodirectory');?></td> |
|
1662 | + <td><?php _e('Multisite DB conversion check', 'geodirectory'); ?></td> |
|
1663 | 1663 | <td> |
1664 | - <small><?php _e('Checks if the GD database tables have been converted to use multisite correctly.', 'geodirectory');?></small> |
|
1664 | + <small><?php _e('Checks if the GD database tables have been converted to use multisite correctly.', 'geodirectory'); ?></small> |
|
1665 | 1665 | </td> |
1666 | - <td><input type="button" value="<?php _e('Run', 'geodirectory');?>" |
|
1666 | + <td><input type="button" value="<?php _e('Run', 'geodirectory'); ?>" |
|
1667 | 1667 | class="button-primary geodir_diagnosis_button" data-diagnose="multisite_conversion"/> |
1668 | 1668 | </td> |
1669 | 1669 | </tr> |
1670 | 1670 | |
1671 | 1671 | <tr> |
1672 | - <td><?php _e('Ratings check', 'geodirectory');?></td> |
|
1672 | + <td><?php _e('Ratings check', 'geodirectory'); ?></td> |
|
1673 | 1673 | <td> |
1674 | - <small><?php _e('Checks ratings for correct location and content settings', 'geodirectory');?></small> |
|
1674 | + <small><?php _e('Checks ratings for correct location and content settings', 'geodirectory'); ?></small> |
|
1675 | 1675 | </td> |
1676 | - <td><input type="button" value="<?php _e('Run', 'geodirectory');?>" |
|
1676 | + <td><input type="button" value="<?php _e('Run', 'geodirectory'); ?>" |
|
1677 | 1677 | class="button-primary geodir_diagnosis_button" data-diagnose="ratings"/> |
1678 | 1678 | </td> |
1679 | 1679 | </tr> |
@@ -1688,9 +1688,9 @@ discard block |
||
1688 | 1688 | $multiple = ""; |
1689 | 1689 | } |
1690 | 1690 | ?> |
1691 | - <td><?php _e('Sync GD tags', 'geodirectory');?></td> |
|
1691 | + <td><?php _e('Sync GD tags', 'geodirectory'); ?></td> |
|
1692 | 1692 | <td> |
1693 | - <small><?php _e('This tool can be used when tags are showing in the backend but missing from the front end.', 'geodirectory');?></small> |
|
1693 | + <small><?php _e('This tool can be used when tags are showing in the backend but missing from the front end.', 'geodirectory'); ?></small> |
|
1694 | 1694 | <?php |
1695 | 1695 | if ($l_count > $step_max_items) { |
1696 | 1696 | ?> |
@@ -1706,7 +1706,7 @@ discard block |
||
1706 | 1706 | <?php echo $value['labels']['name']; ?> |
1707 | 1707 | </td> |
1708 | 1708 | <td> |
1709 | - <input type="button" value="<?php _e('Run', 'geodirectory');?>" |
|
1709 | + <input type="button" value="<?php _e('Run', 'geodirectory'); ?>" |
|
1710 | 1710 | class="button-primary geodir_diagnosis_button" data-ptype="<?php echo $key; ?>" data-diagnose="tags_sync"/> |
1711 | 1711 | </td> |
1712 | 1712 | </tr> |
@@ -1720,48 +1720,48 @@ discard block |
||
1720 | 1720 | ?> |
1721 | 1721 | </td> |
1722 | 1722 | <td> |
1723 | - <input type="button" value="<?php _e('Run', 'geodirectory');?>" |
|
1723 | + <input type="button" value="<?php _e('Run', 'geodirectory'); ?>" |
|
1724 | 1724 | class="button-primary geodir_diagnosis_button" <?php echo $multiple; ?> data-diagnose="tags_sync"/> |
1725 | 1725 | |
1726 | 1726 | </td> |
1727 | 1727 | </tr> |
1728 | 1728 | |
1729 | 1729 | <tr> |
1730 | - <td><?php _e('Sync GD Categories', 'geodirectory');?></td> |
|
1730 | + <td><?php _e('Sync GD Categories', 'geodirectory'); ?></td> |
|
1731 | 1731 | <td> |
1732 | - <small><?php _e('This tool can be used when categories are missing from the details table but showing in other places in the backend (only checks posts with missing category info in details table)', 'geodirectory');?></small> |
|
1732 | + <small><?php _e('This tool can be used when categories are missing from the details table but showing in other places in the backend (only checks posts with missing category info in details table)', 'geodirectory'); ?></small> |
|
1733 | 1733 | </td> |
1734 | - <td><input type="button" value="<?php _e('Run', 'geodirectory');?>" |
|
1734 | + <td><input type="button" value="<?php _e('Run', 'geodirectory'); ?>" |
|
1735 | 1735 | class="button-primary geodir_diagnosis_button" data-diagnose="cats_sync"/> |
1736 | 1736 | </td> |
1737 | 1737 | </tr> |
1738 | 1738 | |
1739 | 1739 | |
1740 | 1740 | <tr> |
1741 | - <td><?php _e('Clear all GD version numbers', 'geodirectory');?></td> |
|
1741 | + <td><?php _e('Clear all GD version numbers', 'geodirectory'); ?></td> |
|
1742 | 1742 | <td> |
1743 | - <small><?php _e('This tool will clear all GD version numbers so any upgrade functions will run again.', 'geodirectory');?></small> |
|
1743 | + <small><?php _e('This tool will clear all GD version numbers so any upgrade functions will run again.', 'geodirectory'); ?></small> |
|
1744 | 1744 | </td> |
1745 | - <td><input type="button" value="<?php _e('Run', 'geodirectory');?>" |
|
1745 | + <td><input type="button" value="<?php _e('Run', 'geodirectory'); ?>" |
|
1746 | 1746 | class="button-primary geodir_diagnosis_button" data-diagnose="version_clear"/> |
1747 | 1747 | </td> |
1748 | 1748 | </tr> |
1749 | 1749 | <tr> |
1750 | - <td><?php _e('Load custom fields translation', 'geodirectory');?></td> |
|
1750 | + <td><?php _e('Load custom fields translation', 'geodirectory'); ?></td> |
|
1751 | 1751 | <td> |
1752 | - <small><?php _e('This tool will load strings from the database into a file to translate via po editor.Ex: custom fields', 'geodirectory');?></small> |
|
1752 | + <small><?php _e('This tool will load strings from the database into a file to translate via po editor.Ex: custom fields', 'geodirectory'); ?></small> |
|
1753 | 1753 | </td> |
1754 | 1754 | <td> |
1755 | - <input type="button" value="<?php _e('Run', 'geodirectory');?>" class="button-primary geodir_diagnosis_button" data-diagnose="load_db_language"/> |
|
1755 | + <input type="button" value="<?php _e('Run', 'geodirectory'); ?>" class="button-primary geodir_diagnosis_button" data-diagnose="load_db_language"/> |
|
1756 | 1756 | </td> |
1757 | 1757 | </tr> |
1758 | 1758 | <tr> |
1759 | - <td><?php _e('Reload Countries table', 'geodirectory');?></td> |
|
1759 | + <td><?php _e('Reload Countries table', 'geodirectory'); ?></td> |
|
1760 | 1760 | <td> |
1761 | - <small><?php _e('This tool will drop and re-add the countries table, it is meant to refresh the list when countries are added/removed, if you have duplicate country problems you should merge those first or you could have orphaned posts.', 'geodirectory');?></small> |
|
1761 | + <small><?php _e('This tool will drop and re-add the countries table, it is meant to refresh the list when countries are added/removed, if you have duplicate country problems you should merge those first or you could have orphaned posts.', 'geodirectory'); ?></small> |
|
1762 | 1762 | </td> |
1763 | 1763 | <td> |
1764 | - <input type="button" value="<?php _e('Run', 'geodirectory');?>" class="button-primary geodir_diagnosis_button" data-diagnose="reload_db_countries"/> |
|
1764 | + <input type="button" value="<?php _e('Run', 'geodirectory'); ?>" class="button-primary geodir_diagnosis_button" data-diagnose="reload_db_countries"/> |
|
1765 | 1765 | </td> |
1766 | 1766 | </tr> |
1767 | 1767 | <?php |
@@ -1771,7 +1771,7 @@ discard block |
||
1771 | 1771 | * Called after the last setting on the GD>Tools page. |
1772 | 1772 | * @since 1.0.0 |
1773 | 1773 | */ |
1774 | - do_action('geodir_diagnostic_tool');?> |
|
1774 | + do_action('geodir_diagnostic_tool'); ?> |
|
1775 | 1775 | |
1776 | 1776 | </tbody> |
1777 | 1777 | </table> |
@@ -13,14 +13,14 @@ |
||
13 | 13 | * @since 1.0.0 |
14 | 14 | */ |
15 | 15 | include_once(geodir_plugin_path() . '/geodirectory-admin/option-pages/create_field.php'); |
16 | - gd_die(); |
|
16 | + gd_die(); |
|
17 | 17 | } |
18 | 18 | |
19 | 19 | |
20 | 20 | if (isset($_REQUEST['ajax_action']) && $_REQUEST['ajax_action'] != '') { |
21 | - switch ($_REQUEST['ajax_action']): |
|
22 | - case 'get_cat_dl': |
|
23 | - geodir_get_categories_dl($_REQUEST['post_type'], $_REQUEST['selected'], false, true); |
|
24 | - break; |
|
25 | - endswitch; |
|
21 | + switch ($_REQUEST['ajax_action']): |
|
22 | + case 'get_cat_dl': |
|
23 | + geodir_get_categories_dl($_REQUEST['post_type'], $_REQUEST['selected'], false, true); |
|
24 | + break; |
|
25 | + endswitch; |
|
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * |
13 | 13 | * @since 1.0.0 |
14 | 14 | */ |
15 | - include_once(geodir_plugin_path() . '/geodirectory-admin/option-pages/create_field.php'); |
|
15 | + include_once(geodir_plugin_path().'/geodirectory-admin/option-pages/create_field.php'); |
|
16 | 16 | gd_die(); |
17 | 17 | } |
18 | 18 |
@@ -1,309 +1,309 @@ |
||
1 | 1 | <?php |
2 | 2 | class AddCustomFields extends WP_UnitTestCase |
3 | 3 | { |
4 | - public function setUp() |
|
5 | - { |
|
6 | - parent::setUp(); |
|
7 | - wp_set_current_user(1); |
|
8 | - } |
|
4 | + public function setUp() |
|
5 | + { |
|
6 | + parent::setUp(); |
|
7 | + wp_set_current_user(1); |
|
8 | + } |
|
9 | 9 | |
10 | - public function testAddCustomFields() |
|
11 | - { |
|
12 | - $field = array( |
|
13 | - 'listing_type' => 'gd_place', |
|
14 | - 'data_type' => '', |
|
15 | - 'field_type' => 'select', |
|
16 | - 'admin_title' => __( 'Place Type', 'test' ), |
|
17 | - 'admin_desc' => __( 'Select the place type.', 'test' ), |
|
18 | - 'site_title' => __( 'Place Type', 'test' ), |
|
19 | - 'htmlvar_name' => 'test_place_type', |
|
20 | - 'default_value' => '', |
|
21 | - 'option_values' => 'Hotel,Bar,Restaurant,Pub', |
|
22 | - 'is_default' => '1', |
|
23 | - 'is_admin' => '1', |
|
24 | - 'clabels' => __( 'Place Type', 'test' ) |
|
25 | - ); |
|
10 | + public function testAddCustomFields() |
|
11 | + { |
|
12 | + $field = array( |
|
13 | + 'listing_type' => 'gd_place', |
|
14 | + 'data_type' => '', |
|
15 | + 'field_type' => 'select', |
|
16 | + 'admin_title' => __( 'Place Type', 'test' ), |
|
17 | + 'admin_desc' => __( 'Select the place type.', 'test' ), |
|
18 | + 'site_title' => __( 'Place Type', 'test' ), |
|
19 | + 'htmlvar_name' => 'test_place_type', |
|
20 | + 'default_value' => '', |
|
21 | + 'option_values' => 'Hotel,Bar,Restaurant,Pub', |
|
22 | + 'is_default' => '1', |
|
23 | + 'is_admin' => '1', |
|
24 | + 'clabels' => __( 'Place Type', 'test' ) |
|
25 | + ); |
|
26 | 26 | |
27 | - $lastid = geodir_custom_field_save( $field ); |
|
27 | + $lastid = geodir_custom_field_save( $field ); |
|
28 | 28 | |
29 | - $this->assertTrue(is_int($lastid)); |
|
29 | + $this->assertTrue(is_int($lastid)); |
|
30 | 30 | |
31 | 31 | |
32 | - $field2 = array( |
|
33 | - 'listing_type' => 'gd_place', |
|
34 | - 'data_type' => 'VARCHAR', |
|
35 | - 'field_type' => 'url', |
|
36 | - 'admin_title' => __( 'Website Link', 'test' ), |
|
37 | - 'admin_desc' => __( 'Enter the website link.', 'test' ), |
|
38 | - 'site_title' => __( 'Website Link', 'test' ), |
|
39 | - 'htmlvar_name' => 'test_ws_link', |
|
40 | - 'default_value' => '', |
|
41 | - 'option_values' => '', |
|
42 | - 'is_default' => '1', |
|
43 | - 'is_admin' => '1', |
|
44 | - 'clabels' => __( 'Website Link', 'test' ) |
|
45 | - ); |
|
32 | + $field2 = array( |
|
33 | + 'listing_type' => 'gd_place', |
|
34 | + 'data_type' => 'VARCHAR', |
|
35 | + 'field_type' => 'url', |
|
36 | + 'admin_title' => __( 'Website Link', 'test' ), |
|
37 | + 'admin_desc' => __( 'Enter the website link.', 'test' ), |
|
38 | + 'site_title' => __( 'Website Link', 'test' ), |
|
39 | + 'htmlvar_name' => 'test_ws_link', |
|
40 | + 'default_value' => '', |
|
41 | + 'option_values' => '', |
|
42 | + 'is_default' => '1', |
|
43 | + 'is_admin' => '1', |
|
44 | + 'clabels' => __( 'Website Link', 'test' ) |
|
45 | + ); |
|
46 | 46 | |
47 | - $lastid2 = geodir_custom_field_save( $field2 ); |
|
47 | + $lastid2 = geodir_custom_field_save( $field2 ); |
|
48 | 48 | |
49 | - $this->assertTrue(is_int($lastid2)); |
|
49 | + $this->assertTrue(is_int($lastid2)); |
|
50 | 50 | |
51 | - //test error |
|
52 | - $field3 = array( |
|
53 | - 'listing_type' => 'gd_place', |
|
54 | - 'data_type' => '', |
|
55 | - 'field_type' => 'select', |
|
56 | - 'admin_title' => __( 'Place Type', 'test' ), |
|
57 | - 'admin_desc' => __( 'Select the place type.', 'test' ), |
|
58 | - 'site_title' => __( 'Place Type', 'test' ), |
|
59 | - 'htmlvar_name' => 'test_place_type', |
|
60 | - 'default_value' => '', |
|
61 | - 'option_values' => 'Hotel,Bar,Restaurant,Pub', |
|
62 | - 'is_default' => '1', |
|
63 | - 'is_admin' => '1', |
|
64 | - 'clabels' => __( 'Place Type', 'test' ) |
|
65 | - ); |
|
51 | + //test error |
|
52 | + $field3 = array( |
|
53 | + 'listing_type' => 'gd_place', |
|
54 | + 'data_type' => '', |
|
55 | + 'field_type' => 'select', |
|
56 | + 'admin_title' => __( 'Place Type', 'test' ), |
|
57 | + 'admin_desc' => __( 'Select the place type.', 'test' ), |
|
58 | + 'site_title' => __( 'Place Type', 'test' ), |
|
59 | + 'htmlvar_name' => 'test_place_type', |
|
60 | + 'default_value' => '', |
|
61 | + 'option_values' => 'Hotel,Bar,Restaurant,Pub', |
|
62 | + 'is_default' => '1', |
|
63 | + 'is_admin' => '1', |
|
64 | + 'clabels' => __( 'Place Type', 'test' ) |
|
65 | + ); |
|
66 | 66 | |
67 | - $error = geodir_custom_field_save( $field3 ); |
|
67 | + $error = geodir_custom_field_save( $field3 ); |
|
68 | 68 | |
69 | - $this->assertContains( 'HTML Variable Name should be a unique name', $error ); |
|
70 | - } |
|
69 | + $this->assertContains( 'HTML Variable Name should be a unique name', $error ); |
|
70 | + } |
|
71 | 71 | |
72 | - public function testAddMoreCustomFields() { |
|
73 | - $fieldsets = array(); |
|
74 | - $fields = array(); |
|
75 | - $filters = array(); |
|
72 | + public function testAddMoreCustomFields() { |
|
73 | + $fieldsets = array(); |
|
74 | + $fields = array(); |
|
75 | + $filters = array(); |
|
76 | 76 | |
77 | - // Place Details |
|
78 | - $fieldsets[] = array( |
|
79 | - 'listing_type' => 'gd_place', |
|
80 | - 'data_type' => '', |
|
81 | - 'field_type' => 'fieldset', |
|
82 | - 'admin_title' => __( 'Place Details', 'directory_starter' ), |
|
83 | - 'admin_desc' => __( 'Place Details.', 'directory_starter' ), |
|
84 | - 'site_title' => __( 'Place Details', 'directory_starter' ), |
|
85 | - 'default_value' => '', |
|
86 | - 'option_values' => '', |
|
87 | - 'is_default' => '1', |
|
88 | - 'is_admin' => '1', |
|
89 | - 'clabels' => __( 'Place Details', 'directory_starter' ) |
|
90 | - ); |
|
77 | + // Place Details |
|
78 | + $fieldsets[] = array( |
|
79 | + 'listing_type' => 'gd_place', |
|
80 | + 'data_type' => '', |
|
81 | + 'field_type' => 'fieldset', |
|
82 | + 'admin_title' => __( 'Place Details', 'directory_starter' ), |
|
83 | + 'admin_desc' => __( 'Place Details.', 'directory_starter' ), |
|
84 | + 'site_title' => __( 'Place Details', 'directory_starter' ), |
|
85 | + 'default_value' => '', |
|
86 | + 'option_values' => '', |
|
87 | + 'is_default' => '1', |
|
88 | + 'is_admin' => '1', |
|
89 | + 'clabels' => __( 'Place Details', 'directory_starter' ) |
|
90 | + ); |
|
91 | 91 | |
92 | - // Salary |
|
93 | - $fields[] = array( |
|
94 | - 'listing_type' => 'gd_place', |
|
95 | - 'data_type' => 'INT', |
|
96 | - 'field_type' => 'text', |
|
97 | - 'admin_title' => __('Salary', 'directory_starter'), |
|
98 | - 'admin_desc' => __('Enter salary.', 'directory_starter'), |
|
99 | - 'site_title' => __('Salary', 'directory_starter'), |
|
100 | - 'htmlvar_name' => 'job_salary', |
|
101 | - 'default_value' => '', |
|
102 | - 'option_values' => '', |
|
103 | - 'is_default' => '1', |
|
104 | - 'is_admin' => '1', |
|
105 | - 'clabels' => __('Salary', 'directory_starter') |
|
106 | - ); |
|
92 | + // Salary |
|
93 | + $fields[] = array( |
|
94 | + 'listing_type' => 'gd_place', |
|
95 | + 'data_type' => 'INT', |
|
96 | + 'field_type' => 'text', |
|
97 | + 'admin_title' => __('Salary', 'directory_starter'), |
|
98 | + 'admin_desc' => __('Enter salary.', 'directory_starter'), |
|
99 | + 'site_title' => __('Salary', 'directory_starter'), |
|
100 | + 'htmlvar_name' => 'job_salary', |
|
101 | + 'default_value' => '', |
|
102 | + 'option_values' => '', |
|
103 | + 'is_default' => '1', |
|
104 | + 'is_admin' => '1', |
|
105 | + 'clabels' => __('Salary', 'directory_starter') |
|
106 | + ); |
|
107 | 107 | |
108 | - // Salary Filter |
|
109 | - $filters[] = array( |
|
110 | - 'create_field' => 'true', |
|
111 | - 'listing_type' => 'gd_place', |
|
112 | - 'field_id' => '', |
|
113 | - 'field_type' => 'text', |
|
114 | - 'data_type' => 'RANGE', |
|
115 | - 'is_active' => '1', |
|
116 | - 'site_field_title' => 'Salary', |
|
117 | - 'field_data_type' => 'INT', |
|
118 | - 'data_type_change' => 'TEXT', |
|
119 | - 'search_condition_select' => 'FROM', |
|
120 | - 'search_min_value' => '', |
|
121 | - 'search_max_value' => '', |
|
122 | - 'search_diff_value' => '', |
|
123 | - 'first_search_value' => '', |
|
124 | - 'first_search_text' => '', |
|
125 | - 'last_search_text' => '', |
|
126 | - 'search_condition' => 'FROM', |
|
127 | - 'site_htmlvar_name' => 'geodir_job_salary', |
|
128 | - 'field_title' => 'geodir_job_salary', |
|
129 | - 'expand_custom_value' => '', |
|
130 | - 'front_search_title' => 'Salary', |
|
131 | - 'field_desc' => '' |
|
132 | - ); |
|
108 | + // Salary Filter |
|
109 | + $filters[] = array( |
|
110 | + 'create_field' => 'true', |
|
111 | + 'listing_type' => 'gd_place', |
|
112 | + 'field_id' => '', |
|
113 | + 'field_type' => 'text', |
|
114 | + 'data_type' => 'RANGE', |
|
115 | + 'is_active' => '1', |
|
116 | + 'site_field_title' => 'Salary', |
|
117 | + 'field_data_type' => 'INT', |
|
118 | + 'data_type_change' => 'TEXT', |
|
119 | + 'search_condition_select' => 'FROM', |
|
120 | + 'search_min_value' => '', |
|
121 | + 'search_max_value' => '', |
|
122 | + 'search_diff_value' => '', |
|
123 | + 'first_search_value' => '', |
|
124 | + 'first_search_text' => '', |
|
125 | + 'last_search_text' => '', |
|
126 | + 'search_condition' => 'FROM', |
|
127 | + 'site_htmlvar_name' => 'geodir_job_salary', |
|
128 | + 'field_title' => 'geodir_job_salary', |
|
129 | + 'expand_custom_value' => '', |
|
130 | + 'front_search_title' => 'Salary', |
|
131 | + 'field_desc' => '' |
|
132 | + ); |
|
133 | 133 | |
134 | - // Field Set |
|
135 | - if (!empty($fieldsets)) { |
|
136 | - foreach ($fieldsets as $fieldset_index => $fieldset) { |
|
137 | - geodir_custom_field_save($fieldset); |
|
138 | - } |
|
139 | - } |
|
134 | + // Field Set |
|
135 | + if (!empty($fieldsets)) { |
|
136 | + foreach ($fieldsets as $fieldset_index => $fieldset) { |
|
137 | + geodir_custom_field_save($fieldset); |
|
138 | + } |
|
139 | + } |
|
140 | 140 | |
141 | - // Custom Fields |
|
142 | - if (!empty($fields)) { |
|
143 | - foreach ($fields as $field_index => $field) { |
|
144 | - $lastid = geodir_custom_field_save( $field ); |
|
145 | - $this->assertTrue(is_int($lastid)); |
|
146 | - } |
|
147 | - } |
|
141 | + // Custom Fields |
|
142 | + if (!empty($fields)) { |
|
143 | + foreach ($fields as $field_index => $field) { |
|
144 | + $lastid = geodir_custom_field_save( $field ); |
|
145 | + $this->assertTrue(is_int($lastid)); |
|
146 | + } |
|
147 | + } |
|
148 | 148 | |
149 | - } |
|
149 | + } |
|
150 | 150 | |
151 | - public function testTextCusField() { |
|
152 | - $_REQUEST = array ( |
|
153 | - 'action' => 'geodir_ajax_action', |
|
154 | - 'create_field' => 'true', |
|
155 | - 'field_ins_upd' => 'submit', |
|
156 | - '_wpnonce' => wp_create_nonce('custom_fields_text_field_99'), |
|
157 | - 'listing_type' => 'gd_place', |
|
158 | - 'field_type' => 'text', |
|
159 | - 'field_id' => 'text_field_99', |
|
160 | - 'data_type' => 'XVARCHAR', |
|
161 | - 'is_active' => '1', |
|
162 | - 'site_title' => "Text Field", |
|
163 | - 'admin_title' => "Text Field", |
|
164 | - 'admin_desc' => "Text Field", |
|
165 | - 'site_field_title' => 'Category', |
|
166 | - 'field_data_type' => 'VARCHAR', |
|
167 | - 'search_condition' => 'SINGLE', |
|
168 | - 'htmlvar_name' => 'text_field_99', |
|
169 | - 'for_admin_use' => '0', |
|
170 | - 'is_required' => '0', |
|
171 | - 'required_msg'=> '', |
|
172 | - 'validation_pattern' => '', |
|
173 | - 'validation_msg' => '', |
|
174 | - 'decimal_point' => '', |
|
175 | - 'clabels' => 'Text Field', |
|
176 | - 'is_default' => '1', |
|
177 | - 'field_title' => 'Text Field', |
|
178 | - 'expand_custom_value' => '', |
|
179 | - 'search_operator' => 'AND', |
|
180 | - 'front_search_title' => 'Category', |
|
181 | - 'field_desc' => 'Cat', |
|
182 | - 'geodir_ajax' => 'admin_ajax', |
|
183 | - 'manage_field_type' => 'custom_fields', |
|
184 | - 'default_value' => '' , |
|
185 | - 'sort_order' => '11' , |
|
186 | - 'show_on_listing' => '1' , |
|
187 | - 'show_on_detail' => '1' , |
|
188 | - 'show_as_tab' => '0' , |
|
189 | - 'field_icon' => '' , |
|
190 | - 'css_class' => '' , |
|
191 | - ); |
|
192 | - add_filter('wp_redirect', '__return_false'); |
|
193 | - ob_start(); |
|
194 | - geodir_ajax_handler(); |
|
195 | - $output = ob_get_contents(); |
|
196 | - ob_end_clean(); |
|
197 | - $this->assertContains('Double Click to toggle', $output); |
|
198 | - remove_filter('wp_redirect', '__return_false'); |
|
151 | + public function testTextCusField() { |
|
152 | + $_REQUEST = array ( |
|
153 | + 'action' => 'geodir_ajax_action', |
|
154 | + 'create_field' => 'true', |
|
155 | + 'field_ins_upd' => 'submit', |
|
156 | + '_wpnonce' => wp_create_nonce('custom_fields_text_field_99'), |
|
157 | + 'listing_type' => 'gd_place', |
|
158 | + 'field_type' => 'text', |
|
159 | + 'field_id' => 'text_field_99', |
|
160 | + 'data_type' => 'XVARCHAR', |
|
161 | + 'is_active' => '1', |
|
162 | + 'site_title' => "Text Field", |
|
163 | + 'admin_title' => "Text Field", |
|
164 | + 'admin_desc' => "Text Field", |
|
165 | + 'site_field_title' => 'Category', |
|
166 | + 'field_data_type' => 'VARCHAR', |
|
167 | + 'search_condition' => 'SINGLE', |
|
168 | + 'htmlvar_name' => 'text_field_99', |
|
169 | + 'for_admin_use' => '0', |
|
170 | + 'is_required' => '0', |
|
171 | + 'required_msg'=> '', |
|
172 | + 'validation_pattern' => '', |
|
173 | + 'validation_msg' => '', |
|
174 | + 'decimal_point' => '', |
|
175 | + 'clabels' => 'Text Field', |
|
176 | + 'is_default' => '1', |
|
177 | + 'field_title' => 'Text Field', |
|
178 | + 'expand_custom_value' => '', |
|
179 | + 'search_operator' => 'AND', |
|
180 | + 'front_search_title' => 'Category', |
|
181 | + 'field_desc' => 'Cat', |
|
182 | + 'geodir_ajax' => 'admin_ajax', |
|
183 | + 'manage_field_type' => 'custom_fields', |
|
184 | + 'default_value' => '' , |
|
185 | + 'sort_order' => '11' , |
|
186 | + 'show_on_listing' => '1' , |
|
187 | + 'show_on_detail' => '1' , |
|
188 | + 'show_as_tab' => '0' , |
|
189 | + 'field_icon' => '' , |
|
190 | + 'css_class' => '' , |
|
191 | + ); |
|
192 | + add_filter('wp_redirect', '__return_false'); |
|
193 | + ob_start(); |
|
194 | + geodir_ajax_handler(); |
|
195 | + $output = ob_get_contents(); |
|
196 | + ob_end_clean(); |
|
197 | + $this->assertContains('Double Click to toggle', $output); |
|
198 | + remove_filter('wp_redirect', '__return_false'); |
|
199 | 199 | |
200 | - } |
|
200 | + } |
|
201 | 201 | |
202 | - public function texstDateCusField() { |
|
203 | - $_REQUEST = array ( |
|
204 | - 'action' => 'geodir_ajax_action', |
|
205 | - 'create_field' => 'true', |
|
206 | - 'field_ins_upd' => 'submit', |
|
207 | - '_wpnonce' => wp_create_nonce('custom_fields_date_field'), |
|
208 | - 'listing_type' => 'gd_place', |
|
209 | - 'field_type' => 'datepicker', |
|
210 | - 'field_id' => 'date_field', |
|
211 | - 'data_type' => '', |
|
212 | - 'is_active' => '1', |
|
213 | - 'site_title' => "Text Field", |
|
214 | - 'admin_title' => "Text Field", |
|
215 | - 'admin_desc' => "Text Field", |
|
216 | - 'site_field_title' => 'Category', |
|
217 | - 'field_data_type' => 'VARCHAR', |
|
218 | - 'search_condition' => 'SINGLE', |
|
219 | - 'htmlvar_name' => 'date_field', |
|
220 | - 'for_admin_use' => '0', |
|
221 | - 'is_required' => '0', |
|
222 | - 'required_msg'=> '', |
|
223 | - 'validation_pattern' => '', |
|
224 | - 'validation_msg' => '', |
|
225 | - 'decimal_point' => '', |
|
226 | - 'clabels' => 'Text Field', |
|
227 | - 'is_default' => '0', |
|
228 | - 'field_title' => 'Text Field', |
|
229 | - 'expand_custom_value' => '', |
|
230 | - 'search_operator' => 'AND', |
|
231 | - 'front_search_title' => 'Category', |
|
232 | - 'field_desc' => 'Cat', |
|
233 | - 'geodir_ajax' => 'admin_ajax', |
|
234 | - 'manage_field_type' => 'custom_fields', |
|
235 | - 'default_value' => '' , |
|
236 | - 'sort_order' => '12' , |
|
237 | - 'show_on_listing' => '1' , |
|
238 | - 'show_on_detail' => '1' , |
|
239 | - 'show_as_tab' => '0' , |
|
240 | - 'field_icon' => '' , |
|
241 | - 'css_class' => '' , |
|
242 | - 'extra' => array( |
|
243 | - 'date_format' => 'mm/dd/yy' |
|
244 | - ) |
|
245 | - ); |
|
246 | - add_filter('wp_redirect', '__return_false'); |
|
247 | - ob_start(); |
|
248 | - geodir_ajax_handler(); |
|
249 | - $output = ob_get_contents(); |
|
250 | - ob_end_clean(); |
|
251 | - $this->assertContains('Double Click to toggle', $output); |
|
252 | - remove_filter('wp_redirect', '__return_false'); |
|
202 | + public function texstDateCusField() { |
|
203 | + $_REQUEST = array ( |
|
204 | + 'action' => 'geodir_ajax_action', |
|
205 | + 'create_field' => 'true', |
|
206 | + 'field_ins_upd' => 'submit', |
|
207 | + '_wpnonce' => wp_create_nonce('custom_fields_date_field'), |
|
208 | + 'listing_type' => 'gd_place', |
|
209 | + 'field_type' => 'datepicker', |
|
210 | + 'field_id' => 'date_field', |
|
211 | + 'data_type' => '', |
|
212 | + 'is_active' => '1', |
|
213 | + 'site_title' => "Text Field", |
|
214 | + 'admin_title' => "Text Field", |
|
215 | + 'admin_desc' => "Text Field", |
|
216 | + 'site_field_title' => 'Category', |
|
217 | + 'field_data_type' => 'VARCHAR', |
|
218 | + 'search_condition' => 'SINGLE', |
|
219 | + 'htmlvar_name' => 'date_field', |
|
220 | + 'for_admin_use' => '0', |
|
221 | + 'is_required' => '0', |
|
222 | + 'required_msg'=> '', |
|
223 | + 'validation_pattern' => '', |
|
224 | + 'validation_msg' => '', |
|
225 | + 'decimal_point' => '', |
|
226 | + 'clabels' => 'Text Field', |
|
227 | + 'is_default' => '0', |
|
228 | + 'field_title' => 'Text Field', |
|
229 | + 'expand_custom_value' => '', |
|
230 | + 'search_operator' => 'AND', |
|
231 | + 'front_search_title' => 'Category', |
|
232 | + 'field_desc' => 'Cat', |
|
233 | + 'geodir_ajax' => 'admin_ajax', |
|
234 | + 'manage_field_type' => 'custom_fields', |
|
235 | + 'default_value' => '' , |
|
236 | + 'sort_order' => '12' , |
|
237 | + 'show_on_listing' => '1' , |
|
238 | + 'show_on_detail' => '1' , |
|
239 | + 'show_as_tab' => '0' , |
|
240 | + 'field_icon' => '' , |
|
241 | + 'css_class' => '' , |
|
242 | + 'extra' => array( |
|
243 | + 'date_format' => 'mm/dd/yy' |
|
244 | + ) |
|
245 | + ); |
|
246 | + add_filter('wp_redirect', '__return_false'); |
|
247 | + ob_start(); |
|
248 | + geodir_ajax_handler(); |
|
249 | + $output = ob_get_contents(); |
|
250 | + ob_end_clean(); |
|
251 | + $this->assertContains('Double Click to toggle', $output); |
|
252 | + remove_filter('wp_redirect', '__return_false'); |
|
253 | 253 | |
254 | - } |
|
254 | + } |
|
255 | 255 | |
256 | - public function texstTextAreaCusField() { |
|
257 | - $_REQUEST = array ( |
|
258 | - 'action' => 'geodir_ajax_action', |
|
259 | - 'create_field' => 'true', |
|
260 | - 'field_ins_upd' => 'submit', |
|
261 | - '_wpnonce' => wp_create_nonce('custom_fields_textarea_field'), |
|
262 | - 'listing_type' => 'gd_place', |
|
263 | - 'field_type' => 'textarea', |
|
264 | - 'field_id' => 'textarea_field', |
|
265 | - 'data_type' => '', |
|
266 | - 'is_active' => '1', |
|
267 | - 'site_title' => "Text Field", |
|
268 | - 'admin_title' => "Text Field", |
|
269 | - 'admin_desc' => "Text Field", |
|
270 | - 'htmlvar_name' => 'textarea_field', |
|
271 | - 'for_admin_use' => '0', |
|
272 | - 'is_required' => '0', |
|
273 | - 'required_msg'=> '', |
|
274 | - 'validation_pattern' => '', |
|
275 | - 'validation_msg' => '', |
|
276 | - 'decimal_point' => '', |
|
277 | - 'clabels' => 'Text Field', |
|
278 | - 'is_default' => '1', |
|
279 | - 'field_title' => 'Text Field', |
|
280 | - 'expand_custom_value' => '', |
|
281 | - 'search_operator' => 'AND', |
|
282 | - 'front_search_title' => 'Category', |
|
283 | - 'field_desc' => 'Cat', |
|
284 | - 'geodir_ajax' => 'admin_ajax', |
|
285 | - 'manage_field_type' => 'custom_fields', |
|
286 | - 'default_value' => '' , |
|
287 | - 'sort_order' => '12' , |
|
288 | - 'show_on_listing' => '1' , |
|
289 | - 'show_on_detail' => '1' , |
|
290 | - 'show_as_tab' => '0' , |
|
291 | - 'field_icon' => '' , |
|
292 | - 'css_class' => '' , |
|
293 | - ); |
|
294 | - add_filter('wp_redirect', '__return_false'); |
|
295 | - ob_start(); |
|
296 | - geodir_ajax_handler(); |
|
297 | - $output = ob_get_contents(); |
|
298 | - ob_end_clean(); |
|
299 | - $this->assertContains('Double Click to toggle', $output); |
|
300 | - remove_filter('wp_redirect', '__return_false'); |
|
256 | + public function texstTextAreaCusField() { |
|
257 | + $_REQUEST = array ( |
|
258 | + 'action' => 'geodir_ajax_action', |
|
259 | + 'create_field' => 'true', |
|
260 | + 'field_ins_upd' => 'submit', |
|
261 | + '_wpnonce' => wp_create_nonce('custom_fields_textarea_field'), |
|
262 | + 'listing_type' => 'gd_place', |
|
263 | + 'field_type' => 'textarea', |
|
264 | + 'field_id' => 'textarea_field', |
|
265 | + 'data_type' => '', |
|
266 | + 'is_active' => '1', |
|
267 | + 'site_title' => "Text Field", |
|
268 | + 'admin_title' => "Text Field", |
|
269 | + 'admin_desc' => "Text Field", |
|
270 | + 'htmlvar_name' => 'textarea_field', |
|
271 | + 'for_admin_use' => '0', |
|
272 | + 'is_required' => '0', |
|
273 | + 'required_msg'=> '', |
|
274 | + 'validation_pattern' => '', |
|
275 | + 'validation_msg' => '', |
|
276 | + 'decimal_point' => '', |
|
277 | + 'clabels' => 'Text Field', |
|
278 | + 'is_default' => '1', |
|
279 | + 'field_title' => 'Text Field', |
|
280 | + 'expand_custom_value' => '', |
|
281 | + 'search_operator' => 'AND', |
|
282 | + 'front_search_title' => 'Category', |
|
283 | + 'field_desc' => 'Cat', |
|
284 | + 'geodir_ajax' => 'admin_ajax', |
|
285 | + 'manage_field_type' => 'custom_fields', |
|
286 | + 'default_value' => '' , |
|
287 | + 'sort_order' => '12' , |
|
288 | + 'show_on_listing' => '1' , |
|
289 | + 'show_on_detail' => '1' , |
|
290 | + 'show_as_tab' => '0' , |
|
291 | + 'field_icon' => '' , |
|
292 | + 'css_class' => '' , |
|
293 | + ); |
|
294 | + add_filter('wp_redirect', '__return_false'); |
|
295 | + ob_start(); |
|
296 | + geodir_ajax_handler(); |
|
297 | + $output = ob_get_contents(); |
|
298 | + ob_end_clean(); |
|
299 | + $this->assertContains('Double Click to toggle', $output); |
|
300 | + remove_filter('wp_redirect', '__return_false'); |
|
301 | 301 | |
302 | - } |
|
302 | + } |
|
303 | 303 | |
304 | - public function tearDown() |
|
305 | - { |
|
306 | - parent::tearDown(); |
|
307 | - } |
|
304 | + public function tearDown() |
|
305 | + { |
|
306 | + parent::tearDown(); |
|
307 | + } |
|
308 | 308 | } |
309 | 309 | ?> |
310 | 310 | \ No newline at end of file |
@@ -13,18 +13,18 @@ discard block |
||
13 | 13 | 'listing_type' => 'gd_place', |
14 | 14 | 'data_type' => '', |
15 | 15 | 'field_type' => 'select', |
16 | - 'admin_title' => __( 'Place Type', 'test' ), |
|
17 | - 'admin_desc' => __( 'Select the place type.', 'test' ), |
|
18 | - 'site_title' => __( 'Place Type', 'test' ), |
|
16 | + 'admin_title' => __('Place Type', 'test'), |
|
17 | + 'admin_desc' => __('Select the place type.', 'test'), |
|
18 | + 'site_title' => __('Place Type', 'test'), |
|
19 | 19 | 'htmlvar_name' => 'test_place_type', |
20 | 20 | 'default_value' => '', |
21 | 21 | 'option_values' => 'Hotel,Bar,Restaurant,Pub', |
22 | 22 | 'is_default' => '1', |
23 | 23 | 'is_admin' => '1', |
24 | - 'clabels' => __( 'Place Type', 'test' ) |
|
24 | + 'clabels' => __('Place Type', 'test') |
|
25 | 25 | ); |
26 | 26 | |
27 | - $lastid = geodir_custom_field_save( $field ); |
|
27 | + $lastid = geodir_custom_field_save($field); |
|
28 | 28 | |
29 | 29 | $this->assertTrue(is_int($lastid)); |
30 | 30 | |
@@ -33,18 +33,18 @@ discard block |
||
33 | 33 | 'listing_type' => 'gd_place', |
34 | 34 | 'data_type' => 'VARCHAR', |
35 | 35 | 'field_type' => 'url', |
36 | - 'admin_title' => __( 'Website Link', 'test' ), |
|
37 | - 'admin_desc' => __( 'Enter the website link.', 'test' ), |
|
38 | - 'site_title' => __( 'Website Link', 'test' ), |
|
36 | + 'admin_title' => __('Website Link', 'test'), |
|
37 | + 'admin_desc' => __('Enter the website link.', 'test'), |
|
38 | + 'site_title' => __('Website Link', 'test'), |
|
39 | 39 | 'htmlvar_name' => 'test_ws_link', |
40 | 40 | 'default_value' => '', |
41 | 41 | 'option_values' => '', |
42 | 42 | 'is_default' => '1', |
43 | 43 | 'is_admin' => '1', |
44 | - 'clabels' => __( 'Website Link', 'test' ) |
|
44 | + 'clabels' => __('Website Link', 'test') |
|
45 | 45 | ); |
46 | 46 | |
47 | - $lastid2 = geodir_custom_field_save( $field2 ); |
|
47 | + $lastid2 = geodir_custom_field_save($field2); |
|
48 | 48 | |
49 | 49 | $this->assertTrue(is_int($lastid2)); |
50 | 50 | |
@@ -53,24 +53,24 @@ discard block |
||
53 | 53 | 'listing_type' => 'gd_place', |
54 | 54 | 'data_type' => '', |
55 | 55 | 'field_type' => 'select', |
56 | - 'admin_title' => __( 'Place Type', 'test' ), |
|
57 | - 'admin_desc' => __( 'Select the place type.', 'test' ), |
|
58 | - 'site_title' => __( 'Place Type', 'test' ), |
|
56 | + 'admin_title' => __('Place Type', 'test'), |
|
57 | + 'admin_desc' => __('Select the place type.', 'test'), |
|
58 | + 'site_title' => __('Place Type', 'test'), |
|
59 | 59 | 'htmlvar_name' => 'test_place_type', |
60 | 60 | 'default_value' => '', |
61 | 61 | 'option_values' => 'Hotel,Bar,Restaurant,Pub', |
62 | 62 | 'is_default' => '1', |
63 | 63 | 'is_admin' => '1', |
64 | - 'clabels' => __( 'Place Type', 'test' ) |
|
64 | + 'clabels' => __('Place Type', 'test') |
|
65 | 65 | ); |
66 | 66 | |
67 | - $error = geodir_custom_field_save( $field3 ); |
|
67 | + $error = geodir_custom_field_save($field3); |
|
68 | 68 | |
69 | - $this->assertContains( 'HTML Variable Name should be a unique name', $error ); |
|
69 | + $this->assertContains('HTML Variable Name should be a unique name', $error); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | public function testAddMoreCustomFields() { |
73 | - $fieldsets = array(); |
|
73 | + $fieldsets = array(); |
|
74 | 74 | $fields = array(); |
75 | 75 | $filters = array(); |
76 | 76 | |
@@ -79,14 +79,14 @@ discard block |
||
79 | 79 | 'listing_type' => 'gd_place', |
80 | 80 | 'data_type' => '', |
81 | 81 | 'field_type' => 'fieldset', |
82 | - 'admin_title' => __( 'Place Details', 'directory_starter' ), |
|
83 | - 'admin_desc' => __( 'Place Details.', 'directory_starter' ), |
|
84 | - 'site_title' => __( 'Place Details', 'directory_starter' ), |
|
82 | + 'admin_title' => __('Place Details', 'directory_starter'), |
|
83 | + 'admin_desc' => __('Place Details.', 'directory_starter'), |
|
84 | + 'site_title' => __('Place Details', 'directory_starter'), |
|
85 | 85 | 'default_value' => '', |
86 | 86 | 'option_values' => '', |
87 | 87 | 'is_default' => '1', |
88 | 88 | 'is_admin' => '1', |
89 | - 'clabels' => __( 'Place Details', 'directory_starter' ) |
|
89 | + 'clabels' => __('Place Details', 'directory_starter') |
|
90 | 90 | ); |
91 | 91 | |
92 | 92 | // Salary |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | // Custom Fields |
142 | 142 | if (!empty($fields)) { |
143 | 143 | foreach ($fields as $field_index => $field) { |
144 | - $lastid = geodir_custom_field_save( $field ); |
|
144 | + $lastid = geodir_custom_field_save($field); |
|
145 | 145 | $this->assertTrue(is_int($lastid)); |
146 | 146 | } |
147 | 147 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | } |
150 | 150 | |
151 | 151 | public function testTextCusField() { |
152 | - $_REQUEST = array ( |
|
152 | + $_REQUEST = array( |
|
153 | 153 | 'action' => 'geodir_ajax_action', |
154 | 154 | 'create_field' => 'true', |
155 | 155 | 'field_ins_upd' => 'submit', |
@@ -181,13 +181,13 @@ discard block |
||
181 | 181 | 'field_desc' => 'Cat', |
182 | 182 | 'geodir_ajax' => 'admin_ajax', |
183 | 183 | 'manage_field_type' => 'custom_fields', |
184 | - 'default_value' => '' , |
|
185 | - 'sort_order' => '11' , |
|
186 | - 'show_on_listing' => '1' , |
|
187 | - 'show_on_detail' => '1' , |
|
188 | - 'show_as_tab' => '0' , |
|
189 | - 'field_icon' => '' , |
|
190 | - 'css_class' => '' , |
|
184 | + 'default_value' => '', |
|
185 | + 'sort_order' => '11', |
|
186 | + 'show_on_listing' => '1', |
|
187 | + 'show_on_detail' => '1', |
|
188 | + 'show_as_tab' => '0', |
|
189 | + 'field_icon' => '', |
|
190 | + 'css_class' => '', |
|
191 | 191 | ); |
192 | 192 | add_filter('wp_redirect', '__return_false'); |
193 | 193 | ob_start(); |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | } |
201 | 201 | |
202 | 202 | public function texstDateCusField() { |
203 | - $_REQUEST = array ( |
|
203 | + $_REQUEST = array( |
|
204 | 204 | 'action' => 'geodir_ajax_action', |
205 | 205 | 'create_field' => 'true', |
206 | 206 | 'field_ins_upd' => 'submit', |
@@ -232,13 +232,13 @@ discard block |
||
232 | 232 | 'field_desc' => 'Cat', |
233 | 233 | 'geodir_ajax' => 'admin_ajax', |
234 | 234 | 'manage_field_type' => 'custom_fields', |
235 | - 'default_value' => '' , |
|
236 | - 'sort_order' => '12' , |
|
237 | - 'show_on_listing' => '1' , |
|
238 | - 'show_on_detail' => '1' , |
|
239 | - 'show_as_tab' => '0' , |
|
240 | - 'field_icon' => '' , |
|
241 | - 'css_class' => '' , |
|
235 | + 'default_value' => '', |
|
236 | + 'sort_order' => '12', |
|
237 | + 'show_on_listing' => '1', |
|
238 | + 'show_on_detail' => '1', |
|
239 | + 'show_as_tab' => '0', |
|
240 | + 'field_icon' => '', |
|
241 | + 'css_class' => '', |
|
242 | 242 | 'extra' => array( |
243 | 243 | 'date_format' => 'mm/dd/yy' |
244 | 244 | ) |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | } |
255 | 255 | |
256 | 256 | public function texstTextAreaCusField() { |
257 | - $_REQUEST = array ( |
|
257 | + $_REQUEST = array( |
|
258 | 258 | 'action' => 'geodir_ajax_action', |
259 | 259 | 'create_field' => 'true', |
260 | 260 | 'field_ins_upd' => 'submit', |
@@ -283,13 +283,13 @@ discard block |
||
283 | 283 | 'field_desc' => 'Cat', |
284 | 284 | 'geodir_ajax' => 'admin_ajax', |
285 | 285 | 'manage_field_type' => 'custom_fields', |
286 | - 'default_value' => '' , |
|
287 | - 'sort_order' => '12' , |
|
288 | - 'show_on_listing' => '1' , |
|
289 | - 'show_on_detail' => '1' , |
|
290 | - 'show_as_tab' => '0' , |
|
291 | - 'field_icon' => '' , |
|
292 | - 'css_class' => '' , |
|
286 | + 'default_value' => '', |
|
287 | + 'sort_order' => '12', |
|
288 | + 'show_on_listing' => '1', |
|
289 | + 'show_on_detail' => '1', |
|
290 | + 'show_as_tab' => '0', |
|
291 | + 'field_icon' => '', |
|
292 | + 'css_class' => '', |
|
293 | 293 | ); |
294 | 294 | add_filter('wp_redirect', '__return_false'); |
295 | 295 | ob_start(); |
@@ -3,32 +3,32 @@ discard block |
||
3 | 3 | $_SERVER['SERVER_NAME'] = ''; |
4 | 4 | $PHP_SELF = $GLOBALS['PHP_SELF'] = $_SERVER['PHP_SELF'] = '/index.php'; |
5 | 5 | |
6 | -define( 'GEODIR_USE_PHP_SESSIONS', false ); |
|
7 | -define( 'GD_TESTING_MODE', true ); |
|
6 | +define('GEODIR_USE_PHP_SESSIONS', false); |
|
7 | +define('GD_TESTING_MODE', true); |
|
8 | 8 | |
9 | -$_tests_dir = getenv( 'WP_TESTS_DIR' ); |
|
9 | +$_tests_dir = getenv('WP_TESTS_DIR'); |
|
10 | 10 | |
11 | -$is_selenium_test = getenv( 'IS_SELENIUM_TEST' ); |
|
11 | +$is_selenium_test = getenv('IS_SELENIUM_TEST'); |
|
12 | 12 | |
13 | -if ( ! $is_selenium_test ) { |
|
13 | +if (!$is_selenium_test) { |
|
14 | 14 | $is_selenium_test = false; |
15 | 15 | } else { |
16 | 16 | $is_selenium_test = true; |
17 | 17 | } |
18 | 18 | |
19 | -if ( ! $_tests_dir ) { |
|
20 | - $_tests_dir = dirname( __FILE__ ) . '/lib/wordpress-tests-lib'; |
|
19 | +if (!$_tests_dir) { |
|
20 | + $_tests_dir = dirname(__FILE__).'/lib/wordpress-tests-lib'; |
|
21 | 21 | } |
22 | 22 | |
23 | -require_once $_tests_dir . '/includes/functions.php'; |
|
24 | -require $_tests_dir . '/includes/bootstrap.php'; |
|
23 | +require_once $_tests_dir.'/includes/functions.php'; |
|
24 | +require $_tests_dir.'/includes/bootstrap.php'; |
|
25 | 25 | |
26 | -if ( $is_selenium_test ) { |
|
27 | - require dirname( __FILE__ ) . '/selenium/base.php'; |
|
26 | +if ($is_selenium_test) { |
|
27 | + require dirname(__FILE__).'/selenium/base.php'; |
|
28 | 28 | } |
29 | 29 | |
30 | -if ( ! $is_selenium_test ) { |
|
31 | - require dirname( __FILE__ ) . '/../geodirectory.php'; |
|
30 | +if (!$is_selenium_test) { |
|
31 | + require dirname(__FILE__).'/../geodirectory.php'; |
|
32 | 32 | tests_add_filter('place_dummy_image_url', 'place_dummy_image_url'); |
33 | 33 | tests_add_filter('place_dummy_cat_image_url', 'place_dummy_cat_image_url'); |
34 | 34 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | function test_create_dummy_posts($max = 10) { |
88 | 88 | $i = 1; |
89 | - while($i <= $max) { |
|
89 | + while ($i <= $max) { |
|
90 | 90 | global $dummy_post_index, $city_bound_lat1, $city_bound_lng1, $city_bound_lat2, $city_bound_lng2; |
91 | 91 | |
92 | 92 | $dummy_post_index = $i; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | $city_bound_lat2 = 40.91525559999999; |
96 | 96 | $city_bound_lng2 = -73.7002721; |
97 | 97 | |
98 | - include dirname( __FILE__ ) . '/../geodirectory-admin/place_dummy_post.php'; |
|
98 | + include dirname(__FILE__).'/../geodirectory-admin/place_dummy_post.php'; |
|
99 | 99 | $i++; |
100 | 100 | } |
101 | 101 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | function place_dummy_image_url($url) { |
114 | - $gd_dummy_base_url = getenv( 'GD_DUMMY_BASE_URL' ); |
|
114 | + $gd_dummy_base_url = getenv('GD_DUMMY_BASE_URL'); |
|
115 | 115 | if ($gd_dummy_base_url) { |
116 | 116 | return $gd_dummy_base_url; |
117 | 117 | } else { |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | function place_dummy_cat_image_url($url) { |
123 | - $gd_dummy_base_url = getenv( 'GD_DUMMY_BASE_URL' ); |
|
123 | + $gd_dummy_base_url = getenv('GD_DUMMY_BASE_URL'); |
|
124 | 124 | if ($gd_dummy_base_url) { |
125 | 125 | return $gd_dummy_base_url."/cat_icon"; |
126 | 126 | } else { |
@@ -1,38 +1,38 @@ |
||
1 | 1 | <?php |
2 | 2 | class DeleteListing extends WP_UnitTestCase |
3 | 3 | { |
4 | - public function setUp() |
|
5 | - { |
|
6 | - parent::setUp(); |
|
7 | - wp_set_current_user(1); |
|
8 | - } |
|
4 | + public function setUp() |
|
5 | + { |
|
6 | + parent::setUp(); |
|
7 | + wp_set_current_user(1); |
|
8 | + } |
|
9 | 9 | |
10 | - public function testDeleteListing() |
|
11 | - { |
|
12 | - $query_args = array( |
|
13 | - 'post_status' => 'publish', |
|
14 | - 'post_type' => 'gd_place', |
|
15 | - 'posts_per_page' => 1, |
|
16 | - 'author' => 1 |
|
17 | - ); |
|
10 | + public function testDeleteListing() |
|
11 | + { |
|
12 | + $query_args = array( |
|
13 | + 'post_status' => 'publish', |
|
14 | + 'post_type' => 'gd_place', |
|
15 | + 'posts_per_page' => 1, |
|
16 | + 'author' => 1 |
|
17 | + ); |
|
18 | 18 | |
19 | - $all_posts = new WP_Query( $query_args ); |
|
20 | - $post_id = null; |
|
21 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
22 | - $post_id = get_the_ID(); |
|
23 | - endwhile; |
|
19 | + $all_posts = new WP_Query( $query_args ); |
|
20 | + $post_id = null; |
|
21 | + while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
22 | + $post_id = get_the_ID(); |
|
23 | + endwhile; |
|
24 | 24 | |
25 | - $this->assertTrue(is_int($post_id)); |
|
25 | + $this->assertTrue(is_int($post_id)); |
|
26 | 26 | |
27 | - $lastid = wp_delete_post($post_id); |
|
27 | + $lastid = wp_delete_post($post_id); |
|
28 | 28 | |
29 | - $this->assertTrue(is_int($lastid->ID)); |
|
29 | + $this->assertTrue(is_int($lastid->ID)); |
|
30 | 30 | |
31 | - } |
|
31 | + } |
|
32 | 32 | |
33 | - public function tearDown() |
|
34 | - { |
|
35 | - parent::tearDown(); |
|
36 | - } |
|
33 | + public function tearDown() |
|
34 | + { |
|
35 | + parent::tearDown(); |
|
36 | + } |
|
37 | 37 | } |
38 | 38 | ?> |
39 | 39 | \ No newline at end of file |
@@ -16,9 +16,9 @@ |
||
16 | 16 | 'author' => 1 |
17 | 17 | ); |
18 | 18 | |
19 | - $all_posts = new WP_Query( $query_args ); |
|
19 | + $all_posts = new WP_Query($query_args); |
|
20 | 20 | $post_id = null; |
21 | - while ( $all_posts->have_posts() ) : $all_posts->the_post(); |
|
21 | + while ($all_posts->have_posts()) : $all_posts->the_post(); |
|
22 | 22 | $post_id = get_the_ID(); |
23 | 23 | endwhile; |
24 | 24 |