'; public static $AFTER_WIDGET = ''; public static $BEFORE_WIDGET_TITLE = '

'; public static $AFTER_WIDGET_TITLE = '

'; public static $WIDGET_DUMMY_ID; public static $MAGAZINE_POSTS_PER_GROUP; public static $MAGAZINE_PATTERN; public static $TILE1_PATTERN; public static $TILE1_META_DECOR; public static $TILE2_PATTERN; public static $TILE4_PATTERN; public static $TILE5_PATTERN; public static $SIDE1_PATTERN; public static $POSTS = "leapin_posts"; public static $NAV_TAXONOMY = "leapin_nav_taxonomy"; public static $NAV_SINGLE = "leapin_nav_single"; public static $NAV_THUMBNAIL = "leapin_nav_thumbnail"; public static $TILE_VER1 = "tile_ver1"; public static $TILE_VER2 = "tile_ver2"; public static $TILE_VER3 = "tile_ver3"; public static $TILE_VER4 = "tile_ver4"; public static $TILE_VER5 = "tile_ver5"; public static $TILE_VER6 = "tile_ver6"; public static $SIDEBAR_VER1 = "sidebar_ver1"; public static $SWIPER_VER1 = "swiper_ver1"; public static $SWIPER_VER2 = "swiper_ver2"; public static $SWIPER_VER3 = "swiper_ver3"; public static $SWIPER_VER4 = "swiper_ver4"; public static $SWIPER_VER5 = "swiper_ver5"; public static $FONT_XSMALL = "font-xsmall"; public static $FONT_SMALL = "font-small"; public static $FONT_MEDIUM = "font-medium"; public static $FONT_LARGE = "font-large"; public static $FONT_XLARGE = "font-xlarge"; public static $LAYOUT_BASE_FLEX = "layout_base_flex"; public static $LAYOUT_BASE_GRID = "layout_base_grid"; public static $CARD_BASE_ON_IMAGE = "base_onImage"; public static $CARD_BASE_HORIZONTAL = "base_hr"; private function __construct() { self::$layout_type = apply_filters('leapin_post_widget_select_layout_type', [ self::$TILE_VER4 => __('For Main Content Area(Tile)', 'pjax-blog'), self::$TILE_VER1 => __('For Main Content Area(Bigger tile for first post)', 'pjax-blog'), self::$TILE_VER2 => __('For Main Content Area(Big tiles with excerpt)', 'pjax-blog'), self::$TILE_VER5 => __('For Main Content Area(Narrow tiles)', 'pjax-blog'), self::$TILE_VER3 => __('For Container Area(Magazine)', 'pjax-blog'), self::$TILE_VER6 => __('For Container Area(Tiles 2)', 'pjax-blog'), self::$SIDEBAR_VER1 => __('For Sidebar Area(Tiles)', 'pjax-blog') ]); self::$order_by = apply_filters('leapin_post_widget_select_order_by', [ 'date' => __('Publish Date', 'pjax-blog'), 'modified' => __('Modified Date', 'pjax-blog') ]); self::$WIDGET_DUMMY_ID = uniqid('leapin-blog-posts-'); self::$MAGAZINE_POSTS_PER_GROUP = [4, 3, 4]; self::$MAGAZINE_PATTERN = [ "large", "medium", "small", "small", /* 1 */ "xlarge", "small", "small", /* 2 */ "large", "medium", "small", "small", /* 3 */ ]; self::$TILE1_PATTERN = [ "medium", "xsmall", "xsmall", "xsmall", "xsmall", "xsmall", "medium", "xsmall", "xsmall", "xsmall", ]; self::$TILE1_META_DECOR = [ " meta_bg", " meta_font", " meta_font", " meta_font", " meta_font", " meta_font", " meta_bg", " meta_font", " meta_font", " meta_font" ]; self::$TILE2_PATTERN = [ "medium", "medium", "medium", "medium", "medium" ]; self::$TILE4_PATTERN = [ "xsmall", "xsmall", "xsmall", "xsmall", "xsmall" ]; self::$TILE5_PATTERN = [ "small", "small", "xsmall", "xsmall", "xsmall" ]; self::$SIDE1_PATTERN = [ "xsmall", "xsmall", "xsmall", "xsmall", "xsmall" ]; add_action('wp_loaded', function () { global $leapin_vars; $taxonomies = get_taxonomies(array( 'public' => true, // '_builtin' => false ), 'objects', 'or'); foreach ($taxonomies as $tax) { self::$taxonomy[$tax->name] = $tax->label; } $post_types = get_post_types(array( 'public' => true, '_builtin' => false ), 'objects', 'or'); foreach ($post_types as $post_type) { if ($post_type->name == 'attachment') continue; self::$post_type[$post_type->name] = $post_type->label; } $leapin_vars['taxonomies'] = apply_filters('leapin_post_widget_select_taxonomies', $taxonomies); $leapin_vars['post_types'] = apply_filters('leapin_post_widget_select_post_types', $post_types); }); reset(self::$layout_type); self::$default_layout_type = key(self::$layout_type); reset(self::$order_by); self::$default_order_by = key(self::$order_by); reset(self::$taxonomy); self::$default_taxonomy = key(self::$taxonomy); reset(self::$post_type); self::$default_post_type = key(self::$post_type); } public static function getInstance() { if (is_null(self::$layout_type) || is_null(self::$default_layout_type)) { new self(); } } } LEAPIN_Query_Params::getInstance();