/** * Initialization function, similar to __construct() * * @since 0.1 */ public static function initialize() { self::$wp_4dot0_plus = version_compare(get_bloginfo('version'), '4.0', '>='); /* * Set up the Media/Assistant submenu table column definitions */ $taxonomies = get_taxonomies(array('show_ui' => true), 'names'); foreach ($taxonomies as $tax_name) { if (MLACore::mla_taxonomy_support($tax_name)) { $tax_object = get_taxonomy($tax_name); self::$default_columns['t_' . $tax_name] = esc_html($tax_object->labels->name); self::$default_hidden_columns[] = 't_' . $tax_name; // self::$default_sortable_columns [] = none at this time } // supported taxonomy } // foreach $tax_name /* * For WP 4.3+ icon will be merged with the first visible preferred column */ if (MLATest::$wp_4dot3_plus) { unset(self::$default_columns['icon']); } self::$default_columns = array_merge(self::$default_columns, MLACore::mla_custom_field_support('default_columns')); self::$default_hidden_columns = array_merge(self::$default_hidden_columns, MLACore::mla_custom_field_support('default_hidden_columns')); self::$default_sortable_columns = array_merge(self::$default_sortable_columns, MLACore::mla_custom_field_support('default_sortable_columns')); }
/** * Initialization function, similar to __construct() * * @since 0.1 */ public static function initialize() { global $table_prefix; self::$mla_alt_text_view = $table_prefix . MLA_OPTION_PREFIX . self::MLA_ALT_TEXT_VIEW_SUFFIX; self::$mla_orderby_view = $table_prefix . MLA_OPTION_PREFIX . self::MLA_ORDERBY_VIEW_SUFFIX; self::$mla_table_view_custom = $table_prefix . MLA_OPTION_PREFIX . self::MLA_TABLE_VIEW_CUSTOM_SUFFIX; self::$wp_4dot0_plus = version_compare(get_bloginfo('version'), '4.0', '>='); /* * Set up the Media/Assistant submenu table column definitions */ $taxonomies = get_taxonomies(array('show_ui' => true), 'names'); foreach ($taxonomies as $tax_name) { if (MLACore::mla_taxonomy_support($tax_name)) { $tax_object = get_taxonomy($tax_name); self::$default_columns['t_' . $tax_name] = esc_html($tax_object->labels->name); self::$default_hidden_columns[] = 't_' . $tax_name; // self::$default_sortable_columns [] = none at this time } // supported taxonomy } // foreach $tax_name self::$default_columns = array_merge(self::$default_columns, MLACore::mla_custom_field_support('default_columns')); self::$default_hidden_columns = array_merge(self::$default_hidden_columns, MLACore::mla_custom_field_support('default_hidden_columns')); self::$default_sortable_columns = array_merge(self::$default_sortable_columns, MLACore::mla_custom_field_support('default_sortable_columns')); }