• Resolved Steven Vachon

    (@prometh)


    function apl_get_plugin_data( $cache ) {
    
    	// Attempt to get plugin list from cache
    
    	if ( !$cache ) { $cache = 'no'; }
    
    	$plugins = false;
    	$cache_key = 'artiss_plugins_list';
    	if ( !is_numeric( $cache ) ) { $plugins = get_transient( $cache_key ); }
    
    	// If not using cache, generate a new list and cache that
    
    	if ( !$plugins ) {
    		$plugins = get_plugins();
    		if ( ( '' != $plugins ) && ( !is_numeric( $cache ) ) ) { set_transient( $cache_key, $plugins, 3600 * $cache ); }
    	}
    
    	return $plugins;
    
    }

    Because of if ( !is_numeric( $cache ) ), cache is always used.

    http://wordpress.org/extend/plugins/plugins-list/

  • The topic ‘cache="no" ignored’ is closed to new replies.