getSkinSpecific( $options[ 'themeScripts' ], 'scripts' ); } if ( isset( $options[ 'themeStyles' ] ) ) { $options['skinStyles'] = $this->getSkinSpecific( $options[ 'themeStyles' ], 'styles' ); } parent::__construct( $options ); } /** * Helper function to generate values for 'skinStyles' and 'skinScripts'. * * @param string $module Module to generate skinStyles/skinScripts for: * 'core', 'widgets', 'toolbars', 'windows' * @param string $which 'scripts' or 'styles' * @return array */ private function getSkinSpecific( $module, $which ) { $themes = self::getSkinThemeMap(); return array_combine( array_keys( $themes ), array_map( function ( $theme ) use ( $module, $which ) { if ( $which === 'scripts' ) { return $this->getThemeScriptsPath( $theme, $module ); } else { return $this->getThemeStylesPath( $theme, $module ); } }, array_values( $themes ) ) ); } }