public function loadUploaderScript()
 {
     wp_enqueue_media();
     wp_enqueue_script('tf-theme-customizer-serialize', TitanFramework::getURL('js/serialize.js', __FILE__));
     wp_enqueue_style('tf-admin-theme-customizer-styles', TitanFramework::getURL('css/admin-theme-customizer-styles.css', __FILE__));
     wp_enqueue_style('tf-font-awesome', TitanFramework::getURL('css/font-awesome/css/font-awesome.min.css', __FILE__));
 }
 /**
  * Enqueues the jQuery UI scripts
  *
  * @return	void
  * @since	1.4
  */
 public function enqueueDatepicker()
 {
     wp_enqueue_script('jquery-ui-core');
     wp_enqueue_script('jquery-ui-slider');
     wp_enqueue_script('jquery-ui-datepicker');
     wp_enqueue_script('tf-jquery-ui-timepicker-addon', TitanFramework::getURL('js/min/jquery-ui-timepicker-addon-min.js', __FILE__), array('jquery-ui-datepicker', 'jquery-ui-slider'));
 }
/**
 * Initialize Titan & options here
 */
function una_create_options()
{
    $titan = TitanFramework::getInstance('una');
    $backgroundSection = $titan->createThemeCustomizerSection(array('name' => __('Backgrounds', 'una')));
    $backgroundSection->createOption(array('name' => __('Sidebar Background Color', 'una'), 'id' => 'sidebar_bg_color', 'type' => 'color', 'desc' => __('This color changes the background of your theme', 'una'), 'default' => '#FFFFFF', 'css' => 'body:before { background-color: value }'));
    $backgroundSection->createOption(array('name' => __('Body Background Color', 'una'), 'id' => 'body_bg_color', 'type' => 'color', 'desc' => __('This color changes the background of your theme', 'una'), 'default' => '#FAFAFA', 'css' => 'body { background-color: value }'));
    $backgroundSection->createOption(array('name' => __('Panels Background Color', 'una'), 'id' => 'panels_bg_color', 'type' => 'color', 'desc' => __('This color changes the panel background of your theme', 'una'), 'default' => '#FFFFFF', 'css' => '.hentry,.footer,.comments-area { background-color: value }'));
    $brandSection = $titan->createThemeCustomizerSection(array('name' => 'title_tagline'));
    $brandSection->createOption(array('name' => 'Logo', 'id' => 'brand_logo', 'type' => 'upload', 'desc' => 'Upload your logo'));
    /**
     * Create a Theme Customizer panel where we can edit some options.
     * You should put options here that change the look of your theme.
     */
    $section = $titan->createThemeCustomizerSection(array('name' => __('Theme Typography', 'una')));
    $section->createOption(array('name' => __('Headings Font', 'una'), 'id' => 'headings_font', 'type' => 'font', 'desc' => __('Select the font for all headings in the site', 'una'), 'show_color' => false, 'show_font_size' => false, 'show_font_weight' => false, 'show_font_style' => false, 'show_line_height' => false, 'show_letter_spacing' => false, 'show_text_transform' => false, 'show_font_variant' => false, 'show_text_shadow' => false, 'default' => array('font-family' => 'Lato'), 'css' => 'h1, h2, h3, h4, h5, h6,th,.page-title, .comments-title, .comment-reply-title, .post-navigation .post-title,.entry-title,.entry-title a { value }'));
    $section->createOption(array('name' => __('Headings Text Color', 'una'), 'id' => 'headings_text_color', 'type' => 'color', 'desc' => __('This color changes the background of your theme', 'una'), 'default' => '#2C2C2C', 'css' => 'h1, h2, h3, h4, h5, h6,th { color: value }'));
    $section->createOption(array('name' => __('Text Font', 'una'), 'id' => 'body_text_font', 'type' => 'font', 'desc' => __('Select the font for text (excluding titles) in the site', 'una'), 'show_color' => false, 'show_font_size' => false, 'show_font_weight' => false, 'show_font_style' => false, 'show_line_height' => false, 'show_letter_spacing' => false, 'show_text_transform' => false, 'show_font_variant' => false, 'show_text_shadow' => false, 'default' => array('font-family' => 'Roboto'), 'css' => 'body,a,blockquote,td,p{ value }'));
    $section->createOption(array('name' => __('Text Color', 'una'), 'id' => 'body_text_color', 'type' => 'color', 'desc' => __('This color changes the background of your theme', 'una'), 'default' => '#2C2C2C', 'css' => 'body,a,blockquote,td,p { color: value }'));
    /**
     * Create an admin panel & tabs
     * You should put options here that do not change the look of your theme
     */
    $adminPanel = $titan->createAdminPanel(array('name' => __('Theme Settings', 'una')));
    $generalTab = $adminPanel->createTab(array('name' => __('General', 'una')));
    $generalTab->createOption(array('name' => __('Custom Javascript Code', 'una'), 'id' => 'custom_js', 'type' => 'code', 'desc' => __('If you want to add some additional Javascript code into your site, add them here and it will be included in the frontend header. No need to add <code>script</code> tags', 'una'), 'lang' => 'javascript'));
    $generalTab->createOption(array('name' => __('Display Search', 'una'), 'id' => 'display_search', 'type' => 'enable', 'default' => true));
    $generalTab->createOption(array('type' => 'save'));
    $footerTab = $adminPanel->createTab(array('name' => __('Footer', 'una')));
    $footerTab->createOption(array('name' => __('Copyright Text', 'una'), 'id' => 'copyright', 'type' => 'text', 'desc' => __('Enter your copyright text here (sample only)', 'una')));
    $footerTab->createOption(array('type' => 'save'));
}
function nswp_create_options()
{
    $nswp_option_page = TitanFramework::getInstance('nswp');
    $nswp_options = $nswp_option_page->createAdminPanel(array('name' => __('Nicescrollbar WP Options', 'nswp')));
    $nswp_options->createOption(array('id' => 'nswp-cursor-color', 'name' => __('Scrollbar Color', 'nswp'), 'desc' => __('Background color of the scrollbar.'), 'type' => 'color', 'default' => '#e74c3c'));
    $nswp_options->createOption(array('id' => 'nswp-cursor-opacity-min', 'name' => __('Minimum Scrollbar Opacity', 'nswp'), 'desc' => __('Opacity of scrollbar when inactive.'), 'type' => 'number', 'min' => '0', 'max' => '1', 'step' => '0.1', 'default' => '0'));
    $nswp_options->createOption(array('id' => 'nswp-cursor-opacity-max', 'name' => __('Maximum Scrollbar Opacity', 'nswp'), 'desc' => __('Opacity of scrollbar when active.'), 'type' => 'number', 'min' => '0', 'max' => '1', 'step' => '0.1', 'default' => '1'));
    $nswp_options->createOption(array('id' => 'nswp-hide-cursor-delay', 'name' => __('Scrollbar Hiding Delay', 'nswp'), 'desc' => __('Set the delay in microseconds to fading out scrollbar', 'nswp'), 'type' => 'number', 'min' => '200', 'max' => '5000', 'step' => '50', 'default' => '400'));
    $nswp_options->createOption(array('id' => 'nswp-cursor-width', 'name' => __('Scrollbar Width', 'nswp'), 'type' => 'number', 'min' => '0', 'max' => '100', 'step' => '1', 'unit' => 'px', 'default' => '5'));
    $nswp_options->createOption(array('id' => 'nswp-border-color', 'name' => __('Scrollbar Border Color', 'nswp'), 'desc' => __('Border color of scrollbar'), 'type' => 'color', 'default' => '#fff'));
    $nswp_options->createOption(array('id' => 'nswp-border-width', 'name' => __('Scrollbar Border Width', 'nswp'), 'type' => 'number', 'min' => '0', 'max' => '100', 'step' => '1', 'unit' => 'px', 'default' => '0'));
    $nswp_options->createOption(array('id' => 'nswp-border-radious', 'name' => __('Scrollbar Border Radious', 'nswp'), 'type' => 'number', 'min' => '0', 'max' => '100', 'step' => '1', 'unit' => 'px', 'default' => '0'));
    $nswp_options->createOption(array('id' => 'nswp-scroll-speed', 'name' => __('Scrolling Speed', 'nswp'), 'type' => 'number', 'min' => '0', 'max' => '1000', 'step' => '1', 'default' => '60'));
    $nswp_options->createOption(array('id' => 'nswp-mouse-scroll-step', 'name' => __('Scrolling Speed with Mouse Wheel', 'nswp'), 'type' => 'number', 'min' => '0', 'max' => '1000', 'step' => '1', 'unit' => 'px', 'default' => '40'));
    $nswp_options->createOption(array('id' => 'nswp-touchbehavior', 'name' => __('Enable cursor-drag', 'nswp'), 'desc' => __('Enable cursor-drag scrolling like touch devices in desktop computer', 'nswp'), 'type' => 'checkbox', 'default' => false));
    $nswp_options->createOption(array('id' => 'nswp-hwacceleration', 'name' => __('Use Hardware Acceleration', 'nswp'), 'desc' => __('Use hardware accelerated scroll when supported', 'nswp'), 'type' => 'checkbox', 'default' => true));
    $nswp_options->createOption(array('id' => 'nswp-boxzoom', 'name' => __('Enable Boxzoom', 'nswp'), 'desc' => __('Enable zoom for box content', 'nswp'), 'type' => 'checkbox', 'default' => false));
    $nswp_options->createOption(array('id' => 'nswp-grab-cursor-enabled', 'name' => __('Display "grab" icon', 'nswp'), 'desc' => __('Display "grab" icon for div', 'nswp'), 'type' => 'checkbox', 'default' => true));
    $nswp_options->createOption(array('id' => 'nswp-auto-hide-mode', 'name' => __('Auto Hide Scrollbar', 'nswp'), 'desc' => __('Scrollbar auto hide', 'nswp'), 'type' => 'checkbox', 'default' => true));
    $nswp_options->createOption(array('id' => 'nswp-bounce-scroll', 'name' => __('Enable Bouncescroll', 'nswp'), 'desc' => __('Enable Bouncescroll', 'nswp'), 'type' => 'checkbox', 'default' => false));
    $nswp_options->createOption(array('id' => 'nswp-horizrail-enabled', 'name' => __('Enable Horizontal Scrollbar', 'nswp'), 'desc' => __('Enable Horizontal Scrollbar', 'nswp'), 'type' => 'checkbox', 'default' => false));
    $nswp_options->createOption(array('id' => 'nswp-railalign', 'name' => __('Vertical Scrollbar Alignment', 'nswp'), 'type' => 'select', 'options' => array('right' => __('Right', 'nswp'), 'left' => __('Left', 'nswp')), 'default' => 'right'));
    $nswp_options->createOption(array('id' => 'nswp-railvalign', 'name' => __('Horizontal Scrollbar Alignment', 'nswp'), 'type' => 'select', 'options' => array('bottom' => __('Bottom', 'nswp'), 'top' => __('Top', 'nswp')), 'default' => 'bottom'));
    $nswp_options->createOption(array('id' => 'nswp-enable-mousewheel', 'name' => __('Enable Scroll With Mouse Wheel', 'nswp'), 'desc' => __('Enable Scroll With Mouse Wheel', 'nswp'), 'type' => 'checkbox', 'default' => true));
    $nswp_options->createOption(array('id' => 'nswp-smooth-scroll', 'name' => __('Enable Smooth Scroll', 'nswp'), 'desc' => __('Enable Smooth Scroll', 'nswp'), 'type' => 'checkbox', 'default' => true));
    $nswp_options->createOption(array('type' => 'save'));
}
Ejemplo n.º 5
0
function initalize_theme_and_create_admin_panel()
{
    // We create all our options here
    $titan = TitanFramework::getInstance('bas-intranet');
    // Load in the the Theme Menu
    require locate_template('framework/theme-menu.php');
}
Ejemplo n.º 6
0
 function create_customizer_options()
 {
     $titan = TitanFramework::getInstance('thim');
     TitanFrameworkOptionFontColor::$webSafeFonts = array('aileron' => 'Aileron', 'Arial, Helvetica, sans-serif' => 'Arial', '"Arial Black", Gadget, sans-serif' => 'Arial Black', '"Comic Sans MS", cursive, sans-serif' => 'Comic Sans', '"Courier New", Courier, monospace' => 'Courier New', 'Georgia, serif' => 'Geogia', 'Impact, Charcoal, sans-serif' => 'Impact', '"Lucida Console", Monaco, monospace' => 'Lucida Console', '"Lucida Sans Unicode", "Lucida Grande", sans-serif' => 'Lucida Sans', '"Palatino Linotype", "Book Antiqua", Palatino, serif' => 'Palatino', 'Tahoma, Geneva, sans-serif' => 'Tahoma', '"Times New Roman", Times, serif' => 'Times New Roman', '"Trebuchet MS", Helvetica, sans-serif' => 'Trebuchet', 'Verdana, Geneva, sans-serif' => 'Verdana');
     /* Register Customizer Sections */
     //include heading
     include TP_THEME_DIR . "/inc/admin/customizer-sections/logo.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/header.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/header-mainmenu.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/header-mobile.php";
     // include TP_THEME_DIR . "/inc/admin/customizer-sections/header-offcanvas.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/header-submenu.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/header-stickymenu.php";
     // include TP_THEME_DIR . "/inc/admin/customizer-sections/header-topdrawer.php";
     //include styling
     include TP_THEME_DIR . "/inc/admin/customizer-sections/styling.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/styling-color.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/styling-layout.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/styling-pattern.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/styling-rtl.php";
     //include display setting
     include TP_THEME_DIR . "/inc/admin/customizer-sections/display.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/display-archive.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/display-frontpage.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/display-postpage.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/display-404.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/display-sharing.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/display-loading.php";
     //include woocommerce
     if (class_exists('WooCommerce')) {
         include TP_THEME_DIR . "/inc/admin/customizer-sections/woocommerce.php";
         include TP_THEME_DIR . "/inc/admin/customizer-sections/woocommerce-archive.php";
         include TP_THEME_DIR . "/inc/admin/customizer-sections/woocommerce-setting.php";
         include TP_THEME_DIR . "/inc/admin/customizer-sections/woocommerce-sharing.php";
         include TP_THEME_DIR . "/inc/admin/customizer-sections/woocommerce-single.php";
         include TP_THEME_DIR . "/inc/admin/customizer-sections/woocommerce-badges.php";
     }
     //include typography
     include TP_THEME_DIR . "/inc/admin/customizer-sections/typography.php";
     //include footer
     include TP_THEME_DIR . "/inc/admin/customizer-sections/footer.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/footer-copyright.php";
     include TP_THEME_DIR . "/inc/admin/customizer-sections/footer-options.php";
     //include Custom Css
     include TP_THEME_DIR . "/inc/admin/customizer-sections/custom-css.php";
     //include Import/Export
     include TP_THEME_DIR . "/inc/admin/customizer-sections/import-export.php";
     //Page Event
     include TP_THEME_DIR . "/inc/admin/metabox-sections/event.php";
     // One Page
     include TP_THEME_DIR . "/inc/admin/metabox-sections/onepage.php";
     //include Document
     if (class_exists('wpdoc')) {
         include TP_THEME_DIR . "/inc/admin/customizer-sections/display-document.php";
     }
     // Job
     if (class_exists('WP_Job_Manager')) {
         include TP_THEME_DIR . "/inc/admin/customizer-sections/display-job.php";
     }
 }
Ejemplo n.º 7
0
function bodhi_yoga_create_options()
{
    // Get Framework Instance
    $bodhi_yoga = TitanFramework::getInstance('bodhi-yoga');
    //====================================== //
    //======== Theme Options Panel ========= //
    //====================================== //
    $bodhi_options = $bodhi_yoga->createAdminPanel(array('name' => 'Bodhi Options'));
    //====================================== //
    //======== Options General tab ========= //
    //====================================== //
    $gen_tab = $bodhi_options->createTab(array('name' => 'Home'));
    $social_tab = $bodhi_options->createTab(array('name' => 'Social'));
    //======================================== //
    //============ Options Start ============= //
    //======================================== //
    // Main heading
    $gen_tab->createOption(array('name' => 'Main Heading', 'id' => 'bodhi_main_heading', 'type' => 'text', 'desc' => 'Home page main heading. Header image heading.', 'default' => 'AWAKEN<span class="dot">&middot;</span>HEAL<span class="dot">&middot;</span>INSPIRE'));
    // sub heading
    $gen_tab->createOption(array('name' => 'sub Heading', 'id' => 'bodhi_sub_heading', 'type' => 'text', 'desc' => 'Home page sub heading. Header image heading.', 'default' => 'Come and Join the Yoga Teacher Training'));
    // facebook
    $social_tab->createOption(array('name' => 'facebook', 'id' => 'bodhi_social_facebook', 'type' => 'text'));
    // instagram
    $social_tab->createOption(array('name' => 'instagram', 'id' => 'bodhi_social_instagram', 'type' => 'text'));
    // tumblr
    $social_tab->createOption(array('name' => 'tumblr', 'id' => 'bodhi_social_tumblr', 'type' => 'text'));
    // twitter
    $social_tab->createOption(array('name' => 'twitter', 'id' => 'bodhi_social_twitter', 'type' => 'text'));
    //====================================== //
    //============ Save Values ============= //
    //====================================== //
    $bodhi_options->createOption(array('type' => 'save'));
}
Ejemplo n.º 8
0
/**
 * [bootswatch_hook_callback description]
 */
function bootswatch_hook_callback()
{
    $hook = preg_replace('/^bootswatch_/', '', current_filter());
    $content = TitanFramework::getInstance('bootswatch')->getOption($hook);
    printf('<div class="%s">%s</div>', 'bootswatch_' . $hook, do_shortcode($content));
    // WPCS: XSS OK.
}
Ejemplo n.º 9
0
function cfc_options__custom_css()
{
    // Initialize Titan.
    $titan = TitanFramework::getInstance('cfc');
    /**
     * First Section & Panel Creation.
     *
     * Section: $cfc_sec_ccss
     * Panel  : CF7 Customizer
     *
     */
    $cfc_sec_ccss = $titan->createThemeCustomizerSection(array('name' => 'Custom CSS', 'panel' => 'CF7 Customizer'));
    /**
     * Note
     *
     */
    $cfc_sec_ccss->createOption(array('type' => 'note', 'desc' => 'Use this area to add custom CSS if you know what you are doing.'));
    /**
     * Option: Code Custom CSS.
     *
     * @since 1.0.1
     */
    if (file_exists(CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_code_custom_css.php')) {
        require_once CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_code_custom_css.php';
    }
    // End of cfc_options__custom_css()
}
Ejemplo n.º 10
0
 /**
  * Load Titan Framework.
  *
  * @link   http://www.titanframework.net/embedding-titan-framework-in-your-project/
  * @since  3.0.0
  */
 public function load_titan_framework()
 {
     /*
      * When using the embedded framework, use it only if the framework
      * plugin isn't activated.
      */
     // Don't do anything when we're activating a plugin to prevent errors
     // on redeclaring Titan classes
     if (!empty($_GET['action']) && !empty($_GET['plugin'])) {
         if ($_GET['action'] == 'activate') {
             return;
         }
     }
     // Check if the framework plugin is activated
     $useEmbeddedFramework = true;
     $activePlugins = get_option('active_plugins');
     if (is_array($activePlugins)) {
         foreach ($activePlugins as $plugin) {
             if (is_string($plugin)) {
                 if (stripos($plugin, '/titan-framework.php') !== false) {
                     $useEmbeddedFramework = false;
                     break;
                 }
             }
         }
     }
     // Use the embedded Titan Framework
     if ($useEmbeddedFramework && !class_exists('TitanFramework')) {
         require_once WPAS_PATH . 'vendor/gambitph/titan-framework/titan-framework.php';
     }
     /*
      * Start your Titan code below
      */
     $titan = TitanFramework::getInstance('wpas');
     $settings = $titan->createContainer(array('type' => 'admin-page', 'name' => __('Settings', 'awesome-support'), 'title' => __('Awesome Support Settings', 'awesome-support'), 'id' => 'wpas-settings', 'parent' => 'edit.php?post_type=ticket', 'capability' => 'settings_tickets'));
     /**
      * Get plugin core options
      * 
      * @var (array)
      * @see  admin/includes/settings.php
      */
     $options = wpas_get_settings();
     /* Parse options */
     foreach ($options as $tab => $content) {
         /* Add a new tab */
         $tab = $settings->createTab(array('name' => $content['name'], 'title' => isset($content['title']) ? $content['title'] : $content['name'], 'id' => $tab));
         /* Add all options to current tab */
         foreach ($content['options'] as $option) {
             $tab->createOption($option);
             if (isset($option['type']) && 'heading' === $option['type'] && isset($option['options']) && is_array($option['options'])) {
                 foreach ($option['options'] as $opt) {
                     $tab->createOption($opt);
                 }
             }
         }
         $tab->createOption(array('type' => 'save'));
     }
 }
Ejemplo n.º 11
0
function aa_metabox_options()
{
    // Initialize Titan with your theme name.
    $titan = TitanFramework::getInstance('neat');
    /**
     * First metabox.
     */
    $aa_metbox = $titan->createMetaBox(array('name' => 'Metabox Options', 'post_type' => array('page', 'post', 'my_custom_post_type')));
}
 public function loadUploaderScript()
 {
     wp_enqueue_media();
     wp_enqueue_script('tf-theme-customizer-admin', TitanFramework::getURL('js/admin.js', __FILE__));
     wp_enqueue_style('tf-admin-theme-customizer-styles', TitanFramework::getURL('css/admin.css', __FILE__));
     wp_enqueue_script('tf-theme-customizer-jquery.fileDownload', TitanFramework::getURL('js/jquery.fileDownload.js', __FILE__));
     wp_enqueue_script('tf-theme-customizer-serialize', TitanFramework::getURL('js/serialize.js', __FILE__));
     wp_enqueue_style('tf-admin-theme-customizer-styles', TitanFramework::getURL('css/admin-theme-customizer-styles.css', __FILE__));
 }
Ejemplo n.º 13
0
 /**
  * Enqueues the jQuery UI scripts
  *
  * @return	void
  * @since	1.4
  */
 public function enqueueDatepicker()
 {
     //		global $wp_scripts;
     //		$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
     //		wp_enqueue_style( 'jquery-ui-style', '//code.jquery.com/ui/' . $jquery_version . '/themes/smoothness/jquery-ui.css', array(), $jquery_version );
     wp_enqueue_script('jquery-ui-core');
     wp_enqueue_script('jquery-ui-slider');
     wp_enqueue_script('jquery-ui-datepicker');
     wp_enqueue_script('tf-jquery-ui-timepicker-addon', TitanFramework::getURL('js/jquery-ui-timepicker-addon.js', __FILE__), array('jquery-ui-datepicker', 'jquery-ui-slider'));
 }
function jg_custom_css()
{
    $titan = TitanFramework::getInstance('jg-one-page');
    ?>
	<style type="text/css">
		<?php 
    echo $titan->getOption('jg_custom_css');
    ?>
	</style>
	<?php 
}
function cfc_options__txt_bg()
{
    // Initialize Titan
    $titan = TitanFramework::getInstance('cfc');
    /**
     * First Section & Panel Creation
     *
     * Section: $cfc_sec_form_style
     * Panel  : CF7 Customizer
     *
     */
    $cfc_sec_form_txt_bg = $titan->createThemeCustomizerSection(array('name' => 'Form Text & BG Colors', 'panel' => 'CF7 Customizer'));
    /**
     * Note
     *
     */
    $cfc_sec_form_txt_bg->createOption(array('type' => 'note', 'desc' => 'Customize form\'s text color, background color, add a background image or change the font-size.'));
    /**
     * Option: Text Color
     *
     * @since 0.0.1
     *
     */
    if (file_exists(CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_txt_clr.php')) {
        require_once CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_txt_clr.php';
    }
    /**
     * Option: Background Color
     *
     * @since 0.0.1
     *
     */
    if (file_exists(CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_bg_clr.php')) {
        require_once CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_bg_clr.php';
    }
    /**
     * Option: Background Image
     *
     * @since 0.0.1
     *
     */
    if (file_exists(CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_bg_img.php')) {
        require_once CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_bg_img.php';
    }
    /**
     * Option: Font Size
     *
     * @since 0.0.1
     *
     */
    if (file_exists(CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_font_size.php')) {
        require_once CFC_DIR . '/assets/admin/inc/options/titan-framework-options/cfc_font_size.php';
    }
}
 function create_theme_option()
 {
     $titan = TitanFramework::getInstance('thim');
     $panel = $titan->createAdminPanel(array('name' => 'Import Demo'));
     //data demo tab
     $data_demo_tab = $panel->createTab(array('name' => 'Demo Data'));
     $data_demo_tab->createOption(array('type' => 'Import', 'import' => 'Import Demo'));
     // Post Format
     include 'meta-box/post-format.php';
     // Display Setting
     include 'meta-box/setting.php';
 }
Ejemplo n.º 17
0
/**
 * Initialize Titan & options here
 */
function regala_default_image_options()
{
    $titan = TitanFramework::getInstance('regala');
    /**
     *   Default featured images
     */
    $image = $titan->createThemeCustomizerSection(array('name' => __('Default Featured Images', 'regala'), 'desc' => __('Upload a photo that you want to use as Featured Image in your Posts/Pages', 'regala')));
    $image->createOption(array('name' => __('Image 1', 'regala'), 'id' => 'featured_image', 'type' => 'upload'));
    $image->createOption(array('name' => __('Image 2', 'regala'), 'id' => 'featured_image2', 'type' => 'upload'));
    $image->createOption(array('name' => __('Image 3', 'regala'), 'id' => 'featured_image3', 'type' => 'upload'));
    $image->createOption(array('name' => __('Image 4', 'regala'), 'id' => 'featured_image4', 'type' => 'upload'));
    $image->createOption(array('name' => __('Image 5', 'regala'), 'id' => 'featured_image5', 'type' => 'upload'));
}
Ejemplo n.º 18
0
 protected function checkValues($option)
 {
     $titan = TitanFramework::getInstance('testing');
     $id = $option->settings['id'];
     $this->assertEquals('#123456', $titan->getOption($id));
     $option->setValue('rgba(0,0,0,.5)');
     $titan->saveInternalAdminPageOptions();
     // Does nothing for non-admin options
     $this->assertEquals('rgba(0,0,0,.5)', $titan->getOption($id));
     $option->setValue('');
     $titan->saveInternalAdminPageOptions();
     // Does nothing for non-admin options
     $this->assertEquals('', $titan->getOption($id));
 }
Ejemplo n.º 19
0
/**
 * Inicializa y crear todas las opciones del plugin
 *
 * @return	void
 * @since	1.0
 */
function osp_blb_create_options()
{
    $titan = TitanFramework::getInstance(OSP_BLB_NAME);
    $titan->set('css', false);
    //ENCABEZADO DE LA PAGINA
    $panel = $titan->createAdminPanel(array('name' => __(OSP_BLB_NAME, OSP_BLB_HANDLER), 'parent' => 'options-general.php', 'desc' => __('Make all the settings to the appearance and functionality that you would like your personalize it to your taste ', OSP_BLB_HANDLER) . '"' . OSP_BLB_NAME . "'"));
    //**************************************************************************
    //**SECCIÓN: OPCIONES GENERALES*********************************************
    //**************************************************************************
    //ENCABEZADO DE SECCIÓN "Opciones Generales"
    $panel->createOption(array('name' => __('General Settings', OSP_BLB_HANDLER), 'type' => 'heading'));
    //ACTIVAR/DESACTICAR EL PLUGIN
    $panel->createOption(array('name' => __('Enable - ', OSP_BLB_HANDLER) . OSP_BLB_NAME, 'id' => 'enable', 'type' => 'enable', 'desc' => __('It permits you to activate or deactivate the appearance of the progress bar on the front-end of your website.', OSP_BLB_HANDLER), 'default' => false, "enabled" => __("Enabled", OSP_BLB_HANDLER), "disabled" => __("Disabled", OSP_BLB_HANDLER)));
    //MODO DE PRUEBA
    $panel->createOption(array('name' => '<div class="dashicons dashicons-admin-tools"></div>' . __('Test Mode', OSP_BLB_HANDLER), 'id' => 'testMode', 'type' => 'enable', 'desc' => __('It allows the test mode so that only the administrator can see the loading bar. This helps to observe the adjustments that the administrator is currently making with the plugin.', OSP_BLB_HANDLER), 'default' => false, "enabled" => __("Enabled", OSP_BLB_HANDLER), "disabled" => __("Disabled", OSP_BLB_HANDLER)));
    //NO OCULTAR LA BARRA DE PROGRESO
    $panel->createOption(array('name' => '<div class="dashicons dashicons-admin-tools"></div>' . __('Don’t Hide Bar Loading', OSP_BLB_HANDLER), 'id' => 'testMode_showBar', 'type' => 'enable', 'desc' => __('Keep the loading bar hidden until the page is 100% loaded. It is very useful in carrying out the necessary adjustments.', OSP_BLB_HANDLER), 'default' => false, "enabled" => __("Enabled", OSP_BLB_HANDLER), "disabled" => __("Disabled", OSP_BLB_HANDLER), "depends" => array("testMode" => true)));
    //GUARDAR DATOS
    osp_blb_options_save($panel);
    //**************************************************************************
    //**SECCIÓN: PROPIEDADES DE LA BARRA DE PROGRESO****************************
    //**************************************************************************
    //
    //ENCABEZADO DE SECCIÓN "PROPIEDADES DE LA BARRA DE PROGRESO"
    $panel->createOption(array('name' => __('Properties of the Loading Bar', OSP_BLB_HANDLER), 'type' => 'heading'));
    //***PROPIEDADES BARRA DE PROGRESO - BORDE DE PANTALLA*********************
    $properties_generals = array("animation" => array(__('Animation', OSP_BLB_HANDLER), __('Indicate the type of animation using the loading bar that appears on the screen.', OSP_BLB_HANDLER)), "position" => array(__('Position', OSP_BLB_HANDLER), __('Select the location where the border for the loading bar will appear. (Default: Top', OSP_BLB_HANDLER)), "color" => array(__('Color', OSP_BLB_HANDLER), __('Select the color of the loading bar. (Default: #FF0000)', OSP_BLB_HANDLER)), "wide" => array(__('Wide', OSP_BLB_HANDLER), __('Indicate the thickness of the loading bar. (Default: 20px)', OSP_BLB_HANDLER)), "direction" => array(__('Direction', OSP_BLB_HANDLER), __('Indicate the filling direction of the loading bar. That is to say, from where to where should the bar move. (Default: Normal)', OSP_BLB_HANDLER)), "opacity" => array(__('Opacity', OSP_BLB_HANDLER), __('Indicate the level of transparency of the loading bar. (Default: 100)', OSP_BLB_HANDLER)));
    //Muestra las propieades del indicador
    osp_blb_options_generals($panel, $properties_generals);
    //PROPIEDADES (BORDE)
    osp_blb_options_border($panel);
    //PROPIEDADES (SOMBRA)
    osp_blb_options_shadow($panel);
    //FONDO DE LA BARRA DE PROGRESO
    osp_blb_options_background($panel);
    //PROPIEDADES (FUENTE)
    osp_blb_options_font($panel);
    //**************************************************************************
    //**SECCIÓN: UBICACIONES****************************************************
    //**************************************************************************
    //
    osp_blb_options_locations($panel);
    //ENCABEZADO DE SECCIÓN "CSS PERSONALIZADO"
    $panel->createOption(array('name' => __('Custom CSS', OSP_BLB_HANDLER), 'type' => 'heading'));
    osp_blb_options_generals($panel, array("customCSS" => array(__('CSS Personalizado', OSP_BLB_HANDLER), __('If you want to custom "' . OSP_BLB_NAME . '" even more, you can write your own rules in the CSS. "' . OSP_BLB_NAME . '" the options under three main elements and they are the following:<br><ul>' . '<li><code>#' . OSP_BLB_PREFIX . 'loading-bar</code> - This is the progress bar.</li>' . '<li><code>#' . OSP_BLB_PREFIX . 'loading-bar-container</code> - This is the container that holds the progress bar.</li>' . '<li><code>#' . OSP_BLB_PREFIX . 'text</code> - This is the container where the contents of the text described by the administrator writes.</li>' . '</ul>', OSP_BLB_HANDLER))));
}
Ejemplo n.º 20
0
 public static function factory($settings, $owner)
 {
     $settings = array_merge(self::$defaultSettings, $settings);
     $className = 'TitanFrameworkOption' . str_replace(' ', '', ucwords(str_replace('-', ' ', $settings['type'])));
     // assume all the classes are already required
     if (!class_exists($className) && !class_exists($settings['type'])) {
         TitanFramework::displayFrameworkError(sprintf(__('Option type or extended class %s does not exist.', 'gossip'), '<code>' . $settings['type'] . '</code>', $settings), $settings);
         return null;
     }
     if (class_exists($className)) {
         $obj = new $className($settings, $owner);
         return $obj;
     }
     $className = $settings['type'];
     $obj = new $className($settings, $owner);
     return $obj;
 }
Ejemplo n.º 21
0
 /**
  * Loads Titan Framework.
  *
  * Titan Framework is used to handle all plugin options.
  *
  * @since 1.0.0
  */
 public function load_titan_framework()
 {
     // Don't do anything when we're activating a plugin to prevent errors
     // on redeclaring Titan classes
     if (!empty($_GET['action']) && !empty($_GET['plugin'])) {
         if ($_GET['action'] == 'activate') {
             return;
         }
     }
     // Check if the framework plugin is activated
     $useEmbeddedFramework = true;
     $activePlugins = get_option('active_plugins');
     if (is_array($activePlugins)) {
         foreach ($activePlugins as $plugin) {
             if (is_string($plugin)) {
                 if (stripos($plugin, '/titan-framework.php') !== false) {
                     $useEmbeddedFramework = false;
                     break;
                 }
             }
         }
     }
     // Use the embedded Titan Framework
     if ($useEmbeddedFramework && !class_exists('TitanFramework')) {
         require_once WPBO_PATH . 'vendor/gambitph/titan-framework/titan-framework.php';
     }
     /**
      * wpbo_before_load_titan hook
      */
     do_action('wpbo_before_load_titan');
     $this->titan = TitanFramework::getInstance('wpbo');
     $this->settings = $this->titan->createAdminPanel(array('name' => __('Settings', 'wpbo'), 'parent' => 'edit.php?post_type=wpbo-popup', 'position' => 999));
     /* Get all options */
     $options = $this->get_options();
     /* Iterate */
     foreach ($options as $tab => $content) {
         /* Add a new tab */
         $tab = $this->settings->createTab(array('name' => $content['name'], 'title' => isset($content['title']) ? $content['title'] : $content['name'], 'id' => $tab));
         /* Add all options to current tab */
         foreach ($content['options'] as $option) {
             $tab->createOption($option);
         }
         $tab->createOption(array('type' => 'save'));
     }
 }
Ejemplo n.º 22
0
 protected function checkValues($option)
 {
     $titan = TitanFramework::getInstance('testing');
     $id = $option->settings['id'];
     $this->assertEquals('default', $titan->getOption($id));
     $option->setValue('modified');
     $titan->saveInternalAdminPageOptions();
     // Does nothing for non-admin options
     $this->assertEquals('modified', $titan->getOption($id));
     $option->setValue('');
     $titan->saveInternalAdminPageOptions();
     // Does nothing for non-admin options
     $this->assertEquals('', $titan->getOption($id));
     $option->setValue('0');
     $titan->saveInternalAdminPageOptions();
     // Does nothing for non-admin options
     $this->assertEquals('0', $titan->getOption($id));
 }
 public function getAllOptions()
 {
     if (empty(self::$allOptions)) {
         self::$allOptions = array();
     }
     if (empty(self::$allOptions[$this->optionNamespace])) {
         self::$allOptions[$this->optionNamespace] = array();
     } else {
         return self::$allOptions[$this->optionNamespace];
     }
     // Check if we have options saved already
     $currentOptions = get_option($this->optionNamespace . '_options');
     // Put all the available options in our global variable for future checking
     if (!empty($currentOptions) && !count(self::$allOptions[$this->optionNamespace])) {
         self::$allOptions[$this->optionNamespace] = unserialize($currentOptions);
     }
     return self::$allOptions[$this->optionNamespace];
 }
Ejemplo n.º 24
0
function bodhi_yoga_create_metabox()
{
    // Get Framework Instance
    $bodhi_yoga = TitanFramework::getInstance('bodhi-yoga');
    //================================= //
    //======== Theme Meta Box ========= //
    //================================= //
    $page_meta = $bodhi_yoga->createMetaBox(array('name' => 'Page Metabox'));
    $teacher_meta = $bodhi_yoga->createMetaBox(array('name' => 'Become Teacher Metabox', 'post_type' => 'training'));
    $testimonial_meta = $bodhi_yoga->createMetaBox(array('name' => 'Testimonial Metabox', 'post_type' => 'testimonial'));
    $teachers_meta = $bodhi_yoga->createMetaBox(array('name' => 'Teacher Metabox', 'post_type' => 'teacher'));
    //========================================= //
    //========== Page Metabox Start =========== //
    //========================================= //
    // hide page title
    $page_meta->createOption(array('name' => 'Hide Page Title', 'id' => 'bodhi_toggle_page_title', 'type' => 'checkbox', 'default' => false));
    $page_meta->createOption(array('name' => 'Bodhi Yoga Owner', 'id' => 'bodhi_owner_meta', 'type' => 'text', 'default' => 'Marcus Julian Felicetti'));
    $page_meta->createOption(array('name' => 'Bodhi Yoga Founder', 'id' => 'bodhi_founder_meta', 'type' => 'text', 'default' => 'Founder, Director, Primary Teacher'));
    $page_meta->createOption(array('name' => 'Page Sub Heading', 'id' => 'bodhi_page_subheading', 'type' => 'text', 'default' => ''));
    $page_meta->createOption(array('name' => 'Register Button URL', 'id' => 'bodhi_register_button_url', 'type' => 'text', 'default' => ''));
    //============================================= //
    //========== Training Metabox Start =========== //
    //============================================= //
    // teacher trainig heading
    $teacher_meta->createOption(array('name' => 'Teacher Training Heading', 'id' => 'bodhi_teacher_training_heading', 'type' => 'text'));
    // teacher trainig sub heading
    $teacher_meta->createOption(array('name' => 'Teacher Training Sub Heading', 'id' => 'bodhi_teacher_training_subheading', 'type' => 'text'));
    // teacher trainig Location
    $teacher_meta->createOption(array('name' => 'Teacher Training Location', 'id' => 'bodhi_teacher_training_location', 'type' => 'text'));
    // teacher training start date
    $teacher_meta->createOption(array('name' => 'Training Start Date', 'id' => 'bodhi_teacher_training_sdate', 'type' => 'date', 'desc' => 'Choose a starte date', 'default' => '2015-10-10'));
    // teacher training end date
    $teacher_meta->createOption(array('name' => 'Training Start Date', 'id' => 'bodhi_teacher_training_edate', 'type' => 'date', 'desc' => 'Choose a End date', 'default' => ''));
    //================================================ //
    //========== Testimonial Metabox Start =========== //
    //================================================ //
    // testimonial author
    $testimonial_meta->createOption(array('name' => 'Testimonial Author Meta', 'id' => 'bodhi_testimonial_author_meta', 'type' => 'text'));
    //================================================ //
    //========== Teacher Metabox Start =========== //
    //================================================ //
    // teacher trainig heading
    $teachers_meta->createOption(array('name' => 'Teacher Meta', 'id' => 'bodhi_teacher_meta', 'type' => 'text'));
}
Ejemplo n.º 25
0
function polimed_options_creating_function()
{
    // Initialize Titan with your theme name.
    $titan = TitanFramework::getInstance('polimed');
    /**
     * First Admin panel.
     */
    /**
     * Create admin panel options page called `$aa_panel`.
     *
     * This is a first admin panel and is called by its name i.e. `$aa_panel`.
     */
    $polimed_panel = $titan->createAdminPanel(array('name' => 'Polimed'));
    $polimed_panel_tab1 = $polimed_panel->createTab(array('name' => 'Tab 1'));
    /**
     * Create the options.
     *
     * Now we will create options for our panel that we just created called `$aa_panel`.
     */
    $polimed_panel_tab1->createOption(array('id' => 'aa_txt', 'type' => 'text', 'name' => 'My Text Option', 'desc' => 'This is our option'));
    /**
     * Save button for options.
     *
     * When creating admin panel options, use this code to add an option "Save" button
     * since there is no other way for user to save the options.Your users can now save
     * (and reset) the options we just created.
     */
    $polimed_panel_tab1->createOption(array('type' => 'save'));
    /**
     * 
     * Create second tab.
     * 
     */
    $polimed_panel_tab2 = $polimed_panel->createTab(array('name' => 'Tab 2'));
    // Create options inside tab2.
    $polimed_panel_tab2->createOption(array('id' => 'aa_txtarea_in_tab2_panel2', 'type' => 'textarea', 'name' => 'My Text Area', 'desc' => 'This is our option'));
    /**
     * Save button for options.
     */
    $polimed_panel_tab2->createOption(array('type' => 'save'));
}
Ejemplo n.º 26
0
 /**
  * Ajax handler for generating CSS based on the existing options with values changed to
  * match the customizer modified values.
  *
  * @since 1.9.2
  *
  * @return void
  */
 public function ajaxGenerateCustomizerCSS()
 {
     // This value is passed back to the live preview ajax handler in $this->livePreviewMainScript()
     $generated = array('css' => '');
     foreach (TitanFramework::getAllInstances() as $framework) {
         // Modify the values of the options for the generation of CSS with the values from the customizer $_POST.
         $namespace = $framework->optionNamespace;
         add_filter("tf_pre_get_value_{$namespace}", array($this, 'useCustomizerModifiedValue'), 10, 3);
         // Generate our new CSS based on the customizer values
         $css = $framework->cssInstance->generateCSS();
         $generated['css'] .= $css;
         /**
          * Allow options to add customizer live preview parameters. The tf_generate_customizer_preview_js hook allows for manipulating these values.
          *
          * @since 1.9.2
          *
          * @see tf_generate_customizer_preview_js
          */
         $generated = apply_filters("tf_generate_customizer_preview_css_{$namespace}", $generated);
     }
     wp_send_json_success($generated);
 }
Ejemplo n.º 27
0
/**
 * Retorna un Script con el constructor de un objeto Jquery con los parametros establecidos por el usuarios para crear la barra de progreso en pantalla
 *
 * @return	String
 * @since	1.0
 */
function osp_blb_getScript()
{
    $titan = TitanFramework::getInstance(OSP_BLB_NAME);
    //Obtiene las propiedades
    $position = $titan->getOption(OSP_BLB_ID . "_position");
    $direction = osp_blb_converterBoolean($titan->getOption(OSP_BLB_ID . "_direction"));
    $color = osp_blb_hex2rgb($titan->getOption(OSP_BLB_ID . "_color"));
    $wide = $titan->getOption(OSP_BLB_ID . "_wide");
    $opacity = intval($titan->getOption(OSP_BLB_ID . "_opacity")) / 100;
    $shadow = osp_blb_converterBoolean($titan->getOption(OSP_BLB_ID . "_shadow"));
    $shadowScope = osp_blb_converterBoolean($titan->getOption(OSP_BLB_ID . "_shadowScope"));
    $shadowColor = osp_blb_hex2rgb($titan->getOption(OSP_BLB_ID . "_shadowColor"));
    $shadowPosX = $titan->getOption(OSP_BLB_ID . "_shadowPosX");
    $shadowPosY = $titan->getOption(OSP_BLB_ID . "_shadowPosY");
    $shadowDith = $titan->getOption(OSP_BLB_ID . "_shadowDith");
    $shadowSpread = $titan->getOption(OSP_BLB_ID . "_shadowSpread");
    $shadowOpacity = $titan->getOption(OSP_BLB_ID . "_shadowOpacity") / 100;
    $border = osp_blb_converterBoolean($titan->getOption(OSP_BLB_ID . "_border"));
    $borderColor = osp_blb_hex2rgb($titan->getOption(OSP_BLB_ID . "_borderColor"));
    $borderWidth = $titan->getOption(OSP_BLB_ID . "_borderWidth");
    $borderVisibility = $titan->getOption(OSP_BLB_ID . "_borderVisibility");
    $borderRadius = $titan->getOption(OSP_BLB_ID . "_borderRadius");
    $borderStyle = $titan->getOption(OSP_BLB_ID . "_borderStyle");
    $borderOpacity = $titan->getOption(OSP_BLB_ID . "_borderOpacity") / 100;
    $font = osp_blb_converterBoolean($titan->getOption(OSP_BLB_ID . "_font"));
    $fontStyle = $titan->getOption(OSP_BLB_ID . "_fontStyle");
    $fontAlignH = $titan->getOption(OSP_BLB_ID . "_fontAlignH");
    $fontAlignV = $titan->getOption(OSP_BLB_ID . "_fontAlignV");
    $fontOrient = $titan->getOption(OSP_BLB_ID . "_fontOrient");
    $fontText = osp_blb_formatText($titan->getOption(OSP_BLB_ID . "_fontText"));
    $animation = $titan->getOption(OSP_BLB_ID . "_animation");
    $background = osp_blb_converterBoolean($titan->getOption(OSP_BLB_ID . "_background"));
    $backgroundColor = $titan->getOption(OSP_BLB_ID . "_backgroundColor");
    //MODO DE PRUEBAS
    $testMode = osp_blb_converterBoolean($titan->getOption("testMode"));
    $testModeShowBar = osp_blb_converterBoolean($titan->getOption("testMode_showBar"));
    return "jQuery().borderLoadingBar({" . "position:\"{$position}\"," . "direction:{$direction}," . "color:\"rgba(" . $color[0] . "," . $color[1] . "," . $color[2] . "," . $opacity . ")\"," . "wide:{$wide}," . "opacity:{$opacity}," . "shadow:{$shadow}," . "shadowColor:\"rgba(" . $shadowColor[0] . "," . $shadowColor[1] . "," . $shadowColor[2] . "," . $shadowOpacity . ")\"," . "shadowScope:" . $shadowScope . "," . "shadowPosX:{$shadowPosX}," . "shadowPosY:{$shadowPosY}," . "shadowDith:{$shadowDith}," . "shadowSpread:{$shadowSpread}," . "border: {$border}," . "borderColor:\"rgba(" . $borderColor[0] . "," . $borderColor[1] . "," . $borderColor[2] . "," . $borderOpacity . ")\"," . "borderWidth: {$borderWidth}," . "borderVisibility: [\"" . implode("\",\"", $borderVisibility) . "\"]," . "borderRadius: {$borderRadius}," . "borderStyle: \"{$borderStyle}\"," . "borderOpacity: {$borderOpacity}," . "font: {$font}," . "fontStyle: [\"" . implode("\",\"", $fontStyle) . "\"]," . "fontAlignH: \"{$fontAlignH}\"," . "fontAlignV: \"{$fontAlignV}\"," . "fontOrient:{$fontOrient}," . "fontText:\"" . $fontText . "\"," . "animation:" . $animation . "," . "background:" . $background . "," . "backgroundColor:\"" . $backgroundColor . "\"" . "}," . "{mode:{$testMode}," . "showBar:{$testModeShowBar}" . "});";
}
Ejemplo n.º 28
0
function ll_customizer_options_logo()
{
    // Initialize Titan
    $aa_tf = TitanFramework::getInstance('ll');
    /**
     * Logo Section & Panel Creation
     *
     * Section: $ll_section_logo
     * Panel  :  LoadingLogo Customizer
     *
     */
    $ll_section_logo = $aa_tf->createThemeCustomizerSection(array('name' => 'Logo', 'panel' => 'LoadingLogo'));
    /**
     * Note
     *
     */
    $ll_section_logo->createOption(array('type' => 'note', 'desc' => 'Customize the logo, width, animation overlay or filter.'));
    /**
     * Option: Logo Image
     *
     * @since 0.0.1
     *
     */
    if (file_exists(LL_DIR . '/assets/admin/inc/options/titan-framework-options/ll_option_logo.php')) {
        require_once LL_DIR . '/assets/admin/inc/options/titan-framework-options/ll_option_logo.php';
    }
    /**
     * Option: Logo Width
     *
     * @since 0.0.1
     *
     */
    if (file_exists(LL_DIR . '/assets/admin/inc/options/titan-framework-options/ll_option_logo_width.php')) {
        require_once LL_DIR . '/assets/admin/inc/options/titan-framework-options/ll_option_logo_width.php';
    }
}
Ejemplo n.º 29
0
<?php

if (class_exists('TitanFramework')) {
    $titan = TitanFramework::getInstance('wp_dg');
    /**
     * Home page settings
     */
    $adminPanel = $titan->createAdminPanel(array('name' => __('Doreen Options', 'dcastalia'), 'id' => 'doreen-options'));
    /* General settings */
    $generalTab = $adminPanel->createTab(array('name' => __('General', 'dcastalia')));
    $generalTab->createOption(array('type' => 'save'));
    $generalTab->createOption(array('name' => __('Header', 'dcastalia'), 'type' => 'heading'));
    $generalTab->createOption(array('name' => __('Career Link', 'dcastalia'), 'id' => 'career_link', 'type' => 'text', 'desc' => __('Enter career button link with http://', 'dcastalia')));
    $generalTab->createOption(array('name' => __('Download Link', 'dcastalia'), 'id' => 'download_link', 'type' => 'text', 'desc' => __('Enter download button link with http://', 'dcastalia')));
    $generalTab->createOption(array('name' => __('Footer', 'dcastalia'), 'type' => 'heading'));
    $generalTab->createOption(array('name' => __('Copyright Info', 'dcastalia'), 'id' => 'copy_info', 'type' => 'editor', 'desc' => __('Enter copyright information', 'dcastalia')));
    $generalTab->createOption(array('type' => 'save'));
    $homeTab = $adminPanel->createTab(array('name' => __('Featured', 'dcastalia')));
    $homeTab->createOption(array('type' => 'save'));
    // Featured
    for ($i = 1; $i <= 10; $i++) {
        $homeTab->createOption(array('name' => __('Featured Item ' . $i, 'dcastalia'), 'type' => 'heading'));
        $homeTab->createOption(array('name' => __('Overlay Color', 'dcastalia'), 'id' => 'feat' . $i . '_color', 'type' => 'color', 'desc' => __('Item overlay color', 'dcastalia'), 'default' => '#26292C'));
        $homeTab->createOption(array('name' => __('Background Image', 'dcastalia'), 'id' => 'feat' . $i . '_img', 'type' => 'upload', 'desc' => __('Upload image', 'dcastalia'), 'size' => 'full'));
        $homeTab->createOption(array('name' => __('Header Text (Bold)', 'dcastalia'), 'id' => 'feat' . $i . '_title1_text', 'type' => 'text', 'desc' => __('Enter heading text', 'dcastalia')));
        $homeTab->createOption(array('name' => __('Header Text (Light)', 'dcastalia'), 'id' => 'feat' . $i . '_title2_text', 'type' => 'text', 'desc' => __('Enter heading text', 'dcastalia')));
        $homeTab->createOption(array('name' => __('Subheader Text', 'dcastalia'), 'id' => 'feat' . $i . '_sub_text', 'type' => 'text', 'desc' => __('Enter subheading text', 'dcastalia')));
        $homeTab->createOption(array('name' => __('Item Link', 'dcastalia'), 'id' => 'feat' . $i . '_link', 'type' => 'text', 'desc' => __('Item hyperlink with http://', 'dcastalia')));
    }
    $homeTab->createOption(array('type' => 'save'));
    /* Parallax */
$titan = TitanFramework::getInstance('dinamarca');
if ($titan->getOption('show_services')) {
    ?>
    <?php 
    get_template_part('template-parts/index', 'services');
}
?>

<?php 
// Load Testimonials
$titan = TitanFramework::getInstance('dinamarca');
if ($titan->getOption('show_testimonials')) {
    ?>
    <?php 
    get_template_part('template-parts/index', 'testimonials');
}
?>

<?php 
// Load Blog
$titan = TitanFramework::getInstance('dinamarca');
if ($titan->getOption('show_blog')) {
    ?>
    <?php 
    get_template_part('template-parts/index', 'blog');
}
?>


<?php 
get_footer();