wp_stateless_is_app_engine

wp_stateless_is_app_engine

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wp-stateless.4.1.2

apply_filters('wp_stateless_is_app_engine') is found 8 times:

  • /lib/classes/class-api.php line 88
          static public function updateSettings(\WP_REST_Request $request) {
            if (self::$tokenData === null || empty(self::$tokenData->user_id)) {
              return new \WP_Error('unauthorized', 'Auth token looks incorrect', ['status' => 401]);
            }
            $is_gae                 = apply_filters('wp_stateless_is_app_engine', false);
            $upload_dir             = wp_upload_dir();
            $is_upload_dir_writable = is_writable($upload_dir['basedir']);
    
            try {
              $queryParams = $request->get_json_params();
              if (empty($queryParams)) throw new \Exception('Query is empty');
    
  • /lib/classes/class-dynamic-image-support.php line 27
          const ID = 'dynamic-image-support';
    
          public function __construct() {
            // On Google App Engine not working
            if ( apply_filters('wp_stateless_is_app_engine', false) ) {
              return;
            }
    
            $enabled = ud_get_stateless_media()->get( 'sm.dynamic_image_support', false ) == 'true';
    
            // Legacy setting
    
  • /lib/classes/class-google-app-engine.php line 54
            if ( $value === 'disabled' ) {
              return $value;
            }
    
            if ( apply_filters('wp_stateless_is_app_engine', false) ) {
              return 'stateless';
            }
    
            return $value;
          }
    
    
  • /lib/classes/class-google-app-engine.php line 71
            if ( !is_a($settingsObj, 'wpCloud\StatelessMedia\Settings') ) {
              return;
            }
    
            if ( !apply_filters('wp_stateless_is_app_engine', false) ) {
              return;
            }
    
            $settingsObj->set('sm.readonly.mode', 'app_engine'); 
          }
    
    
  • /lib/classes/class-google-app-engine.php line 82
          /**
           * Add admin message if we are running on Google App Engine
           */
          public function add_message() {
            if ( !apply_filters('wp_stateless_is_app_engine', false) ) {
              return;
            }
    
            ud_get_stateless_media()->errors->add(array(
              'key' => 'stateless_app_engine_auto_mode',
              'button' => 'View Settings',
    
  • /static/views/settings-sections/general.php line 58
     
          <p class="sm-mode">
            <label for="sm_mode_stateless">
              <input id="sm_mode_stateless" type="radio" name="sm&#91;mode&#93;" value="stateless" <?php checked( $sm->mode, 'stateless' ); ?>>
              <?php if ( apply_filters('wp_stateless_is_app_engine', false) ) : ?>
                <?php _e('Stateless (Google App Engine Detected)', ud_get_stateless_media()->domain); ?>
              <?php else : ?>
                <?php _e('Stateless', ud_get_stateless_media()->domain); ?>
              <?php endif; ?>
    
              <small class="description"><?php _e('Store and serve media files with Google Cloud Storage only. Media files are not stored locally.', ud_get_stateless_media()->domain); ?></small>
    
  • /static/views/settings_interface.php line 12
        <div class="description"><?php _e('Upload and serve your WordPress media files from Google Cloud Storage.', ud_get_stateless_media()->domain); ?></div>
      </div>
      <h2 class="nav-tab-wrapper">
        <a href="#stless_settings_tab" class="stless_setting_tab nav-tab <?php if ($tab == 'stless_settings_tab') echo 'nav-tab-active'; ?>"><?php _e('Settings', ud_get_stateless_media()->domain); ?></a>
        <?php if (!is_network_admin() && !apply_filters('wp_stateless_is_app_engine', false) && ud_get_stateless_media('sm.mode') != 'disabled') : ?>
          <a href="#stless_sync_tab" class="stless_setting_tab nav-tab <?php if ($tab == 'stless_sync_tab') echo 'nav-tab-active'; ?>"><?php _e('Sync', ud_get_stateless_media()->domain); ?></a>
        <?php endif; ?>
        <a href="#stless_compatibility_tab" class="stless_setting_tab nav-tab <?php if ($tab == 'stless_compatibility_tab') echo 'nav-tab-active'; ?>"><?php _e('Compatibility', ud_get_stateless_media()->domain); ?></a>
        <?php if ( apply_filters('wp_stateless_addons_tab_visible', false) ) : ?>
          <a href="#stless_addons_tab" class="stless_setting_tab nav-tab <?php if ($tab == 'stless_addons_tab') echo 'nav-tab-active'; ?>"><?php _e('Addons', ud_get_stateless_media()->domain); ?></a>
        <?php endif; ?>
    
  • /static/views/settings_interface.php line 29
        <div id="stless_settings_tab" class="stless_settings_content <?php if ($tab == 'stless_settings_tab') echo 'active'; ?>">
          <?php do_action('wp_stateless_settings_tab_content'); ?>
        </div>
    
        <?php if (!is_network_admin() && !apply_filters('wp_stateless_is_app_engine', false) && ud_get_stateless_media('sm.mode') != 'disabled') : ?>
          <div id="stless_sync_tab" class="stless_settings_content <?php if ($tab == 'stless_sync_tab') echo 'active'; ?>">
            <?php do_action('wp_stateless_processing_tab_content'); ?>
          </div>
        <?php endif; ?>
    
        <?php if ( apply_filters('wp_stateless_compatibility_tab_visible', false) ) : ?>
    

See this hook used in plugins: