Test Failed
Pull Request — master (#421)
by Kiran
17:15
created
geodirectory-admin/option-pages/permalink_settings_array.php 1 patch
Indentation   +178 added lines, -178 removed lines patch added patch discarded remove patch
@@ -16,184 +16,184 @@
 block discarded – undo
16 16
  */
17 17
 $geodir_settings['permalink_settings'] = apply_filters('geodir_permalink_settings', array(
18 18
 
19
-    /* Listing Permalink Settings start */
20
-    array('name' => __('Permalink', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set permalink', 'id' => 'geodir_permalink_settings '),
21
-
22
-
23
-    array('name' => __('Listing Detail Permalink Settings', 'geodirectory'),
24
-        'type' => 'sectionstart',
25
-        'desc' => '',
26
-        'id' => 'geodir_permalink'),
27
-
28
-    array(
29
-        'name' => __('Add location in urls', 'geodirectory'),
30
-        'desc' => __('Add location slug in listing urls', 'geodirectory'),
31
-        'id' => 'geodir_add_location_url',
32
-        'type' => 'checkbox',
33
-        'std' => '1',
34
-        'checkboxgroup' => 'start'
35
-    ),
36
-
37
-    array(
38
-        'name' => __('Add full location in listing urls', 'geodirectory'),
39
-        'desc' => __('Add full location info with country, region and city slug in listing urls', 'geodirectory'),
40
-        'id' => 'geodir_show_location_url',
41
-        'type' => 'radio',
42
-        'value' => 'all',
43
-        'std' => 'all',
44
-        'radiogroup' => ''
45
-    ),
46
-
47
-	array(
48
-        'name' => __('Add country and city slug in listing urls', 'geodirectory'),
49
-        'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'),
50
-        'id' => 'geodir_show_location_url',
51
-        'type' => 'radio',
52
-        'std' => 'all',
53
-        'value' => 'country_city',
54
-        'radiogroup' => ''
55
-    ),
56
-	array(
57
-        'name' => __('Add region and city slug in listing urls', 'geodirectory'),
58
-        'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'),
59
-        'id' => 'geodir_show_location_url',
60
-        'type' => 'radio',
61
-        'std' => 'all',
62
-        'value' => 'region_city',
63
-        'radiogroup' => ''
64
-    ),
65
-    array(
66
-        'name' => __('Add only city in listing urls', 'geodirectory'),
67
-        'desc' => __('Add city slug in listing urls', 'geodirectory'),
68
-        'id' => 'geodir_show_location_url',
69
-        'type' => 'radio',
70
-        'std' => 'all',
71
-        'value' => 'city',
72
-        'radiogroup' => 'end'
73
-    ),
74
-
75
-
76
-
77
-    array(
78
-        'name' => __('Add category in listing urls', 'geodirectory'),
79
-        'desc' => __('Add requested category slugs in listing urls', 'geodirectory'),
80
-        'id' => 'geodir_add_categories_url',
81
-        'type' => 'checkbox',
82
-        'std' => '1',
83
-    ),
84
-
85
-    array(
86
-        'name' => __('Listing url prefix', 'geodirectory'),
87
-        'desc' => __('Listing prefix to show in url', 'geodirectory'),
88
-        'id' => 'geodir_listing_prefix',
89
-        'type' => 'text',
90
-        'css' => 'min-width:300px;',
91
-        'std' => 'places'
92
-    ),
93
-
94
-    array(
95
-        'name' => __('Location url prefix', 'geodirectory'),
96
-        'desc' => __('Depreciated, now uses the location page slug', 'geodirectory'),
97
-        'id' => 'geodir_location_prefix',
98
-        'type' => 'text',
99
-        'css' => 'min-width:300px;',
100
-        'std' => 'location' // Default value to show home top section
101
-    ),
102
-
103
-    array(
104
-        'name' => __('Location and category url separator', 'geodirectory'),
105
-        'desc' => __('Separator to show between location and category url slugs in listing urls', 'geodirectory'),
106
-        'id' => 'geodir_listingurl_separator',
107
-        'type' => 'text',
108
-        'css' => 'min-width:300px;',
109
-        'std' => 'C' // Default value to show home top section
110
-    ),
111
-
112
-    array(
113
-        'name' => __('Listing detail url separator', 'geodirectory'),
114
-        'desc' => __('Separator to show before listing slug in listing detail urls', 'geodirectory'),
115
-        'id' => 'geodir_detailurl_separator',
116
-        'type' => 'text',
117
-        'css' => 'min-width:300px;',
118
-        'std' => 'info' // Default value to show home top section
119
-    ),
120
-
121
-
122
-    array('type' => 'sectionend', 'id' => 'geodir_permalink'),
123
-
124
-    array('name' => __('GeoDirectory Pages', 'geodirectory'),
125
-        'type' => 'sectionstart',
126
-        'desc' => '',
127
-        'id' => 'geodir_pages'),
128
-
129
-    array(
130
-        'name' => __('GD Home page', 'geodirectory'),
131
-        'desc' => __('Select the page to use for the GD homepage (you must also set this page in Settings>Reading>Front page for it to work)', 'geodirectory'),
132
-        'id' => 'geodir_home_page',
133
-        'type' => 'single_select_page',
134
-        'class' => 'chosen_select'
135
-    ),
136
-
137
-    array(
138
-        'name' => __('Add listing page', 'geodirectory'),
139
-        'desc' => __('Select the page to use for adding listings', 'geodirectory'),
140
-        'id' => 'geodir_add_listing_page',
141
-        'type' => 'single_select_page',
142
-        'class' => 'chosen_select'
143
-    ),
144
-
145
-    array(
146
-        'name' => __('Listing preview page', 'geodirectory'),
147
-        'desc' => __('Select the page to use for listing preview', 'geodirectory'),
148
-        'id' => 'geodir_preview_page',
149
-        'type' => 'single_select_page',
150
-        'class' => 'chosen_select'
151
-    ),
152
-
153
-    array(
154
-        'name' => __('Listing success page', 'geodirectory'),
155
-        'desc' => __('Select the page to use for listing success', 'geodirectory'),
156
-        'id' => 'geodir_success_page',
157
-        'type' => 'single_select_page',
158
-        'class' => 'chosen_select'
159
-    ),
160
-
161
-    array(
162
-        'name' => __('Location page', 'geodirectory'),
163
-        'desc' => __('Select the page to use for locations', 'geodirectory'),
164
-        'id' => 'geodir_location_page',
165
-        'type' => 'single_select_page',
166
-        'class' => 'chosen_select'
167
-    ),
168
-
169
-    array(
170
-        'name' => __('Terms and Conditions page', 'geodirectory'),
171
-        'desc' => __('Select the page to use for Terms and Conditions (if enabled)', 'geodirectory'),
172
-        'id' => 'geodir_term_condition_page',
173
-        'type' => 'single_select_page',
174
-        'class' => 'chosen_select'
175
-    ),
176
-
177
-    array(
178
-        'name' => __('Info page', 'geodirectory'),
179
-        'desc' => __('Select the page to use for Gd general Info', 'geodirectory'),
180
-        'id' => 'geodir_info_page',
181
-        'type' => 'single_select_page',
182
-        'class' => 'chosen_select'
183
-    ),
184
-
185
-    array(
186
-        'name' => __('Login page', 'geodirectory'),
187
-        'desc' => __('Select the page to use for Login / Register', 'geodirectory'),
188
-        'id' => 'geodir_login_page',
189
-        'type' => 'single_select_page',
190
-        'class' => 'chosen_select'
191
-    ),
192
-
193
-
194
-    array('type' => 'sectionend', 'id' => 'geodir_pages'),
195
-
196
-    /* Listing Detail Permalink Settings End */
19
+	/* Listing Permalink Settings start */
20
+	array('name' => __('Permalink', 'geodirectory'), 'type' => 'no_tabs', 'desc' => 'Settings to set permalink', 'id' => 'geodir_permalink_settings '),
21
+
22
+
23
+	array('name' => __('Listing Detail Permalink Settings', 'geodirectory'),
24
+		'type' => 'sectionstart',
25
+		'desc' => '',
26
+		'id' => 'geodir_permalink'),
27
+
28
+	array(
29
+		'name' => __('Add location in urls', 'geodirectory'),
30
+		'desc' => __('Add location slug in listing urls', 'geodirectory'),
31
+		'id' => 'geodir_add_location_url',
32
+		'type' => 'checkbox',
33
+		'std' => '1',
34
+		'checkboxgroup' => 'start'
35
+	),
36
+
37
+	array(
38
+		'name' => __('Add full location in listing urls', 'geodirectory'),
39
+		'desc' => __('Add full location info with country, region and city slug in listing urls', 'geodirectory'),
40
+		'id' => 'geodir_show_location_url',
41
+		'type' => 'radio',
42
+		'value' => 'all',
43
+		'std' => 'all',
44
+		'radiogroup' => ''
45
+	),
46
+
47
+	array(
48
+		'name' => __('Add country and city slug in listing urls', 'geodirectory'),
49
+		'desc' => __('Add country and city slug in listing urls (/country/city/)', 'geodirectory'),
50
+		'id' => 'geodir_show_location_url',
51
+		'type' => 'radio',
52
+		'std' => 'all',
53
+		'value' => 'country_city',
54
+		'radiogroup' => ''
55
+	),
56
+	array(
57
+		'name' => __('Add region and city slug in listing urls', 'geodirectory'),
58
+		'desc' => __('Add region and city slug in listing urls (/region/city/)', 'geodirectory'),
59
+		'id' => 'geodir_show_location_url',
60
+		'type' => 'radio',
61
+		'std' => 'all',
62
+		'value' => 'region_city',
63
+		'radiogroup' => ''
64
+	),
65
+	array(
66
+		'name' => __('Add only city in listing urls', 'geodirectory'),
67
+		'desc' => __('Add city slug in listing urls', 'geodirectory'),
68
+		'id' => 'geodir_show_location_url',
69
+		'type' => 'radio',
70
+		'std' => 'all',
71
+		'value' => 'city',
72
+		'radiogroup' => 'end'
73
+	),
74
+
75
+
76
+
77
+	array(
78
+		'name' => __('Add category in listing urls', 'geodirectory'),
79
+		'desc' => __('Add requested category slugs in listing urls', 'geodirectory'),
80
+		'id' => 'geodir_add_categories_url',
81
+		'type' => 'checkbox',
82
+		'std' => '1',
83
+	),
84
+
85
+	array(
86
+		'name' => __('Listing url prefix', 'geodirectory'),
87
+		'desc' => __('Listing prefix to show in url', 'geodirectory'),
88
+		'id' => 'geodir_listing_prefix',
89
+		'type' => 'text',
90
+		'css' => 'min-width:300px;',
91
+		'std' => 'places'
92
+	),
93
+
94
+	array(
95
+		'name' => __('Location url prefix', 'geodirectory'),
96
+		'desc' => __('Depreciated, now uses the location page slug', 'geodirectory'),
97
+		'id' => 'geodir_location_prefix',
98
+		'type' => 'text',
99
+		'css' => 'min-width:300px;',
100
+		'std' => 'location' // Default value to show home top section
101
+	),
102
+
103
+	array(
104
+		'name' => __('Location and category url separator', 'geodirectory'),
105
+		'desc' => __('Separator to show between location and category url slugs in listing urls', 'geodirectory'),
106
+		'id' => 'geodir_listingurl_separator',
107
+		'type' => 'text',
108
+		'css' => 'min-width:300px;',
109
+		'std' => 'C' // Default value to show home top section
110
+	),
111
+
112
+	array(
113
+		'name' => __('Listing detail url separator', 'geodirectory'),
114
+		'desc' => __('Separator to show before listing slug in listing detail urls', 'geodirectory'),
115
+		'id' => 'geodir_detailurl_separator',
116
+		'type' => 'text',
117
+		'css' => 'min-width:300px;',
118
+		'std' => 'info' // Default value to show home top section
119
+	),
120
+
121
+
122
+	array('type' => 'sectionend', 'id' => 'geodir_permalink'),
123
+
124
+	array('name' => __('GeoDirectory Pages', 'geodirectory'),
125
+		'type' => 'sectionstart',
126
+		'desc' => '',
127
+		'id' => 'geodir_pages'),
128
+
129
+	array(
130
+		'name' => __('GD Home page', 'geodirectory'),
131
+		'desc' => __('Select the page to use for the GD homepage (you must also set this page in Settings>Reading>Front page for it to work)', 'geodirectory'),
132
+		'id' => 'geodir_home_page',
133
+		'type' => 'single_select_page',
134
+		'class' => 'chosen_select'
135
+	),
136
+
137
+	array(
138
+		'name' => __('Add listing page', 'geodirectory'),
139
+		'desc' => __('Select the page to use for adding listings', 'geodirectory'),
140
+		'id' => 'geodir_add_listing_page',
141
+		'type' => 'single_select_page',
142
+		'class' => 'chosen_select'
143
+	),
144
+
145
+	array(
146
+		'name' => __('Listing preview page', 'geodirectory'),
147
+		'desc' => __('Select the page to use for listing preview', 'geodirectory'),
148
+		'id' => 'geodir_preview_page',
149
+		'type' => 'single_select_page',
150
+		'class' => 'chosen_select'
151
+	),
152
+
153
+	array(
154
+		'name' => __('Listing success page', 'geodirectory'),
155
+		'desc' => __('Select the page to use for listing success', 'geodirectory'),
156
+		'id' => 'geodir_success_page',
157
+		'type' => 'single_select_page',
158
+		'class' => 'chosen_select'
159
+	),
160
+
161
+	array(
162
+		'name' => __('Location page', 'geodirectory'),
163
+		'desc' => __('Select the page to use for locations', 'geodirectory'),
164
+		'id' => 'geodir_location_page',
165
+		'type' => 'single_select_page',
166
+		'class' => 'chosen_select'
167
+	),
168
+
169
+	array(
170
+		'name' => __('Terms and Conditions page', 'geodirectory'),
171
+		'desc' => __('Select the page to use for Terms and Conditions (if enabled)', 'geodirectory'),
172
+		'id' => 'geodir_term_condition_page',
173
+		'type' => 'single_select_page',
174
+		'class' => 'chosen_select'
175
+	),
176
+
177
+	array(
178
+		'name' => __('Info page', 'geodirectory'),
179
+		'desc' => __('Select the page to use for Gd general Info', 'geodirectory'),
180
+		'id' => 'geodir_info_page',
181
+		'type' => 'single_select_page',
182
+		'class' => 'chosen_select'
183
+	),
184
+
185
+	array(
186
+		'name' => __('Login page', 'geodirectory'),
187
+		'desc' => __('Select the page to use for Login / Register', 'geodirectory'),
188
+		'id' => 'geodir_login_page',
189
+		'type' => 'single_select_page',
190
+		'class' => 'chosen_select'
191
+	),
192
+
193
+
194
+	array('type' => 'sectionend', 'id' => 'geodir_pages'),
195
+
196
+	/* Listing Detail Permalink Settings End */
197 197
 
198 198
 
199 199
 )); // End Design settings
Please login to merge, or discard this patch.
geodirectory-functions/compatibility/Divi.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
  */
19 19
 function geodir_divi_signup_body_class($classes)
20 20
 {
21
-    if (geodir_is_page('login')) {
22
-        $classes = str_replace('et_right_sidebar', 'et_full_width_page', $classes);
23
-        $classes[] = 'divi-gd-signup';
24
-    }
25
-    return $classes;
21
+	if (geodir_is_page('login')) {
22
+		$classes = str_replace('et_right_sidebar', 'et_full_width_page', $classes);
23
+		$classes[] = 'divi-gd-signup';
24
+	}
25
+	return $classes;
26 26
 }
27 27
 
28 28
 add_action('geodir_wrapper_close', 'geodir_divi_action_wrapper_close', 11);
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
  */
35 35
 function geodir_divi_action_wrapper_close()
36 36
 {
37
-    if (geodir_is_page('login')) {
38
-        // We need to close extra divs generated by WRAPPER BEFORE MAIN CONTENT (below) because there is no sidebar on this page
39
-        echo '</div></div>';
40
-    }
37
+	if (geodir_is_page('login')) {
38
+		// We need to close extra divs generated by WRAPPER BEFORE MAIN CONTENT (below) because there is no sidebar on this page
39
+		echo '</div></div>';
40
+	}
41 41
 }
42 42
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-templates/preview-success.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -15,29 +15,29 @@  discard block
 block discarded – undo
15 15
     <?php
16 16
 
17 17
 
18
-    global $wpdb;
18
+	global $wpdb;
19 19
 
20
-    $post_id = $_REQUEST['pid'];
21
-    $post_info = get_post($post_id);
20
+	$post_id = $_REQUEST['pid'];
21
+	$post_info = get_post($post_id);
22 22
 
23
-    $posted_date = $post_info->post_date;
24
-    $productlink = get_permalink($post_id);
25
-    $siteName = get_bloginfo('name');
26
-    $siteurl = home_url();
27
-    $siteurl_link = '<a href="' . $siteurl . '">' . $siteurl . '</a>';
23
+	$posted_date = $post_info->post_date;
24
+	$productlink = get_permalink($post_id);
25
+	$siteName = get_bloginfo('name');
26
+	$siteurl = home_url();
27
+	$siteurl_link = '<a href="' . $siteurl . '">' . $siteurl . '</a>';
28 28
 
29
-    $loginurl = geodir_login_url();
30
-    $loginurl_link = '<a href="' . $loginurl . '">login</a>';
29
+	$loginurl = geodir_login_url();
30
+	$loginurl_link = '<a href="' . $loginurl . '">login</a>';
31 31
 
32
-    $post_author = $post_info->post_author;
32
+	$post_author = $post_info->post_author;
33 33
 
34
-    $user_info = get_userdata($post_author);
35
-    $username = $user_info->user_login;
36
-    $user_email = $user_info->user_email;
34
+	$user_info = get_userdata($post_author);
35
+	$username = $user_info->user_login;
36
+	$user_email = $user_info->user_email;
37 37
 
38
-    $message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')),'geodirectory'));
38
+	$message = wpautop(__(stripslashes_deep(get_option('geodir_post_added_success_msg_content')),'geodirectory'));
39 39
 
40
-    /*
40
+	/*
41 41
      * Filter the success page message before variable replacements.
42 42
      *
43 43
      * @since 1.5.7
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
      * @param object $post_info Post object.
46 46
      * @param object $user_info User object.
47 47
      */
48
-    $message = apply_filters('geodir_success_page_msg_before_var_replace', $message,$post_info, $user_info);
48
+	$message = apply_filters('geodir_success_page_msg_before_var_replace', $message,$post_info, $user_info);
49 49
 
50
-    $search_array = array('[#submited_information_link#]', '[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#user_email#]', '[#username#]', '[#login_url#]', '[#posted_date#]');
51
-    $replace_array = array($productlink, $productlink, $siteurl_link, $post_id, $siteName, $user_email, $username, $loginurl_link, $posted_date);
52
-    $message = str_replace($search_array, $replace_array, $message);
50
+	$search_array = array('[#submited_information_link#]', '[#listing_link#]', '[#site_name_url#]', '[#post_id#]', '[#site_name#]', '[#user_email#]', '[#username#]', '[#login_url#]', '[#posted_date#]');
51
+	$replace_array = array($productlink, $productlink, $siteurl_link, $post_id, $siteName, $user_email, $username, $loginurl_link, $posted_date);
52
+	$message = str_replace($search_array, $replace_array, $message);
53 53
 
54
-    /*
54
+	/*
55 55
      * Filter the success page message after variable replacements.
56 56
      *
57 57
      * @since 1.5.7
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
      * @param object $post_info Post object.
60 60
      * @param object $user_info User object.
61 61
      */
62
-    $message = apply_filters('geodir_success_page_msg_after_var_replace', $message,$post_info, $user_info);
62
+	$message = apply_filters('geodir_success_page_msg_after_var_replace', $message,$post_info, $user_info);
63 63
 
64 64
 
65 65
 
66
-    ?>
66
+	?>
67 67
 
68 68
     <?php
69 69
 
70
-    /*
70
+	/*
71 71
      * Action called before the success page message wrapper.
72 72
      *
73 73
      * @since 1.5.7
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
      * @param object $post_info Post object.
76 76
      * @param object $user_info User object.
77 77
      */
78
-    do_action('geodir_before_success_page_msg_wrapper', $message,$post_info, $user_info);
79
-    echo '<h5 class="geodir_information">';
80
-    echo $message;
81
-    echo '</h5>';
82
-    /*
78
+	do_action('geodir_before_success_page_msg_wrapper', $message,$post_info, $user_info);
79
+	echo '<h5 class="geodir_information">';
80
+	echo $message;
81
+	echo '</h5>';
82
+	/*
83 83
      * Action called after the success page message wrapper.
84 84
      *
85 85
      * @since 1.5.7
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
      * @param object $post_info Post object.
88 88
      * @param object $user_info User object.
89 89
      */
90
-    do_action('geodir_after_success_page_msg_wrapper', $message,$post_info, $user_info);
90
+	do_action('geodir_after_success_page_msg_wrapper', $message,$post_info, $user_info);
91 91
 
92
-    ?>
92
+	?>
93 93
 
94 94
 </div>
95 95
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-widgets/geodirectory_related_listing_widget.php 1 patch
Indentation   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -14,160 +14,160 @@  discard block
 block discarded – undo
14 14
  */
15 15
 class geodir_related_listing_postview extends WP_Widget
16 16
 {
17
-    /**
17
+	/**
18 18
 	 * Register the related listing widget.
19 19
 	 *
20 20
 	 * @since 1.0.0
21
-     * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct.
21
+	 * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct.
22 22
 	 */
23
-    public function __construct() {
24
-        $widget_ops = array('classname' => 'geodir_related_listing_post_view', 'description' => __('GD > Related Listing', 'geodirectory'));
25
-        parent::__construct(
26
-            'post_related_listing', // Base ID
27
-            __('GD > Related Listing', 'geodirectory'), // Name
28
-            $widget_ops// Args
29
-        );
30
-    }
23
+	public function __construct() {
24
+		$widget_ops = array('classname' => 'geodir_related_listing_post_view', 'description' => __('GD > Related Listing', 'geodirectory'));
25
+		parent::__construct(
26
+			'post_related_listing', // Base ID
27
+			__('GD > Related Listing', 'geodirectory'), // Name
28
+			$widget_ops// Args
29
+		);
30
+	}
31 31
 
32 32
 	/**
33 33
 	 * Front-end display content for related listing widget.
34 34
 	 *
35 35
 	 * @since 1.0.0
36
-     * @since 1.5.1 Declare function public.
36
+	 * @since 1.5.1 Declare function public.
37 37
 	 *
38 38
 	 * @param array $args     Widget arguments.
39 39
 	 * @param array $instance Saved values from database.
40 40
 	 */
41
-    public function widget($args, $instance)
42
-    {
41
+	public function widget($args, $instance)
42
+	{
43 43
 
44
-        // prints the widget
45
-        extract($args, EXTR_SKIP);
44
+		// prints the widget
45
+		extract($args, EXTR_SKIP);
46 46
 
47
-        /** This filter is documented in geodirectory_widgets.php */
48
-        $title = empty($instance['title']) ? __('Related Listing', 'geodirectory') : apply_filters('widget_title', __($instance['title'], 'geodirectory'));
47
+		/** This filter is documented in geodirectory_widgets.php */
48
+		$title = empty($instance['title']) ? __('Related Listing', 'geodirectory') : apply_filters('widget_title', __($instance['title'], 'geodirectory'));
49 49
 
50
-        /** This filter is documented in geodirectory-functions/general_functions.php */
50
+		/** This filter is documented in geodirectory-functions/general_functions.php */
51 51
 		$post_number = empty($instance['post_number']) ? '5' : apply_filters('widget_post_number', $instance['post_number']);
52 52
 
53
-        /**
54
-         * Filter the relation type to get related listing.
55
-         *
56
-         * @since 1.0.0
57
-         * @param string $instance['relate_to'] Can be tags or category.
58
-         */
53
+		/**
54
+		 * Filter the relation type to get related listing.
55
+		 *
56
+		 * @since 1.0.0
57
+		 * @param string $instance['relate_to'] Can be tags or category.
58
+		 */
59 59
 		$relate_to = empty($instance['relate_to']) ? 'category' : apply_filters('widget_relate_to', $instance['relate_to']);
60 60
 
61
-        /** This filter is documented in geodirectory-functions/general_functions.php */
61
+		/** This filter is documented in geodirectory-functions/general_functions.php */
62 62
 		$layout = empty($instance['layout']) ? 'gridview_onehalf' : apply_filters('widget_layout', $instance['layout']);
63 63
 
64
-        /** This filter is documented in geodirectory-functions/general_functions.php */
64
+		/** This filter is documented in geodirectory-functions/general_functions.php */
65 65
 		$add_location_filter = empty($instance['add_location_filter']) ? '0' : apply_filters('widget_add_location_filter', $instance['add_location_filter']);
66 66
 
67
-        /** This filter is documented in geodirectory-functions/general_functions.php */
67
+		/** This filter is documented in geodirectory-functions/general_functions.php */
68 68
 		$listing_width = empty($instance['listing_width']) ? '' : apply_filters('widget_listing_width', $instance['listing_width']);
69 69
 
70
-        /** This filter is documented in geodirectory-functions/general_functions.php */
70
+		/** This filter is documented in geodirectory-functions/general_functions.php */
71 71
 		$list_sort = empty($instance['list_sort']) ? 'latest' : apply_filters('widget_list_sort', $instance['list_sort']);
72 72
 
73
-        /** This filter is documented in geodirectory-functions/general_functions.php */
73
+		/** This filter is documented in geodirectory-functions/general_functions.php */
74 74
 		$character_count = empty($instance['character_count']) ? 20 : apply_filters('widget_list_character_count', $instance['character_count']);
75 75
 
76
-        $arr = array(
77
-            'before_title' => $before_title,
78
-            'after_title' => $after_title,
79
-            'title' => $title,
80
-            'post_number' => $post_number,
81
-            'relate_to' => $relate_to,
82
-            'layout' => $layout,
83
-            'add_location_filter' => $add_location_filter,
84
-            'listing_width' => $listing_width,
85
-            'list_sort' => $list_sort,
86
-            'character_count' => $character_count,
87
-            'is_widget' => '1'
88
-        );
89
-
90
-        if ($widget_display = geodir_related_posts_display($arr)) {
91
-
92
-            echo $before_widget;
93
-            echo $widget_display;
94
-            echo $after_widget;
95
-        }
96
-    }
76
+		$arr = array(
77
+			'before_title' => $before_title,
78
+			'after_title' => $after_title,
79
+			'title' => $title,
80
+			'post_number' => $post_number,
81
+			'relate_to' => $relate_to,
82
+			'layout' => $layout,
83
+			'add_location_filter' => $add_location_filter,
84
+			'listing_width' => $listing_width,
85
+			'list_sort' => $list_sort,
86
+			'character_count' => $character_count,
87
+			'is_widget' => '1'
88
+		);
89
+
90
+		if ($widget_display = geodir_related_posts_display($arr)) {
91
+
92
+			echo $before_widget;
93
+			echo $widget_display;
94
+			echo $after_widget;
95
+		}
96
+	}
97 97
 
98 98
 	/**
99 99
 	 * Sanitize related listing widget form values as they are saved.
100 100
 	 *
101 101
 	 * @since 1.0.0
102
-     * @since 1.5.1 Declare function public.
102
+	 * @since 1.5.1 Declare function public.
103 103
 	 *
104 104
 	 * @param array $new_instance Values just sent to be saved.
105 105
 	 * @param array $old_instance Previously saved values from database.
106 106
 	 *
107 107
 	 * @return array Updated safe values to be saved.
108 108
 	 */
109
-    public function update($new_instance, $old_instance)
110
-    {
111
-        //save the widget
112
-        $instance = $old_instance;
113
-
114
-        $instance['title'] = strip_tags($new_instance['title']);
115
-        $instance['post_number'] = strip_tags($new_instance['post_number']);
116
-        $instance['relate_to'] = strip_tags($new_instance['relate_to']);
117
-        $instance['layout'] = strip_tags($new_instance['layout']);
118
-        $instance['listing_width'] = strip_tags($new_instance['listing_width']);
119
-        $instance['list_sort'] = strip_tags($new_instance['list_sort']);
120
-        $instance['character_count'] = $new_instance['character_count'];
121
-        if (isset($new_instance['add_location_filter']) && $new_instance['add_location_filter'] != '')
122
-            $instance['add_location_filter'] = strip_tags($new_instance['add_location_filter']);
123
-        else
124
-            $instance['add_location_filter'] = '0';
125
-
126
-        return $instance;
127
-    }
109
+	public function update($new_instance, $old_instance)
110
+	{
111
+		//save the widget
112
+		$instance = $old_instance;
113
+
114
+		$instance['title'] = strip_tags($new_instance['title']);
115
+		$instance['post_number'] = strip_tags($new_instance['post_number']);
116
+		$instance['relate_to'] = strip_tags($new_instance['relate_to']);
117
+		$instance['layout'] = strip_tags($new_instance['layout']);
118
+		$instance['listing_width'] = strip_tags($new_instance['listing_width']);
119
+		$instance['list_sort'] = strip_tags($new_instance['list_sort']);
120
+		$instance['character_count'] = $new_instance['character_count'];
121
+		if (isset($new_instance['add_location_filter']) && $new_instance['add_location_filter'] != '')
122
+			$instance['add_location_filter'] = strip_tags($new_instance['add_location_filter']);
123
+		else
124
+			$instance['add_location_filter'] = '0';
125
+
126
+		return $instance;
127
+	}
128 128
 
129 129
 	/**
130 130
 	 * Back-end related listing widget settings form.
131 131
 	 *
132 132
 	 * @since 1.0.0
133
-     * @since 1.5.1 Declare function public.
133
+	 * @since 1.5.1 Declare function public.
134 134
 	 *
135 135
 	 * @param array $instance Previously saved values from database.
136 136
 	 */
137
-    public function form($instance)
138
-    {
139
-        //widgetform in backend
140
-        $instance = wp_parse_args((array)$instance,
141
-            array('title' => '',
142
-                'list_sort' => '',
143
-                'list_order' => '',
144
-                'post_number' => '5',
145
-                'relate_to' => '',
146
-                'layout' => 'gridview_onehalf',
147
-                'listing_width' => '',
148
-                'add_location_filter' => '1',
149
-                'character_count' => '20')
150
-        );
137
+	public function form($instance)
138
+	{
139
+		//widgetform in backend
140
+		$instance = wp_parse_args((array)$instance,
141
+			array('title' => '',
142
+				'list_sort' => '',
143
+				'list_order' => '',
144
+				'post_number' => '5',
145
+				'relate_to' => '',
146
+				'layout' => 'gridview_onehalf',
147
+				'listing_width' => '',
148
+				'add_location_filter' => '1',
149
+				'character_count' => '20')
150
+		);
151 151
 
152
-        $title = strip_tags($instance['title']);
152
+		$title = strip_tags($instance['title']);
153 153
 
154
-        $list_sort = strip_tags($instance['list_sort']);
154
+		$list_sort = strip_tags($instance['list_sort']);
155 155
 
156
-        $list_order = strip_tags($instance['list_order']);
156
+		$list_order = strip_tags($instance['list_order']);
157 157
 
158
-        $post_number = strip_tags($instance['post_number']);
158
+		$post_number = strip_tags($instance['post_number']);
159 159
 
160
-        $relate_to = strip_tags($instance['relate_to']);
160
+		$relate_to = strip_tags($instance['relate_to']);
161 161
 
162
-        $layout = strip_tags($instance['layout']);
162
+		$layout = strip_tags($instance['layout']);
163 163
 
164
-        $listing_width = strip_tags($instance['listing_width']);
164
+		$listing_width = strip_tags($instance['listing_width']);
165 165
 
166
-        $add_location_filter = strip_tags($instance['add_location_filter']);
166
+		$add_location_filter = strip_tags($instance['add_location_filter']);
167 167
 
168
-        $character_count = $instance['character_count'];
168
+		$character_count = $instance['character_count'];
169 169
 
170
-        ?>
170
+		?>
171 171
         <p>
172 172
             <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:', 'geodirectory');?>
173 173
 
@@ -184,24 +184,24 @@  discard block
 block discarded – undo
184 184
                         name="<?php echo $this->get_field_name('list_sort'); ?>">
185 185
 
186 186
                     <option <?php if ($list_sort == 'latest') {
187
-                        echo 'selected="selected"';
188
-                    } ?> value="latest"><?php _e('Latest', 'geodirectory'); ?></option>
187
+						echo 'selected="selected"';
188
+					} ?> value="latest"><?php _e('Latest', 'geodirectory'); ?></option>
189 189
 
190 190
                     <option <?php if ($list_sort == 'featured') {
191
-                        echo 'selected="selected"';
192
-                    } ?> value="featured"><?php _e('Featured', 'geodirectory'); ?></option>
191
+						echo 'selected="selected"';
192
+					} ?> value="featured"><?php _e('Featured', 'geodirectory'); ?></option>
193 193
 
194 194
                     <option <?php if ($list_sort == 'high_review') {
195
-                        echo 'selected="selected"';
196
-                    } ?> value="high_review"><?php _e('Review', 'geodirectory'); ?></option>
195
+						echo 'selected="selected"';
196
+					} ?> value="high_review"><?php _e('Review', 'geodirectory'); ?></option>
197 197
 
198 198
                     <option <?php if ($list_sort == 'high_rating') {
199
-                        echo 'selected="selected"';
200
-                    } ?> value="high_rating"><?php _e('Rating', 'geodirectory'); ?></option>
199
+						echo 'selected="selected"';
200
+					} ?> value="high_rating"><?php _e('Rating', 'geodirectory'); ?></option>
201 201
 
202 202
                     <option <?php if ($list_sort == 'random') {
203
-                        echo 'selected="selected"';
204
-                    } ?> value="random"><?php _e('Random', 'geodirectory'); ?></option>
203
+						echo 'selected="selected"';
204
+					} ?> value="random"><?php _e('Random', 'geodirectory'); ?></option>
205 205
 
206 206
                 </select>
207 207
             </label>
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
                 <select class="widefat" id="<?php echo $this->get_field_id('relate_to'); ?>"
222 222
                         name="<?php echo $this->get_field_name('relate_to'); ?>">
223 223
                     <option <?php if ($relate_to == 'category') {
224
-                        echo 'selected="selected"';
225
-                    } ?> value="category"><?php _e('Categories', 'geodirectory'); ?></option>
224
+						echo 'selected="selected"';
225
+					} ?> value="category"><?php _e('Categories', 'geodirectory'); ?></option>
226 226
                     <option <?php if ($relate_to == 'tags') {
227
-                        echo 'selected="selected"';
228
-                    } ?> value="tags"><?php _e('Tags', 'geodirectory'); ?></option>
227
+						echo 'selected="selected"';
228
+					} ?> value="tags"><?php _e('Tags', 'geodirectory'); ?></option>
229 229
                 </select>
230 230
             </label>
231 231
         </p>
@@ -236,24 +236,24 @@  discard block
 block discarded – undo
236 236
                 <select class="widefat" id="<?php echo $this->get_field_id('layout'); ?>"
237 237
                         name="<?php echo $this->get_field_name('layout'); ?>">
238 238
                     <option <?php if ($layout == 'gridview_onehalf') {
239
-                        echo 'selected="selected"';
240
-                    } ?>
239
+						echo 'selected="selected"';
240
+					} ?>
241 241
                         value="gridview_onehalf"><?php _e('Grid View (Two Columns)', 'geodirectory'); ?></option>
242 242
                     <option <?php if ($layout == 'gridview_onethird') {
243
-                        echo 'selected="selected"';
244
-                    } ?>
243
+						echo 'selected="selected"';
244
+					} ?>
245 245
                         value="gridview_onethird"><?php _e('Grid View (Three Columns)', 'geodirectory'); ?></option>
246 246
                     <option <?php if ($layout == 'gridview_onefourth') {
247
-                        echo 'selected="selected"';
248
-                    } ?>
247
+						echo 'selected="selected"';
248
+					} ?>
249 249
                         value="gridview_onefourth"><?php _e('Grid View (Four Columns)', 'geodirectory'); ?></option>
250 250
                     <option <?php if ($layout == 'gridview_onefifth') {
251
-                        echo 'selected="selected"';
252
-                    } ?>
251
+						echo 'selected="selected"';
252
+					} ?>
253 253
                         value="gridview_onefifth"><?php _e('Grid View (Five Columns)', 'geodirectory'); ?></option>
254 254
                     <option <?php if ($layout == 'list') {
255
-                        echo 'selected="selected"';
256
-                    } ?> value="list"><?php _e('List view', 'geodirectory'); ?></option>
255
+						echo 'selected="selected"';
256
+					} ?> value="list"><?php _e('List view', 'geodirectory'); ?></option>
257 257
 
258 258
                 </select>
259 259
             </label>
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
         </p>
286 286
 
287 287
     <?php
288
-    }
288
+	}
289 289
 } // class geodir_related_listing_postview
290 290
 
291 291
 register_widget('geodir_related_listing_postview');
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-widgets/geodirectory_reviews_widget.php 1 patch
Indentation   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -14,37 +14,37 @@  discard block
 block discarded – undo
14 14
  */
15 15
 class geodir_recent_reviews_widget extends WP_Widget
16 16
 {
17
-    /**
17
+	/**
18 18
 	 * Register the recent reviews widget.
19 19
 	 *
20 20
 	 * @since 1.0.0
21
-     * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct.
21
+	 * @since 1.5.1 Changed from PHP4 style constructors to PHP5 __construct.
22 22
 	 */
23
-    public function __construct() {
24
-        $widget_ops = array('classname' => 'geodir_recent_reviews', 'description' => __('GD > Recent Reviews', 'geodirectory'));
25
-        parent::__construct(
26
-            'geodir_recent_reviews', // Base ID
27
-            __('GD > Recent Reviews', 'geodirectory'), // Name
28
-            $widget_ops// Args
29
-        );
30
-    }
23
+	public function __construct() {
24
+		$widget_ops = array('classname' => 'geodir_recent_reviews', 'description' => __('GD > Recent Reviews', 'geodirectory'));
25
+		parent::__construct(
26
+			'geodir_recent_reviews', // Base ID
27
+			__('GD > Recent Reviews', 'geodirectory'), // Name
28
+			$widget_ops// Args
29
+		);
30
+	}
31 31
 
32 32
 	/**
33 33
 	 * Front-end display content for recent reviews widget.
34 34
 	 *
35 35
 	 * @since 1.0.0
36
-     * @since 1.5.1 Declare function public.
36
+	 * @since 1.5.1 Declare function public.
37 37
 	 *
38 38
 	 * @param array $args     Widget arguments.
39 39
 	 * @param array $instance Saved values from database.
40 40
 	 */
41 41
 	public function widget($args, $instance)
42
-    {
43
-        // prints the widget
44
-        extract($args, EXTR_SKIP);
42
+	{
43
+		// prints the widget
44
+		extract($args, EXTR_SKIP);
45 45
 
46
-        /** This filter is documented in geodirectory_widgets.php */
47
-        $title = empty($instance['title']) ? '' : apply_filters('widget_title', __($instance['title'], 'geodirectory'));
46
+		/** This filter is documented in geodirectory_widgets.php */
47
+		$title = empty($instance['title']) ? '' : apply_filters('widget_title', __($instance['title'], 'geodirectory'));
48 48
 		
49 49
 		/**
50 50
 		 * Filter the number of reviews to display.
@@ -63,35 +63,35 @@  discard block
 block discarded – undo
63 63
 		 * @param int $g_size Height and width of the avatar image in pixels. Default 30.
64 64
 		 */
65 65
 		$g_size = apply_filters('geodir_recent_reviews_g_size', 30);
66
-        /**
67
-         * Filter the excerpt length
68
-         *
69
-         * @since 1.0.0
70
-         *
71
-         * @param int $excerpt_length Excerpt length. Default 100.
72
-         */
73
-        $excerpt_length = apply_filters('geodir_recent_reviews_excerpt_length', 100);
74
-        $comments_li = geodir_get_recent_reviews($g_size, $count, $excerpt_length, false);
66
+		/**
67
+		 * Filter the excerpt length
68
+		 *
69
+		 * @since 1.0.0
70
+		 *
71
+		 * @param int $excerpt_length Excerpt length. Default 100.
72
+		 */
73
+		$excerpt_length = apply_filters('geodir_recent_reviews_excerpt_length', 100);
74
+		$comments_li = geodir_get_recent_reviews($g_size, $count, $excerpt_length, false);
75 75
 
76
-        if ($comments_li) {
77
-            echo $before_widget;
78
-            ?>
76
+		if ($comments_li) {
77
+			echo $before_widget;
78
+			?>
79 79
             <div class="widget geodir_recent_reviews_section">
80 80
                 <?php if ($title) {
81
-                    echo $before_title . $title . $after_title;
82
-                } ?>
81
+					echo $before_title . $title . $after_title;
82
+				} ?>
83 83
                 <ul class="geodir_recent_reviews"><?php echo $comments_li; ?></ul>
84 84
             </div>
85 85
             <?php
86
-            echo $after_widget;
87
-        }
88
-    }
86
+			echo $after_widget;
87
+		}
88
+	}
89 89
 
90 90
 	/**
91 91
 	 * Sanitize recent reviews widget form values as they are saved.
92 92
 	 *
93 93
 	 * @since 1.0.0
94
-     * @since 1.5.1 Declare function public.
94
+	 * @since 1.5.1 Declare function public.
95 95
 	 *
96 96
 	 * @param array $new_instance Values just sent to be saved.
97 97
 	 * @param array $old_instance Previously saved values from database.
@@ -99,29 +99,29 @@  discard block
 block discarded – undo
99 99
 	 * @return array Updated safe values to be saved.
100 100
 	 */
101 101
 	public function update($new_instance, $old_instance)
102
-    {
103
-        //save the widget
104
-        $instance = $old_instance;
105
-        $instance['title'] = strip_tags($new_instance['title']);
106
-        $instance['count'] = strip_tags($new_instance['count']);
107
-        return $instance;
108
-    }
102
+	{
103
+		//save the widget
104
+		$instance = $old_instance;
105
+		$instance['title'] = strip_tags($new_instance['title']);
106
+		$instance['count'] = strip_tags($new_instance['count']);
107
+		return $instance;
108
+	}
109 109
     
110 110
 	/**
111 111
 	 * Back-end recent reviews widget settings form.
112 112
 	 *
113 113
 	 * @since 1.0.0
114
-     * @since 1.5.1 Declare function public.
114
+	 * @since 1.5.1 Declare function public.
115 115
 	 *
116 116
 	 * @param array $instance Previously saved values from database.
117 117
 	 */
118 118
 	public function form($instance)
119
-    {
120
-        //widgetform in backend
121
-        $instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'count' => ''));
122
-        $title = strip_tags($instance['title']);
123
-        $count = strip_tags($instance['count']);
124
-        ?>
119
+	{
120
+		//widgetform in backend
121
+		$instance = wp_parse_args((array)$instance, array('title' => '', 't1' => '', 't2' => '', 't3' => '', 'img1' => '', 'count' => ''));
122
+		$title = strip_tags($instance['title']);
123
+		$count = strip_tags($instance['count']);
124
+		?>
125 125
         <p><label for="<?php echo $this->get_field_id('title'); ?>">Widget Title: <input class="widefat"
126 126
                                                                                          id="<?php echo $this->get_field_id('title'); ?>"
127 127
                                                                                          name="<?php echo $this->get_field_name('title'); ?>"
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
                                                                                              value="<?php echo esc_attr($count); ?>"/></label>
136 136
         </p>
137 137
     <?php
138
-    }
138
+	}
139 139
 } // class geodir_recent_reviews_widget
140 140
 
141 141
 register_widget('geodir_recent_reviews_widget');
142 142
\ No newline at end of file
Please login to merge, or discard this patch.
geodirectory-admin/admin_install.php 1 patch
Indentation   +160 added lines, -160 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 function geodir_activation()
25 25
 {
26 26
 
27
-    geodir_install();
28
-    add_action('wp_loaded', 'geodir_flush_activation');
27
+	geodir_install();
28
+	add_action('wp_loaded', 'geodir_flush_activation');
29 29
 }
30 30
 
31 31
 /**
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
  */
37 37
 function geodir_flush_activation()
38 38
 {
39
-    // Remove rewrite rules and then recreate rewrite rules.
40
-    // flush late so everything is loaded
41
-    flush_rewrite_rules();
39
+	// Remove rewrite rules and then recreate rewrite rules.
40
+	// flush late so everything is loaded
41
+	flush_rewrite_rules();
42 42
 }
43 43
 
44 44
 /**
@@ -50,44 +50,44 @@  discard block
 block discarded – undo
50 50
  */
51 51
 function geodir_install()
52 52
 {
53
-    global $geodir_settings;
54
-
55
-    /**
56
-     * Called before the GD installation scripts have run.
57
-     *
58
-     * @since 1.0.0
59
-     * @see 'geodir_installation_end'
60
-     */
61
-    do_action('geodir_installation_start');
62
-
63
-    // Do install
64
-    if (!get_option('geodir_default_data_installed')) {
65
-        geodir_create_tables(); // in admin db install.php
66
-        geodir_register_defaults(); // geodir_functions/ taxonomy_functions.php
67
-        geodir_create_default_fields();
68
-        //geodir_default_taxonomies();
69
-        geodir_set_default_options();
70
-        geodir_create_pages();
71
-        geodir_set_default_widgets();
72
-        gd_install_theme_compat();
73
-
74
-        update_option('geodir_default_data_installed', 1);
75
-
76
-    }
77
-
78
-    if (!get_option('geodir_default_data_installed_1.2.8')) {
79
-        //geodir_create_tables(); // in admin db install.php
80
-        update_option('geodir_default_data_installed_1.2.8', 1);
81
-    }
82
-
83
-    geodir_installation_end();
84
-    /**
85
-     * Called after the GD installation scripts have run.
86
-     *
87
-     * @since 1.0.0
88
-     * @see 'geodir_installation_start'
89
-     */
90
-    do_action('geodir_installation_end');
53
+	global $geodir_settings;
54
+
55
+	/**
56
+	 * Called before the GD installation scripts have run.
57
+	 *
58
+	 * @since 1.0.0
59
+	 * @see 'geodir_installation_end'
60
+	 */
61
+	do_action('geodir_installation_start');
62
+
63
+	// Do install
64
+	if (!get_option('geodir_default_data_installed')) {
65
+		geodir_create_tables(); // in admin db install.php
66
+		geodir_register_defaults(); // geodir_functions/ taxonomy_functions.php
67
+		geodir_create_default_fields();
68
+		//geodir_default_taxonomies();
69
+		geodir_set_default_options();
70
+		geodir_create_pages();
71
+		geodir_set_default_widgets();
72
+		gd_install_theme_compat();
73
+
74
+		update_option('geodir_default_data_installed', 1);
75
+
76
+	}
77
+
78
+	if (!get_option('geodir_default_data_installed_1.2.8')) {
79
+		//geodir_create_tables(); // in admin db install.php
80
+		update_option('geodir_default_data_installed_1.2.8', 1);
81
+	}
82
+
83
+	geodir_installation_end();
84
+	/**
85
+	 * Called after the GD installation scripts have run.
86
+	 *
87
+	 * @since 1.0.0
88
+	 * @see 'geodir_installation_start'
89
+	 */
90
+	do_action('geodir_installation_end');
91 91
 
92 92
 
93 93
 }
@@ -104,16 +104,16 @@  discard block
 block discarded – undo
104 104
 function geodir_create_pages()
105 105
 {
106 106
 
107
-    //geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' );
108
-    geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), '');
109
-    geodir_create_page(esc_sql(_x('add-listing', 'page_slug', 'geodirectory')), 'geodir_add_listing_page', __('Add Listing', 'geodirectory'), '');
110
-    geodir_create_page(esc_sql(_x('listing-preview', 'page_slug', 'geodirectory')), 'geodir_preview_page', __('Listing Preview', 'geodirectory'), '');
111
-    geodir_create_page(esc_sql(_x('listing-success', 'page_slug', 'geodirectory')), 'geodir_success_page', __('Listing Success', 'geodirectory'), '');
112
-    geodir_create_page(esc_sql(_x('location', 'page_slug', 'geodirectory')), 'geodir_location_page', __('Location', 'geodirectory'), '');
107
+	//geodir_create_page( esc_sql( _x('home-map', 'page_slug', 'geodirectory') ), 'geodir_home_map_page', __('Home Map', 'geodirectory'), '',0,'publish' );
108
+	geodir_create_page(esc_sql(_x('gd-home', 'page_slug', 'geodirectory')), 'geodir_home_page', __('GD Home page', 'geodirectory'), '');
109
+	geodir_create_page(esc_sql(_x('add-listing', 'page_slug', 'geodirectory')), 'geodir_add_listing_page', __('Add Listing', 'geodirectory'), '');
110
+	geodir_create_page(esc_sql(_x('listing-preview', 'page_slug', 'geodirectory')), 'geodir_preview_page', __('Listing Preview', 'geodirectory'), '');
111
+	geodir_create_page(esc_sql(_x('listing-success', 'page_slug', 'geodirectory')), 'geodir_success_page', __('Listing Success', 'geodirectory'), '');
112
+	geodir_create_page(esc_sql(_x('location', 'page_slug', 'geodirectory')), 'geodir_location_page', __('Location', 'geodirectory'), '');
113 113
 
114
-    //New since 1.5.3
115
-    geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), '');
116
-    geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), '');
114
+	//New since 1.5.3
115
+	geodir_create_page(esc_sql(_x('gd-info', 'page_slug', 'geodirectory')), 'geodir_info_page', __('Info', 'geodirectory'), '');
116
+	geodir_create_page(esc_sql(_x('gd-login', 'page_slug', 'geodirectory')), 'geodir_login_page', __('Login', 'geodirectory'), '');
117 117
 
118 118
 
119 119
 }
@@ -129,11 +129,11 @@  discard block
 block discarded – undo
129 129
  */
130 130
 function geodir_installation_end()
131 131
 {
132
-    //update_option( "geodir_db_version", GEODIRECTORY_VERSION );
132
+	//update_option( "geodir_db_version", GEODIRECTORY_VERSION );
133 133
 
134
-    update_option("geodir_installed", 1);
135
-    update_option("geodir_installation_redirect", 1);
136
-    update_option('skip_install_geodir_pages', 0);
134
+	update_option("geodir_installed", 1);
135
+	update_option("geodir_installation_redirect", 1);
136
+	update_option('skip_install_geodir_pages', 0);
137 137
 }
138 138
 
139 139
 /**
@@ -147,45 +147,45 @@  discard block
 block discarded – undo
147 147
  */
148 148
 function geodir_set_default_options()
149 149
 {
150
-    global $geodir_settings;
151
-    /**
152
-     * Contains settings array for general tab.
153
-     *
154
-     * @since 1.0.0
155
-     * @package GeoDirectory
156
-     */
157
-    include_once("option-pages/general_settings_array.php");
158
-    /**
159
-     * Contains settings array for design tab.
160
-     *
161
-     * @since 1.0.0
162
-     * @package GeoDirectory
163
-     */
164
-    include_once("option-pages/design_settings_array.php");
165
-    /**
166
-     * Contains settings array for notifications tab.
167
-     *
168
-     * @since 1.0.0
169
-     * @package GeoDirectory
170
-     */
171
-    include_once("option-pages/notifications_settings_array.php");
172
-    /**
173
-     * Contains settings array for permalink tab.
174
-     *
175
-     * @since 1.0.0
176
-     * @package GeoDirectory
177
-     */
178
-    include_once("option-pages/permalink_settings_array.php");
179
-    /**
180
-     * Contains settings array for title / meta tab.
181
-     *
182
-     * @since 1.5.4
183
-     * @package GeoDirectory
184
-     */
185
-    include_once("option-pages/title_meta_settings_array.php");
186
-    foreach ($geodir_settings as $value) {
187
-        geodir_update_options($value, true);
188
-    }
150
+	global $geodir_settings;
151
+	/**
152
+	 * Contains settings array for general tab.
153
+	 *
154
+	 * @since 1.0.0
155
+	 * @package GeoDirectory
156
+	 */
157
+	include_once("option-pages/general_settings_array.php");
158
+	/**
159
+	 * Contains settings array for design tab.
160
+	 *
161
+	 * @since 1.0.0
162
+	 * @package GeoDirectory
163
+	 */
164
+	include_once("option-pages/design_settings_array.php");
165
+	/**
166
+	 * Contains settings array for notifications tab.
167
+	 *
168
+	 * @since 1.0.0
169
+	 * @package GeoDirectory
170
+	 */
171
+	include_once("option-pages/notifications_settings_array.php");
172
+	/**
173
+	 * Contains settings array for permalink tab.
174
+	 *
175
+	 * @since 1.0.0
176
+	 * @package GeoDirectory
177
+	 */
178
+	include_once("option-pages/permalink_settings_array.php");
179
+	/**
180
+	 * Contains settings array for title / meta tab.
181
+	 *
182
+	 * @since 1.5.4
183
+	 * @package GeoDirectory
184
+	 */
185
+	include_once("option-pages/title_meta_settings_array.php");
186
+	foreach ($geodir_settings as $value) {
187
+		geodir_update_options($value, true);
188
+	}
189 189
 
190 190
 }
191 191
 
@@ -199,103 +199,103 @@  discard block
 block discarded – undo
199 199
 function geodir_set_default_widgets()
200 200
 {
201 201
 
202
-    $widget_option_list = array();
203
-    $widgetinfo = array();
204
-    $sidebarvalue_array = array();
205
-    $sidebars_widgets = array();
202
+	$widget_option_list = array();
203
+	$widgetinfo = array();
204
+	$sidebarvalue_array = array();
205
+	$sidebars_widgets = array();
206 206
 
207
-    /*===========================*/
208
-    /*  Widgets ON HOME PAGE     */
209
-    /*===========================*/
207
+	/*===========================*/
208
+	/*  Widgets ON HOME PAGE     */
209
+	/*===========================*/
210 210
 
211
-    $widget_option_list['geodir_home_top'] =
212
-        array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
213
-            'geodir_map_v3_home_map' => array("autozoom" => 1, "width" => '100%', "heigh" => '425'),
214
-            'geodir_advance_search' => array());
211
+	$widget_option_list['geodir_home_top'] =
212
+		array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
213
+			'geodir_map_v3_home_map' => array("autozoom" => 1, "width" => '100%', "heigh" => '425'),
214
+			'geodir_advance_search' => array());
215 215
 
216
-    $widget_option_list['geodir_home_content'] =
217
-        array('popular_post_view' => array("title" => __('Popular Places', 'geodirectory'), "layout" => 'list', "add_location_filter" => '1'));
216
+	$widget_option_list['geodir_home_content'] =
217
+		array('popular_post_view' => array("title" => __('Popular Places', 'geodirectory'), "layout" => 'list', "add_location_filter" => '1'));
218 218
 
219
-    $widget_option_list['geodir_home_right'] =
220
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
221
-            'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
219
+	$widget_option_list['geodir_home_right'] =
220
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
221
+			'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
222 222
 
223
-    /*===========================*/
224
-    /*  Widgets ON LISTING PAGE     */
225
-    /*===========================*/
223
+	/*===========================*/
224
+	/*  Widgets ON LISTING PAGE     */
225
+	/*===========================*/
226 226
 
227
-    $widget_option_list['geodir_listing_top'] =
228
-        array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
229
-            'geodir_advance_search' => array());
227
+	$widget_option_list['geodir_listing_top'] =
228
+		array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
229
+			'geodir_advance_search' => array());
230 230
 
231
-    $widget_option_list['geodir_listing_right_sidebar'] =
232
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
233
-            'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
234
-            'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
231
+	$widget_option_list['geodir_listing_right_sidebar'] =
232
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
233
+			'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
234
+			'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
235 235
 
236 236
 
237
-    /*===========================*/
238
-    /*  Widgets ON SEARCH PAGE     */
239
-    /*===========================*/
237
+	/*===========================*/
238
+	/*  Widgets ON SEARCH PAGE     */
239
+	/*===========================*/
240 240
 
241
-    $widget_option_list['geodir_search_top'] =
242
-        array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
243
-            'geodir_advance_search' => array());
241
+	$widget_option_list['geodir_search_top'] =
242
+		array('popular_post_category' => array("title" => __('Popular Categories', 'geodirectory')),
243
+			'geodir_advance_search' => array());
244 244
 
245
-    $widget_option_list['geodir_search_right_sidebar'] =
246
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
247
-            'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
248
-            'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
245
+	$widget_option_list['geodir_search_right_sidebar'] =
246
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
247
+			'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
248
+			'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
249 249
 
250
-    /*===========================*/
251
-    /*  Widgets ON DETAIL/SINGLE PAGE     */
252
-    /*===========================*/
250
+	/*===========================*/
251
+	/*  Widgets ON DETAIL/SINGLE PAGE     */
252
+	/*===========================*/
253 253
 
254
-    $widget_option_list['geodir_detail_sidebar'] =
255
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
256
-            'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
257
-            'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
254
+	$widget_option_list['geodir_detail_sidebar'] =
255
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')),
256
+			'geodir_map_v3_listing_map' => array("autozoom" => 1, "sticky" => 1),
257
+			'popular_post_view' => array("title" => __('Latest Places', 'geodirectory'), "add_location_filter" => '1'));
258 258
 
259 259
 
260
-    /*===========================*/
261
-    /*  Widgets ON AUTHOR PAGE     */
262
-    /*===========================*/
260
+	/*===========================*/
261
+	/*  Widgets ON AUTHOR PAGE     */
262
+	/*===========================*/
263 263
 
264 264
 
265
-    $widget_option_list['geodir_author_right_sidebar'] =
266
-        array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')));
265
+	$widget_option_list['geodir_author_right_sidebar'] =
266
+		array('geodir_loginbox' => array("title" => __('My Dashboard', 'geodirectory')));
267 267
 
268 268
 
269
-    $sidebars_widgets = get_option('sidebars_widgets');
269
+	$sidebars_widgets = get_option('sidebars_widgets');
270 270
 
271
-    foreach ($widget_option_list as $key => $widget_options) {
271
+	foreach ($widget_option_list as $key => $widget_options) {
272 272
 
273
-        foreach ($widget_options as $key2 => $widget_options_obj) {
274
-            $widgetid = 'widget_' . $key2;
273
+		foreach ($widget_options as $key2 => $widget_options_obj) {
274
+			$widgetid = 'widget_' . $key2;
275 275
 
276
-            $widgetinfo[$widgetid][] = $widget_options_obj;
276
+			$widgetinfo[$widgetid][] = $widget_options_obj;
277 277
 
278
-            $sidebarvalue_array[$key][] = $key2 . "-" . (count($widgetinfo[$widgetid]));
278
+			$sidebarvalue_array[$key][] = $key2 . "-" . (count($widgetinfo[$widgetid]));
279 279
 
280
-            $widget_update[$widgetid][count($widgetinfo[$widgetid])] = $widget_options_obj;
280
+			$widget_update[$widgetid][count($widgetinfo[$widgetid])] = $widget_options_obj;
281 281
 
282
-        }
282
+		}
283 283
 
284
-        if (!empty($sidebarvalue_array[$key])) {
284
+		if (!empty($sidebarvalue_array[$key])) {
285 285
 
286
-            $sidebars_widgets = get_option('sidebars_widgets');
287
-            $sidebars_widgets[$key] = $sidebarvalue_array[$key];
288
-            update_option('sidebars_widgets', $sidebars_widgets);
286
+			$sidebars_widgets = get_option('sidebars_widgets');
287
+			$sidebars_widgets[$key] = $sidebarvalue_array[$key];
288
+			update_option('sidebars_widgets', $sidebars_widgets);
289 289
 
290
-            foreach ($widget_update as $key => $value) {
290
+			foreach ($widget_update as $key => $value) {
291 291
 
292
-                update_option($key, $value);
292
+				update_option($key, $value);
293 293
 
294
-            }
294
+			}
295 295
 
296
-        }
296
+		}
297 297
 
298
-    }
298
+	}
299 299
 
300 300
 
301 301
 }
Please login to merge, or discard this patch.
geodirectory-functions/compatibility/Jupiter.php 1 patch
Indentation   +141 added lines, -141 removed lines patch added patch discarded remove patch
@@ -16,28 +16,28 @@  discard block
 block discarded – undo
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
 block discarded – undo
52 52
 function gd_mk_theme_breadcrumbs()
53 53
 {
54 54
 
55
-    if (is_page_geodir_home() || geodir_is_page('location')) {
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')) {
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
 block discarded – undo
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')) {
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')) {
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
 block discarded – undo
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('&nbsp;>&nbsp;', " > ", $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 = ' &#47; ';
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('&nbsp;>&nbsp;', " > ", $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 = ' &#47; ';
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
geodirectory-functions/compatibility/Enfold.php 1 patch
Indentation   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -17,84 +17,84 @@  discard block
 block discarded – undo
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
 block discarded – undo
108 108
 function gd_enfold_compat_add_top_section_back()
109 109
 {
110 110
 
111
-    if (is_page_geodir_home() || geodir_is_page('location')) {
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')) {
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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('&nbsp;>&nbsp;', " > ", $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('&nbsp;>&nbsp;', " > ", $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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
geodirectory-functions/reviews.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * return early without loading the comments.
18 18
  */
19 19
 if (post_password_required())
20
-    return;
20
+	return;
21 21
 ?>
22 22
 
23 23
 <div id="comments" class="comments-area">
@@ -25,35 +25,35 @@  discard block
 block discarded – undo
25 25
     <?php // You can start editing here -- including this comment! ?>
26 26
 
27 27
     <?php
28
-    /**
29
-     * Called before displaying reviews.
30
-     *
31
-     * If you would like to wrap reviews inside a div this is the place to print your open div. @see geodir_before_review_form to print your closing div.
32
-     *
33
-     * @since 1.5.7
34
-     */
35
-    do_action('geodir_before_review_list'); ?>
28
+	/**
29
+	 * Called before displaying reviews.
30
+	 *
31
+	 * If you would like to wrap reviews inside a div this is the place to print your open div. @see geodir_before_review_form to print your closing div.
32
+	 *
33
+	 * @since 1.5.7
34
+	 */
35
+	do_action('geodir_before_review_list'); ?>
36 36
 
37 37
     <?php if (have_comments()) : ?>
38 38
         <h2 class="comments-title">
39 39
             <?php
40
-            printf(_n('1 Review <span class="r-title-on">on</span> <span class="r-title">&ldquo;%2$s&rdquo;</span>', '%1$s Reviews <span>on</span> <span class="r-title"> &ldquo;%2$s&rdquo;</span>', get_comments_number(), 'geodirectory'),
41
-                number_format_i18n(get_comments_number()), get_the_title());
42
-            ?>
40
+			printf(_n('1 Review <span class="r-title-on">on</span> <span class="r-title">&ldquo;%2$s&rdquo;</span>', '%1$s Reviews <span>on</span> <span class="r-title"> &ldquo;%2$s&rdquo;</span>', get_comments_number(), 'geodirectory'),
41
+				number_format_i18n(get_comments_number()), get_the_title());
42
+			?>
43 43
         </h2>
44 44
 
45 45
         <?php
46
-        /**
47
-         * Called after displaying review listing title.
48
-         *
49
-         * @since 1.5.7
50
-         */
51
-        do_action('geodir_after_review_list_title'); ?>
46
+		/**
47
+		 * Called after displaying review listing title.
48
+		 *
49
+		 * @since 1.5.7
50
+		 */
51
+		do_action('geodir_after_review_list_title'); ?>
52 52
 
53 53
         <ol class="commentlist">
54 54
             <?php $reverse_top_level = is_plugin_active('geodir_review_rating_manager/geodir_review_rating_manager.php') ? false : null; ?>
55 55
 			<?php wp_list_comments(array('callback' => 'geodir_comment', 'reverse_top_level' => $reverse_top_level, 'style' => 'ol'));
56
-            ?>
56
+			?>
57 57
         </ol><!-- .commentlist -->
58 58
 
59 59
         <?php if (get_comment_pages_count() > 1 && get_option('page_comments')) : // are there comments to navigate through ?>
@@ -68,51 +68,51 @@  discard block
 block discarded – undo
68 68
         <?php endif; // check for comment navigation ?>
69 69
 
70 70
         <?php
71
-        /* If there are no comments and comments are closed, let's leave a note.
71
+		/* If there are no comments and comments are closed, let's leave a note.
72 72
          * But we only want the note on posts and pages that had comments in the first place.
73 73
          */
74
-        if (!comments_open() && get_comments_number()) : ?>
74
+		if (!comments_open() && get_comments_number()) : ?>
75 75
             <p class="nocomments"><?php _e('Reviews are closed.', 'geodirectory'); ?></p>
76 76
         <?php endif; ?>
77 77
 
78 78
     <?php endif; // have_comments() ?>
79 79
 
80 80
     <?php
81
-    /**
82
-     * Called before displaying "Leave a review form".
83
-     *
84
-     * If you would like to wrap "review form" inside a div this is the best place to hook your open div. @see geodir_after_review_form to print your closing div.
85
-     * Also If you would like to wrap "reviews" inside a div this is the best place to print your closing div. @see geodir_before_review_list to print your open div.
86
-     *
87
-     * @since 1.5.7
88
-     */
89
-    do_action('geodir_before_review_form'); ?>
81
+	/**
82
+	 * Called before displaying "Leave a review form".
83
+	 *
84
+	 * If you would like to wrap "review form" inside a div this is the best place to hook your open div. @see geodir_after_review_form to print your closing div.
85
+	 * Also If you would like to wrap "reviews" inside a div this is the best place to print your closing div. @see geodir_before_review_list to print your open div.
86
+	 *
87
+	 * @since 1.5.7
88
+	 */
89
+	do_action('geodir_before_review_form'); ?>
90 90
 
91 91
     <?php
92
-    /**
93
-     * Filters comment form args
94
-     *
95
-     * If you would like to modify your comment form args, use this filter. @see https://codex.wordpress.org/Function_Reference/comment_form for accepted args.
96
-     *
97
-     * @since 1.0.0
98
-     */
99
-    $args = apply_filters('geodir_review_form_args', array(
100
-        'title_reply' => __('Leave a Review', 'geodirectory'),
101
-        'label_submit' => __('Post Review', 'geodirectory'),
102
-        'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __('Review text', 'geodirectory') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
103
-        'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'geodirectory'), geodir_login_url()) . '</p>'
104
-    ));
105
-    comment_form($args);
106
-    ?>
92
+	/**
93
+	 * Filters comment form args
94
+	 *
95
+	 * If you would like to modify your comment form args, use this filter. @see https://codex.wordpress.org/Function_Reference/comment_form for accepted args.
96
+	 *
97
+	 * @since 1.0.0
98
+	 */
99
+	$args = apply_filters('geodir_review_form_args', array(
100
+		'title_reply' => __('Leave a Review', 'geodirectory'),
101
+		'label_submit' => __('Post Review', 'geodirectory'),
102
+		'comment_field' => '<p class="comment-form-comment"><label for="comment">' . __('Review text', 'geodirectory') . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p>',
103
+		'must_log_in' => '<p class="must-log-in">' . sprintf(__('You must be <a href="%s">logged in</a> to post a comment.', 'geodirectory'), geodir_login_url()) . '</p>'
104
+	));
105
+	comment_form($args);
106
+	?>
107 107
 
108 108
     <?php
109
-    /**
110
-     * Called after displaying "Leave a review form".
111
-     *
112
-     * If you would like to wrap "review form" inside a div this is the best place to print your closing div. @see geodir_before_review_form to print your open div.
113
-     *
114
-     * @since 1.5.7
115
-     */
116
-    do_action('geodir_after_review_form'); ?>
109
+	/**
110
+	 * Called after displaying "Leave a review form".
111
+	 *
112
+	 * If you would like to wrap "review form" inside a div this is the best place to print your closing div. @see geodir_before_review_form to print your open div.
113
+	 *
114
+	 * @since 1.5.7
115
+	 */
116
+	do_action('geodir_after_review_form'); ?>
117 117
 
118 118
 </div><!-- #comments .comments-area -->
119 119
\ No newline at end of file
Please login to merge, or discard this patch.