get('Name'); $slug = sanitize_text_field( strtolower( preg_replace('/[\s_]/', '-', $name ) ) ); $known_themes = array('jorgen', 'novella','genji','kerouac','fable','andersen','lore','zealot','worldview','canvas','myth','longform','longformpro', 'jorgen-child', 'novella-child','genji-child','kerouac-child','fable-child','andersen-child','lore-child','zealot-child','worldview-child','canvas-child','myth-child','longform-child','longformpro-child'); return in_array ( $slug , $known_themes ); } /** * Helper function used in seeing if a particular theme has added extended styles support * For example, say a theme has add_theme_support('whatever', array('thing_one', 'thing_two')) * * aesop_theme_supports( $component ) is used to see if the particular arg within an array exists * * @param unknown $component - array of components * @since 1.0.9 */ public function aesop_theme_supports( $component = '' ) { $supports = get_theme_support( 'aesop-component-styles' ); if ( empty( $supports ) || ! is_array( $supports ) ) { return false; } if ( in_array( $component, $supports[0] ) ) {; return true; } else { return false; } } /** A significant change in the logic determining if we should load the default styles for components */ public function should_load_default_style($component = '') { $supports = get_theme_support( 'aesop-component-styles' ); if ( empty( $supports ) || ! is_array( $supports ) ) { // if it's a known ase theme that supplies its own style, return false if (self::known_ase_theme()) return false; // if post class has aesop-entry-content. If it's present this theme must support ASE $postClass = get_post_class(); if (in_array ( 'aesop-entry-content', $postClass ) ) { return false; } // Test filter aesop_chapter_scroll_container. If it's present this theme must support ASE $dummy = apply_filters( 'aesop_chapter_scroll_container', 'dummy' ); if ($dummy != 'dummy') { return false; } return true; } else { if ( in_array( $component, $supports[0] ) ) {; // the theme explicitly instructs to load the default style for this component return true; } else { return false; } } } } new aiCoreCSSMerger;