Changeset 2092
- Timestamp:
- 11/18/2015 10:54:00 PM (9 years ago)
- Location:
- sites/trunk/wordcamp.org/public_html/wp-content
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/helper-functions.php
r1701 r2092 104 104 return $name; 105 105 } 106 107 /** 108 * Determine if a specific feature should be skipped on the current site 109 * 110 * Often times we want to add new functionality to plugins and themes, but can't let it run on older sites 111 * because that would break backwards compatibility. To get around that, we set a flag on older sites to 112 * indicate that they should not have the new feature, and then setup the feature to run on sites that 113 * don't have the flag, i.e., to run by default. 114 * 115 * Doing it this way means that local development environments like the Meta Environment don't have add any 116 * new filters in order to start using the new functionality. 117 * 118 * @param string $flag 119 * 120 * @return bool 121 */ 122 function wcorg_skip_feature( $flag ) { 123 $flags = get_option( 'wordcamp_skip_features', array() ); 124 125 return isset( $flags[ $flag ] ); 126 } -
sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/header.php
r622 r2092 12 12 <head> 13 13 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 14 <meta name="viewport" content=" width=device-width" />14 <meta name="viewport" content="<?php echo esc_attr( wcb_get_viewport() ); ?>" /> 15 15 <meta name="apple-mobile-web-app-capable" content="yes" /> 16 16 <title><?php -
sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/utils/header.php
r2 r2092 93 93 } 94 94 95 ?> 95 /** 96 * Get the value for the <meta name="viewport"> tag 97 * 98 * @return string 99 */ 100 function wcb_get_viewport() { 101 $viewport = 'width=device-width'; 102 103 if ( ! wcorg_skip_feature( 'wcb_viewport_initial_scale' ) ) { 104 $viewport .= ', initial-scale=1'; 105 } 106 107 return $viewport; 108 } -
sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/header.php
r412 r2092 9 9 <head> 10 10 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 11 <meta name="viewport" content=" width=device-width">11 <meta name="viewport" content="<?php echo esc_attr( wcb_get_viewport() ); ?>"> 12 12 <?php wcb_title_tag(); ?> 13 13 <link rel="profile" href="http://gmpg.org/xfn/11" /> -
sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/lib/utils/header.php
r1662 r2092 93 93 } 94 94 95 ?> 95 /** 96 * Get the value for the <meta name="viewport"> tag 97 * 98 * @return string 99 */ 100 function wcb_get_viewport() { 101 $viewport = 'width=device-width'; 102 103 if ( ! wcorg_skip_feature( 'wcb_viewport_initial_scale' ) ) { 104 $viewport .= ', initial-scale=1'; 105 } 106 107 return $viewport; 108 }
Note: See TracChangeset
for help on using the changeset viewer.