1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
|
<?php /** * Add ABout Theme Page */ function fitness_park_about_page() { add_theme_page( esc_html__( 'About Fitness Park', 'fitness-park' ), esc_html__( 'About Fitness Park', 'fitness-park' ), 'edit_theme_options', 'about-fitnesspark', 'fitness_park_about_page_output' ); } add_action( 'admin_menu', 'fitness_park_about_page' );
/** * Render About Themes HTML */ function fitness_park_about_page_output() { $theme_data = wp_get_theme(); ?> <div class="wrap"> <h1> <?php /* translators: %s theme name */ printf( esc_html__( 'Welcome to %s', 'fitness-park' ), esc_html( $theme_data->Name ) ); ?> </h1> <p class="welcome-text"> <?php /* translators: %s theme name */ printf( esc_html__( '%s is a user-friendly and feature-rich, intuitive and creative, powerful and impressive engaging and dynamic, tech-savvy and good looking, rapidly responsive personal trainer free WordPress theme. Its a solid toolkit for the development of awesome and modern free WordPress themes for gym centers, fitness studios, yoga studios, and CrossFit. Fitness Park multipurpose theme can also be used for other related fitness center or needs of health clubs, gymnasiums, spas and wellness centers, indoor and outdoor exercises and any other sport and health-related website. Fitness Park is one of the most accessible free WordPress themes which can easily accommodate all type of users with no coding skills to advanced or normal web developers. Fitness Park includes excellent features for gymnasiums professionals and practices of all kinds, themes have included following features one-click demo data import, customizer based theme options, page builder-friendly design, individual page & post layout options. This Free Fitness Park WordPress theme is fully responsive, cross-browser compatible, translation ready, SEO friendly themes.', 'fitness-park' ), esc_html( $theme_data->Name ) ); ?> <br><br><a href="<?php echo esc_url('http://demo.sparklewpthemes.com/fitnessparkpro/'); ?>" class="button button-primary button-hero" target="_blank"><?php esc_html_e( 'Theme Demo Preview', 'fitness-park' ); ?></a> </p><br> <?php /** * Active Tab */ if ( isset($_GET[ 'tab' ]) ) { $active_tab = sanitize_key($_GET[ 'tab' ]); } else { $active_tab = 'fitness_park_tab_1'; } ?> <div class="nav-tab-wrapper"> <a href="?page=about-fitnesspark&tab=fitness_park_tab_1" class="nav-tab <?php echo $active_tab == 'fitness_park_tab_1' ? 'nav-tab-active' : ''; ?>"> <?php esc_html_e( 'Getting Started', 'fitness-park' ); ?> </a> <a href="?page=about-fitnesspark&tab=fitness_park_tab_2" class="nav-tab <?php echo $active_tab == 'fitness_park_tab_2' ? 'nav-tab-active' : ''; ?>"> <span class="dashicons dashicons-video-alt3"></span><?php esc_html_e( 'Video Tutorials', 'fitness-park' ); ?> </a> <a href="?page=about-fitnesspark&tab=fitness_park_tab_3" class="nav-tab <?php echo $active_tab == 'fitness_park_tab_3' ? 'nav-tab-active' : ''; ?>"> <?php esc_html_e( 'Useful Plugins', 'fitness-park' ); ?> </a> <a href="?page=about-fitnesspark&tab=fitness_park_tab_4" class="nav-tab <?php echo $active_tab == 'fitness_park_tab_4' ? 'nav-tab-active' : ''; ?>"> <?php esc_html_e( 'Support', 'fitness-park' ); ?> </a> <a href="?page=about-fitnesspark&tab=fitness_park_tab_5" class="nav-tab <?php echo $active_tab == 'fitness_park_tab_5' ? 'nav-tab-active' : ''; ?>"> <?php esc_html_e( 'Free vs Pro', 'fitness-park' ); ?> </a> </div>
<?php if ( $active_tab == 'fitness_park_tab_1' ) : ?> <div class="three-columns-wrap"> <br> <div class="column-width-3"> <h3><?php esc_html_e( 'Documentation', 'fitness-park' ); ?></h3> <p> <?php /* translators: %s theme name */ printf( esc_html__( 'Need more details? Please check our full documentation for detailed information on how to use %s.', 'fitness-park' ), esc_html( $theme_data->Name ) ); ?> </p> <a target="_blank" href="http://docs.sparklewpthemes.com/fitnesspark/" class="button button-primary"><?php esc_html_e( 'Read Full Documentation', 'fitness-park' ); ?></a> </div>
<div class="column-width-3"> <h3><?php esc_html_e( 'Demo Content', 'fitness-park' ); ?></h3> <p> <?php esc_html_e( 'Install the Demo Content in 2 clicks. Just click the button below to install demo import plugin and wait a bit to be redirected to the demo import page.', 'fitness-park' ); ?> </p> <?php if ( is_plugin_active( 'one-click-demo-import/one-click-demo-import.php' ) ) : ?> <a href="<?php echo esc_url( admin_url( '/themes.php?page=pt-one-click-demo-import' ) ); ?>" class="button button-primary demo-import"><?php esc_html_e( 'Go to Import page', 'fitness-park' ); ?></a> <?php elseif ( fitness_park_check_installed_plugin( 'one-click-demo-import', 'one-click-demo-import' ) ) : ?> <button class="button button-primary demo-import" id="fitnesspark-demo-content-act"><?php esc_html_e( 'Activate Demo Import Plugin', 'fitness-park' ); ?></button> <?php else: ?> <button class="button button-primary demo-import" id="fitnesspark-demo-content-inst"><?php esc_html_e( 'Install Demo Import Plugin', 'fitness-park' ); ?></button> <?php endif; ?> <!-- <a href="#" target="_blank" class="button button-primary import-video"><span class="dashicons dashicons-video-alt3"></span><?php esc_html_e( 'Video Tutorial', 'fitness-park' ); ?></a> --> </div>
<div class="column-width-3"> <h3><?php esc_html_e( 'Theme Customizer', 'fitness-park' ); ?></h3> <p> <?php /* translators: %s theme name */ printf( esc_html__( '%s supports the Theme Customizer for all theme settings. Click "Customize" to personalize your site.', 'fitness-park' ), esc_html( $theme_data->Name ) ); ?> </p> <a target="_blank" href="<?php echo esc_url( wp_customize_url() );?>" class="button button-primary"><?php esc_html_e( 'Start Customizing', 'fitness-park' ); ?></a> </div>
</div>
<?php elseif ( $active_tab == 'fitness_park_tab_2' ) : ?>
<div class="four-columns-wrap video-tutorials">
<div class="column-width-4"> <h3><?php esc_html_e( 'Demo Content', 'fitness-park' ); ?></h3> <a class="button button-primary" target="_blank" href="h#"><?php esc_html_e( 'Watch Video', 'fitness-park' ); ?></a> <a class="button button-secondary" href="<?php echo esc_url(admin_url('themes.php?page=about-fitnesspark&tab=fitness_park_tab_1')); ?>"></span><?php esc_html_e( 'Get Started', 'fitness-park' ); ?></a> </div>
</div>
<?php elseif ( $active_tab == 'fitness_park_tab_3' ) : ?> <div class="three-columns-wrap"> <br><br> <?php // WooCommerce fitness_park_recommended_plugin( 'woocommerce', 'woocommerce' );
// Contact Form 7 fitness_park_recommended_plugin( 'contact-form-7', 'wp-contact-form-7' );
// Ajax Thumbnail Rebuild fitness_park_recommended_plugin( 'ajax-thumbnail-rebuild', 'ajax-thumbnail-rebuild' );
// Facebook Widget fitness_park_recommended_plugin( 'facebook-pagelike-widget', 'facebook_widget' ); ?> </div>
<?php elseif ( $active_tab == 'fitness_park_tab_4' ) : ?>
<div class="three-columns-wrap"> <br> <div class="column-width-3"> <h3> <span class="dashicons dashicons-sos"></span> <?php esc_html_e( 'Forums', 'fitness-park' ); ?> </h3> <p> <?php esc_html_e( 'Before asking a questions it highly recommended to search on forums, but if you can\'t find the solution feel free to create a new topic.', 'fitness-park' ); ?> <hr> <a target="_blank" href="<?php echo esc_url('https://sparklewpthemes.com/support/forum/wordpress-themes/free-themes/fitness-park/'); ?>"><?php esc_html_e( 'Go to Support Forums', 'fitness-park' ); ?></a> </p> </div>
<div class="column-width-3"> <h3> <span class="dashicons dashicons-admin-tools"></span> <?php esc_html_e( 'Changelog', 'fitness-park' ); ?> </h3> <p> <?php esc_html_e( 'Want to get the gist on the latest theme changes? Just consult our changelog below to get a taste of the recent fixes and features implemented.', 'fitness-park' ); ?> <hr> <a target="_blank" href="<?php echo esc_url('https://sparklewpthemes.com/update-logs/fitness-park-pro-update-logs/'); ?>"><?php esc_html_e( 'Changelog', 'fitness-park' ); ?></a> </p> </div>
</div>
<?php elseif ( $active_tab == 'fitness_park_tab_5' ) : ?>
<table class="free-vs-pro form-table"> <thead> <tr> <th> <a href="<?php echo esc_url('https://sparklewpthemes.com/wordpress-themes/fitnessparkpro/'); ?>" target="_blank" class="button button-primary button-hero"> <?php esc_html_e( 'Get Fitness Park Pro', 'fitness-park' ); ?> </a> </th> <th class="compare-icon"><?php esc_html_e( 'Fitness Park', 'fitness-park' ); ?></th> <th class="compare-icon"><?php esc_html_e( 'Fitness Park Pro', 'fitness-park' ); ?></th> </tr> </thead> <tbody> <tr> <td> <h3><?php esc_html_e( 'One Click Demo Import', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-no"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Unlimited Color Scheme', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-no"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Different Header Layouts', 'fitness-park' ); ?></h3> </td> <td class="compare-icon">1</td> <td class="compare-icon">3</td> </tr> <tr> <td> <h3><?php esc_html_e( 'Reorder All Sections', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-no"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Advanced Slider Options', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-no"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'WooCommerce Support', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Pre loader settings', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-no"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Custom Widget', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-no"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Footer Copyright Editor', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-no"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Breadcrumbs Settings', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-no"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Powerful Option Panel', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Built on Customizer', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Sticky Navigation', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Sticky Sidebar', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-no"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Translation Ready', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'SEO Optimized', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr> <tr> <td> <h3><?php esc_html_e( 'Premium Support 24/7', 'fitness-park' ); ?></h3> </td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> <td class="compare-icon"><span class="dashicons-before dashicons-yes"></span></td> </tr>
<tr> <td colspan="3"> <a href="<?php echo esc_url('https://sparklewpthemes.com/wordpress-themes/fitnessparkpro/'); ?>" target="_blank" class="button button-primary button-hero"> <strong><?php esc_html_e( 'View Full Feature List', 'fitness-park' ); ?></strong> </a> </td> </tr> </tbody> </table>
<?php endif; ?>
</div><!-- /.wrap --> <?php } // end fitness_park_about_page_output
// Check if plugin is installed function fitness_park_check_installed_plugin( $slug, $filename ) { return file_exists( ABSPATH . 'wp-content/plugins/' . $slug . '/' . $filename . '.php' ) ? true : false; }
// Generate Recommended Plugin HTML function fitness_park_recommended_plugin( $slug, $filename ) {
$plugin_info = fitness_park_call_plugin_api( $slug ); $plugin_desc = $plugin_info->short_description; $plugin_img = ( ! isset($plugin_info->icons['1x']) ) ? $plugin_info->icons['default'] : $plugin_info->icons['1x']; ?>
<div class="plugin-card"> <div class="name column-name"> <h3> <?php echo esc_html( $plugin_info->name ); ?> <img src="<?php echo esc_url( $plugin_img ); ?>" class="plugin-icon" alt=""> </h3> </div> <div class="action-links"> <?php if ( fitness_park_check_installed_plugin( $slug, $filename ) ) : ?> <button type="button" class="button button-disabled" disabled="disabled"><?php esc_html_e( 'Installed', 'fitness-park' ); ?></button> <?php else : ?> <a class="install-now button-primary" href="<?php echo esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin='. $slug ), 'install-plugin_'. $slug ) ); ?>" > <?php esc_html_e( 'Install Now', 'fitness-park' ); ?> </a> <?php endif; ?> </div> <div class="desc column-description"> <p><?php echo esc_html( $plugin_desc ) . esc_html__( '...', 'fitness-park' ); ?></p> </div> </div>
<?php }
// Get Plugin Info function fitness_park_call_plugin_api( $slug ) {
$call_api = get_transient( 'fitness_park_about_plugin_info_' . $slug );
if ( false === $call_api ) {
if ( ! function_exists( 'plugins_api' ) && file_exists( trailingslashit( ABSPATH ) . 'wp-admin/includes/plugin-install.php' ) ) { require_once( trailingslashit( ABSPATH ) . 'wp-admin/includes/plugin-install.php' ); }
if ( function_exists( 'plugins_api' ) ) {
$call_api = plugins_api( 'plugin_information', array( 'slug' => $slug, 'fields' => array( 'downloaded' => false, 'rating' => false, 'description' => false, 'short_description' => true, 'donate_link' => false, 'tags' => false, 'sections' => true, 'homepage' => true, 'added' => false, 'last_updated' => false, 'compatibility' => false, 'tested' => false, 'requires' => false, 'downloadlink' => false, 'icons' => true, ), ) );
if ( ! is_wp_error( $call_api ) ) { set_transient( 'fitness_park_about_plugin_info_' . $slug, $call_api, 30 * MINUTE_IN_SECONDS ); }
} }
return $call_api; }
// enqueue ui CSS/JS function fitness_park_enqueue_about_page_scripts($hook) {
if ( 'appearance_page_about-fitnesspark' != $hook ) { return; }
wp_enqueue_style( 'fitnesspark-about-css', get_theme_file_uri( '/inc/about/css/about-page.css' ), array() ); wp_enqueue_script( 'plugin-install' ); wp_enqueue_script( 'updates' ); wp_enqueue_script( 'fitnesspark-about-page-css', get_theme_file_uri( '/inc/about/js/about-fitnesspark-page.js' ), array() );
} add_action( 'admin_enqueue_scripts', 'fitness_park_enqueue_about_page_scripts' );
// Install/Activate Demo Import Plugin function fitness_park_plugin_auto_activation() {
// Get the list of currently active plugins (Most likely an empty array) $active_plugins = (array) get_option( 'active_plugins', array() );
array_push( $active_plugins, 'one-click-demo-import/one-click-demo-import.php' );
// Set the new plugin list in WordPress update_option( 'active_plugins', $active_plugins );
} add_action( 'wp_ajax_fitness_park_plugin_auto_activation', 'fitness_park_plugin_auto_activation' );
// Import Plugin Data function fitness_park_import_demo_files() { return array( array( 'import_file_name' => esc_html__( 'Import Demo Data', 'fitness-park' ), 'local_import_file' => trailingslashit( get_template_directory() ) . 'inc/about/import/fitnesspark-demo.xml', 'local_import_widget_file' => trailingslashit( get_template_directory() ) . 'inc/about/import/fitnesspark-widgets.wie', 'local_import_customizer_file' => trailingslashit( get_template_directory() ) . 'inc/about/import/fitnesspark-customizer.dat' ) ); } add_filter( 'pt-ocdi/import_files', 'fitness_park_import_demo_files' );
// Install Menus after Import function fitness_park_after_import_setup() { $main_menu = get_term_by( 'name', 'Main Menu', 'nav_menu' ); $top_menu = get_term_by( 'name', 'Footer Menu', 'nav_menu' );
set_theme_mod( 'nav_menu_locations', array( 'menu-1' => $main_menu->term_id, 'footer-menu' => $top_menu->term_id, ) ); } add_action( 'pt-ocdi/after_import', 'fitness_park_after_import_setup' );
// Disable PT Branding after Import Notice add_filter( 'pt-ocdi/disable_pt_branding', '__return_true' );
|