/** * Assemble the list of icon types without MLA filtering * * @since 1.40 * * @return boolean Success (true) or failure (false) of the operation */ private static function _get_core_icon_types() { global $wp_filter; if (NULL != self::$mla_core_icon_types) { return true; } /* * wp_ext2type will apply our filter in a special mode, initializing the list */ self::$disable_mla_filtering = true; $save_filters = $wp_filter['ext2type']; unset($wp_filter['ext2type']); add_filter('ext2type', 'MLAMime::mla_ext2type_filter', 0x7fffffff, 1); wp_ext2type('xxx'); $wp_filter['ext2type'] = $save_filters; self::$disable_mla_filtering = false; /* * Rebuild the list as extension => type, * Explode any entries with multiple extensions */ $standard_types = array(); foreach (self::$mla_core_icon_types as $key => $extensions) { foreach ($extensions as $extension) { $standard_types[$extension] = $key; } } ksort($standard_types); self::$mla_core_icon_types = $standard_types; return true; }