$myMaxSize){ autoptimizeCache::clearall(); header("Refresh:0"); # Refresh the page so that autoptimize can create new cache files and it does breaks the page after clearall. } } /** * Set the content width based on the theme's design and stylesheet. * */ if ( ! isset( $content_width ) ) $content_width = 700; /* pixels */ if ( ! function_exists( 'spun_setup' ) ): /** * Sets up theme defaults and registers support for various WordPress features. * * Note that this function is hooked into the after_setup_theme hook, which runs * before the init hook. The init hook is too late for some features, such as indicating * support post thumbnails. * */ function spun_setup() { /** * Make theme available for translation * Translations can be filed in the /languages/ directory * If you're building a theme based on Spun, use a find and replace * to change 'spun' to the name of your theme in all the template files */ load_theme_textdomain( 'spun', get_template_directory() . '/languages' ); /** * Add default posts and comments RSS feed links to head */ add_theme_support( 'automatic-feed-links' ); /** * Enable support for Post Thumbnails */ add_theme_support( 'post-thumbnails' ); add_image_size( 'home-post', 360, 360, true ); add_image_size( 'single-post', 700, 999 ); /** * This theme uses wp_nav_menu() in one location. */ register_nav_menus( array( 'primary' => __( 'Primary Menu', 'spun' ), ) ); /** * Add support for custom backgrounds */ add_theme_support( 'custom-background' ); /** * Add support for editor styles */ add_editor_style(); /** * Add support for Post Formats */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'status', 'gallery' ) ); } endif; // spun_setup add_action( 'after_setup_theme', 'spun_setup' ); /** * Register widgetized area and update sidebar with default widgets * */ function spun_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar 1', 'spun' ), 'id' => 'sidebar-1', 'before_widget' => '', 'before_title' => '