PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 7.7
Jetpack – WP Security, Backup, Speed, & Growth v7.7
16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 All 501 releases
jetpack / modules / minileven.php
minileven.php
58 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Module Name: Mobile Theme
5 * Module Description: Enable the Jetpack Mobile theme
6 * Sort Order: 21
7 * Recommendation Order: 11
8 * First Introduced: 1.8
9 * Requires Connection: No
10 * Auto Activate: No
11 * Module Tags: Appearance, Mobile, Recommended
12 * Feature: Appearance
13 * Additional Search Queries: mobile, theme, minileven
14 */
15
16 function jetpack_load_minileven() {
17 include dirname( __FILE__ ) . "/minileven/minileven.php";
18
19 if ( Jetpack_Options::get_option_and_ensure_autoload( 'wp_mobile_app_promos', '0' ) != '1' )
20 remove_action( 'wp_mobile_theme_footer', 'jetpack_mobile_app_promo' );
21 }
22
23 add_action( 'jetpack_modules_loaded', 'minileven_loaded' );
24
25 function minileven_loaded() {
26 Jetpack::enable_module_configurable( __FILE__ );
27 }
28
29 function minileven_theme_root( $theme_root ) {
30 if ( jetpack_check_mobile() ) {
31 return dirname( __FILE__ ) . '/minileven/theme';
32 }
33
34 return $theme_root;
35 }
36
37 add_filter( 'theme_root', 'minileven_theme_root' );
38
39 function minileven_theme_root_uri( $theme_root_uri ) {
40 if ( jetpack_check_mobile() ) {
41 return plugins_url( 'modules/minileven/theme', dirname( __FILE__ ) );
42 }
43
44 return $theme_root_uri;
45 }
46
47 add_filter( 'theme_root_uri', 'minileven_theme_root_uri' );
48
49 function minileven_enabled( $wp_mobile_disable_option ) {
50 return true;
51 }
52
53 if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
54 add_filter( 'option_wp_mobile_disable', 'minileven_enabled' );
55 }
56
57 jetpack_load_minileven();
58