Making WordPress.org


Ignore:
Timestamp:
11/18/2015 10:54:00 PM (8 years ago)
Author:
iandunn
Message:

WordCamp Base: Add initial-scale=1 to viewport on new sites.

Fixes #1397
Props rclilly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/helper-functions.php

    r1701 r2092  
    104104    return $name;
    105105}
     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 */
     122function wcorg_skip_feature( $flag ) {
     123    $flags = get_option( 'wordcamp_skip_features', array() );
     124
     125    return isset( $flags[ $flag ] );
     126}
Note: See TracChangeset for help on using the changeset viewer.