Plugin Directory

Changeset 1350674


Ignore:
Timestamp:
02/15/2016 04:11:22 AM (10 years ago)
Author:
primestrategy
Message:

WP SiteManager update to 1.1.10

Location:
wp-sitemanager/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-sitemanager/trunk/readme.txt

    r1345834 r1350674  
    33Tags: cms, mobile, sitemap, pager, page navi, breadcrumb
    44Requires at least: 4.2
    5 Tested up to: 4.4.1
    6 Stable tag: 1.1.9
     5Tested up to: 4.4.2
     6Stable tag: 1.1.10
    77
    88WP SiteManager is an integrated package comprising of necessary functions for using WordPress as a CMS.
     
    3434
    3535== Changelog ==
     36= 1.1.10 =
     37* add : if defined "WPSM_DISABLE_DEVICE" as true , disable multi device functions.
     38* add : if defined "WPSM_DISABLE_CACHE" as true, disable cahce functions .
     39
    3640= 1.1.9 =
    3741* add : add 2 args( $with, $height ) for 'wp_sitemanager_open_graph_image' filter
  • wp-sitemanager/trunk/wp-sitemanager.php

    r1345834 r1350674  
    55 Description: WP SiteManager is an integrated package comprising of necessary functions for using WordPress as a CMS.
    66 Author: Prime Strategy Co.,LTD.
    7  Version: 1.1.9
     7 Version: 1.1.10
    88 Author URI: http://www.prime-strategy.co.jp/
    99 License: GPLv2 or later
     
    100100        $installed_modules = $this->get_modules();
    101101        $disabled_modules = $this->get_disabled_modules();
     102
    102103        foreach ( $installed_modules as $slug => $module ) {
    103104            if ( ! in_array( $slug, $disabled_modules ) ) {
     
    288289     */
    289290    private function get_disabled_modules() {
    290         return apply_filters( 'wp-sitemanager/disabled_modules', get_option( 'disabled_modules', array() ) );
     291        $disabled_modules = apply_filters( 'wp-sitemanager/disabled_modules', get_option( 'disabled_modules', array() ) );
     292        if ( defined( 'WPSM_DISABLE_DEVICE' ) && WPSM_DISABLE_DEVICE ) {
     293            if ( ! in_array( 'theme_switcher', $disabled_modules ) ) {
     294                $disabled_modules[] = 'theme_switcher';
     295            }
     296        }
     297
     298        if ( defined( 'WPSM_DISABLE_CACHE' ) && WPSM_DISABLE_DEVICE ) {
     299            if ( ! in_array( 'site-cache', $disabled_modules ) ) {
     300                $disabled_modules[] = 'site-cache';
     301            }
     302        }
     303        return $disabled_modules;
    291304    }
    292305
     
    318331        if ( $files ) {
    319332            foreach ( $files as $file ) {
     333                if ( defined( 'WPSM_DISABLE_DEVICE' ) && WPSM_DISABLE_DEVICE ) {
     334                    if ( 'theme_switcher.php' == basename( $file ) ) {
     335                        continue;
     336                    }
     337                }
     338
     339                if ( defined( 'WPSM_DISABLE_CACHE' ) && WPSM_DISABLE_DEVICE ) {
     340                    if ( 'site-cache.php' == basename( $file ) ) {
     341                        continue;
     342                    }
     343                }
    320344                $headers = $this->get_module_headers( $file );
    321345
Note: See TracChangeset for help on using the changeset viewer.