array( 'label' => __('Blocks', 'ultimate-post'), 'attr' => array( 'addon_enable' => array( 'type' => 'heading', 'label' => __('Enable/Disable Blocks', 'ultimate-post'), ), 'post_grid_1' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Grid #1 Block.', 'ultimate-post') ), 'post_grid_2' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Grid #2 Block.', 'ultimate-post') ), 'post_grid_3' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Grid #3 Block.', 'ultimate-post') ), 'post_grid_4' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Grid #4 Block.', 'ultimate-post') ), 'post_grid_5' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Grid #5 Block.', 'ultimate-post') ), 'post_grid_6' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Grid #6 Block.', 'ultimate-post') ), 'post_grid_7' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Grid #7 Block.', 'ultimate-post') ), 'post_list_1' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post List #1 Block.', 'ultimate-post') ), 'post_list_2' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post List #2 Block.', 'ultimate-post') ), 'post_list_3' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post List #3 Block.', 'ultimate-post') ), 'post_list_4' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post List #4 Block.', 'ultimate-post') ), 'post_module_1' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Module #1 Block.', 'ultimate-post') ), 'post_module_2' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Module #2 Block.', 'ultimate-post') ), 'post_slider_1' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Post Slider #1 Block.', 'ultimate-post') ), 'heading' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Heading Block.', 'ultimate-post') ), 'image' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Image Block.', 'ultimate-post') ), 'taxonomy' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Taxonomy Block.', 'ultimate-post') ), 'wrapper' => array( 'type' => 'switch', 'label' => __('Enable / Disable', 'ultimate-post'), 'default' => true, 'desc' => __('Wrapper Block.', 'ultimate-post') ), ) ) ); return array_merge($config, $arr); } public static function all_addons(){ $all_addons = array( 'ultp_category' => array( 'name' => __( 'Category', 'ultimate-post' ), 'desc' => __( 'Choose your desired color and Image for categories or any taxonomy.', 'ultimate-post' ), 'img' => ULTP_URL.'/assets/img/addons/category-style.svg', 'is_pro' => true ), 'ultp_builder' => array( 'name' => __( 'Builder', 'ultimate-post' ), 'desc' => __( 'Design template for Archive, Category, Custom Taxonomy, Date and Search page.', 'ultimate-post' ), 'img' => ULTP_URL.'/assets/img/addons/builder-icon.svg', 'is_pro' => true ), 'ultp_yoast' => array( 'name' => __( 'Yoast Meta', 'ultimate-post' ), 'desc' => __( 'Show Yoast meta description in excerpt.', 'ultimate-post' ), 'img' => ULTP_URL.'/assets/img/addons/yoast.svg', 'is_pro' => true ), 'ultp_aioseo' => array( 'name' => __( 'All in One SEO Meta', 'ultimate-post' ), 'desc' => __( 'Show All in One SEO meta description in excerpt.', 'ultimate-post' ), 'img' => ULTP_URL.'/assets/img/addons/aioseo.svg', 'is_pro' => true ), 'ultp_rankmath' => array( 'name' => __( 'RankMath Meta', 'ultimate-post' ), 'desc' => __( 'Show RankMath meta description in excerpt.', 'ultimate-post' ), 'img' => ULTP_URL.'/assets/img/addons/rankmath.svg', 'is_pro' => true ), ); return apply_filters('ultp_addons_config', $all_addons); } /** * Settings page output */ public function create_admin_page() { ?>

get_setting(); $addons_data = self::all_addons(); foreach ($addons_data as $key => $val) { echo '
'; echo '
'; echo ''; echo '

'.$val['name'].'

'; echo '
'.$val['desc'].'
'; echo '
'; if( $val['is_pro'] && !defined('ULTP_PRO_VER') ){ echo ''; } else { echo '
'; echo ''; echo '
'; } echo '
'; } ?>