File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -169,40 +169,41 @@ function handle_shortcode($shortcode_data, $content = null) {
169
169
//Header ?
170
170
$ do_header = 0 ;
171
171
172
- //Start with Setting
172
+ // Start with Setting
173
173
$ setting = Waymark_Config::get_setting ('misc ' , 'shortcode_options ' , 'shortcode_header ' );
174
174
if (is_numeric ($ setting )) {
175
175
$ do_header = $ setting ;
176
176
}
177
177
178
- // Waymark_Helper::debug($do_header);
178
+ // Shortcode option set?
179
+ if (array_key_exists ('shortcode_header ' , $ shortcode_data )) {
180
+ $ param = $ shortcode_data ['shortcode_header ' ];
181
+
182
+ if (is_numeric ($ param )) {
183
+ $ do_header = $ param ;
184
+ }
185
+ }
179
186
180
187
//Map Details Page
181
188
if (get_post_type () == 'waymark_map ' ) {
182
189
//Map Details Page
183
190
if (is_single ()) {
184
191
$ do_header = 0 ;
185
- //Archive
186
- } else {
187
- $ do_header = 0 ;
188
192
}
193
+ //Archive
194
+ // } else {
195
+ // $do_header = 0;
196
+ // }
189
197
//I.e. Embedding using the Shortcode
190
198
} else {
191
199
//Always for Admin
192
200
if (current_user_can ('administrator ' ) && Waymark_Config::get_setting ('misc ' , 'shortcode_options ' , 'header_override ' )) {
193
201
$ do_header = 1 ;
194
- } else {
195
- //Shortcode
196
- if (array_key_exists ('shortcode_header ' , $ shortcode_data )) {
197
- $ param = $ shortcode_data ['shortcode_header ' ];
198
-
199
- if (is_numeric ($ param )) {
200
- $ do_header = $ param ;
201
- }
202
- }
203
202
}
204
203
}
205
204
205
+ // Waymark_Helper::debug($do_header);
206
+
206
207
//Header (non Map pages only)
207
208
if ($ do_header && sizeof ($ shortcode_header )) {
208
209
$ out .= ' <!-- Shortcode Header --> ' . "\n" ;
You can’t perform that action at this time.
0 commit comments