예제 #1
0
    function widget($args, $instance)
    {
        extract($args);
        $this->setInstances($instance, 'filter');
        echo $before_widget;
        if (DfdThemeSettings::get('custom_logo_image')) {
            ?>
			<div class="logo">
				<a href="<?php 
            echo home_url();
            ?>
/">
					<img src="<?php 
            echo DfdThemeSettings::get('custom_logo_image');
            ?>
" alt="<?php 
            bloginfo('name');
            ?>
">
				</a>
			</div>
		<?php 
        }
        echo $after_widget;
    }
예제 #2
0
 function dfd_site_preloader_html()
 {
     if (strcmp(DfdThemeSettings::get('site_preloader_enabled'), '1') === 0) {
         if (DfdThemeSettings::get("custom_logo_image")) {
             echo '<img id="qLoverlay_logo" src="' . DfdThemeSettings::get("custom_logo_image") . '" style="display: none" alt="" />';
         }
         echo '<div id="qLoverlay">';
         if (DfdThemeSettings::get("site_preloader_logo_1") && DfdThemeSettings::get("site_preloader_logo_2")) {
             $logo_1 = DfdThemeSettings::get("site_preloader_logo_1");
             $logo_2 = DfdThemeSettings::get("site_preloader_logo_2");
             if (getimagesize($logo_1) && getimagesize($logo_2)) {
                 list($logo_1_w, $logo_1_h) = getimagesize($logo_1);
                 list($logo_2_w, $logo_2_h) = getimagesize($logo_2);
                 $logo_w = min($logo_1_w, $logo_2_w);
                 $logo_h = min($logo_1_h, $logo_2_h);
                 $img1 = '<img src="' . $logo_1 . '" width="' . $logo_w . '" height="' . $logo_h . '" alt="" />';
                 $img2 = '<img src="' . $logo_2 . '" width="' . $logo_w . '" height="' . $logo_h . '" alt="" />';
                 echo '<div id="qLbar_wrap" style="width:' . $logo_w . 'px; height:' . $logo_h . 'px; margin-top: -' . ceil($logo_h / 2) . 'px;">';
                 echo '<div id="qLbar" style="width: 0%">' . $img1 . '</div>' . '<div id="qLbar_bg">' . $img2 . '</div>';
                 echo '</div>';
                 echo '<div id="qLbar_wrap_label">Theme is loading...</div>';
             }
         }
         echo '<div id="qLpercentage"></div></div>';
     }
 }
예제 #3
0
 public function loadOptions()
 {
     $this->screen_name = DfdThemeSettings::get('username');
     $this->oauth_access_token = DfdThemeSettings::get('twiiter_acc_t');
     $this->oauth_access_token_secret = DfdThemeSettings::get('twiiter_acc_t_s');
     $this->consumer_key = DfdThemeSettings::get('twiiter_consumer');
     $this->consumer_secret = DfdThemeSettings::get('twiiter_con_s');
     $this->numTweets = (int) DfdThemeSettings::get("numb_lat_tw");
     $this->cachetime = (int) DfdThemeSettings::get("cachetime") * 60;
     $this->transName = 'list-tweets';
     // Name of value in database.
     $this->backupName = $this->transName . '-backup';
     $this->backupTime = $this->transName . '-backup-time';
 }
예제 #4
0
function sb_updated_theme_option($option, $old_value, $value)
{
    if ($option === DFD_THEME_SETTINGS_NAME) {
        DfdThemeSettings::reloadInstance();
        WP_Filesystem();
        global $wp_filesystem;
        /** Capture variables.less output **/
        ob_start();
        require locate_template('/options/options/variables_less.php');
        $variables_less = ob_get_clean();
        $variables_less_uploads_file = locate_template('/assets/less.lib/_generated/variables.less');
        if (!$wp_filesystem->put_contents($variables_less_uploads_file, $variables_less, 0644)) {
            file_put_contents($variables_less_uploads_file, $variables_less);
        }
        $colors_old_value = array('main_site_color' => isset($old_value['main_site_color']) ? $old_value['main_site_color'] : '', 'secondary_site_color' => isset($old_value['secondary_site_color']) ? $old_value['secondary_site_color'] : '', 'font_site_color' => isset($old_value['font_site_color']) ? $old_value['font_site_color'] : '', 'link_site_color' => isset($old_value['link_site_color']) ? $old_value['link_site_color'] : '', 'third_site_color' => isset($old_value['third_site_color']) ? $old_value['third_site_color'] : '', 'header_background_color' => isset($old_value['header_background_color']) ? $old_value['header_background_color'] : '', 'fixed_header_background_color' => isset($old_value['fixed_header_background_color']) ? $old_value['fixed_header_background_color'] : '', 'fixed_header_background_opacity' => isset($old_value['fixed_header_background_opacity']) ? $old_value['fixed_header_background_opacity'] : '', 'news_page_slider_background_hover' => isset($old_value['news_page_slider_background_hover']) ? $old_value['news_page_slider_background_hover'] : '', 'news_page_slider_opacity_hover' => isset($old_value['news_page_slider_opacity_hover']) ? $old_value['news_page_slider_opacity_hover'] : '', 'read_more_color' => isset($old_value['read_more_color']) ? $old_value['read_more_color'] : '', 'button_bg_color' => isset($old_value['button_bg_color']) ? $old_value['button_bg_color'] : '');
        $colors_new_value = array('main_site_color' => isset($value['main_site_color']) ? $value['main_site_color'] : '', 'secondary_site_color' => isset($value['secondary_site_color']) ? $value['secondary_site_color'] : '', 'font_site_color' => isset($value['font_site_color']) ? $value['font_site_color'] : '', 'link_site_color' => isset($value['link_site_color']) ? $value['link_site_color'] : '', 'third_site_color' => isset($value['third_site_color']) ? $value['third_site_color'] : '', 'header_background_color' => isset($value['header_background_color']) ? $value['header_background_color'] : '', 'fixed_header_background_color' => isset($value['fixed_header_background_color']) ? $value['fixed_header_background_color'] : '', 'fixed_header_background_opacity' => isset($value['fixed_header_background_opacity']) ? $value['fixed_header_background_opacity'] : '', 'news_page_slider_background_hover' => isset($value['news_page_slider_background_hover']) ? $value['news_page_slider_background_hover'] : '', 'news_page_slider_opacity_hover' => isset($value['news_page_slider_opacity_hover']) ? $value['news_page_slider_opacity_hover'] : '', 'read_more_color' => isset($value['read_more_color']) ? $value['read_more_color'] : '', 'button_bg_color' => isset($value['button_bg_color']) ? $value['button_bg_color'] : '');
        if ($colors_old_value !== $colors_new_value) {
            if (!class_exists('lessc')) {
                if (!file_exists(get_template_directory() . '/inc/lessc.inc.php')) {
                    return false;
                }
                require get_template_directory() . '/inc/lessc.inc.php';
            }
            try {
                $less = new lessc();
                $less->setFormatter('compressed');
                $less->compileFile(get_template_directory() . '/assets/less/app.less', get_template_directory() . '/assets/css/app.css');
                unset($less);
            } catch (Exception $ex) {
                set_transient('redux-opts-exceptions-kadabra', array('Less compile error: ' . $ex->getMessage()), 1000);
            }
            try {
                $less = new lessc();
                $less->setFormatter('compressed');
                if (is_plugin_active('woocommerce/woocommerce.php')) {
                    $less->compileFile(get_template_directory() . '/assets/less/woocommerce.less', get_template_directory() . '/assets/css/woocommerce.css');
                }
                unset($less);
            } catch (Exception $ex) {
                set_transient('redux-opts-exceptions-kadabra', array('Less compile error: ' . $ex->getMessage()), 1000);
            }
        }
    }
}
예제 #5
0
<?php

add_action('init', 'cmb_initialize_cmb_meta_boxes', 9999);
/**
 * Initialize the metabox class.
 */
function cmb_initialize_cmb_meta_boxes()
{
    if (!class_exists('cmb_Meta_Box')) {
        require_once locate_template('/inc/lib/metabox/init.php');
    }
}
require_once 'page-boxes.php';
require_once 'post-boxes.php';
if (DfdThemeSettings::get('stan_header')) {
    require_once 'headers-boxes.php';
}
require_once dirname(__FILE__) . '/features-boxes.php';
require_once dirname(__FILE__) . '/testimonial-boxes.php';
require_once dirname(__FILE__) . '/portfolio-boxes.php';
require_once dirname(__FILE__) . '/custom-sidebar.php';
require_once dirname(__FILE__) . '/custom-headers.php';
require_once dirname(__FILE__) . '/timeline-boxes.php';
require_once dirname(__FILE__) . '/product-boxes.php';
예제 #6
0
		<ul>
			<?php 
    function dfd_language_selector_flags()
    {
        if (function_exists('icl_get_languages')) {
            $languages = icl_get_languages('skip_missing=0&orderby=code');
            if (!empty($languages)) {
                foreach ($languages as $l) {
                    echo '<li>';
                    echo '<a href="' . $l['url'] . '">';
                    echo $l['translated_name'];
                    echo '</a>';
                    echo '</li>';
                }
            }
        }
    }
    dfd_language_selector_flags();
    ?>
		</ul>
	<?php 
} elseif (DfdThemeSettings::get("lang_shortcode")) {
    ?>
		<?php 
    echo do_shortcode(DfdThemeSettings::get("lang_shortcode"));
    ?>
	<?php 
}
?>
</div>
예제 #7
0
파일: single.php 프로젝트: sabdev1/sabljc
				</div>

				<?php 
    wp_link_pages(array('before' => '<nav class="page-nav"><p>' . __('Pages:', 'dfd'), 'after' => '</p></nav>'));
    ?>
				
				<?php 
    get_template_part('templates/entry-meta-post');
    ?>

            </article>

        <?php 
}
?>
		
		

        <?php 
if (strcmp(DfdThemeSettings::get("autor_box_disp"), '1') === 0) {
    get_template_part('templates/author-box');
}
comments_template();
set_layout('single', false);
?>

    </div>
</section>

    ?>
" alt="<?php 
    bloginfo('name');
    ?>
" data-retina="<?php 
    echo $custom_retina_logo_image_second;
    ?>
" data-retina_w="<?php 
    echo $logo_image_second_w;
    ?>
" data-retina_h="<?php 
    echo $logo_image_second_h;
    ?>
" />
			<img class="fixed-show" src="<?php 
    echo DfdThemeSettings::get('custom_logo_image');
    ?>
" alt="<?php 
    bloginfo('name');
    ?>
" data-retina="<?php 
    echo $custom_retina_logo_image;
    ?>
" data-retina_w="<?php 
    echo $logo_image_w;
    ?>
" data-retina_h="<?php 
    echo $logo_image_h;
    ?>
" />
		</a>
예제 #9
0
}
if (DfdThemeSettings::get("footer_bg_color")) {
    echo '#footer{ background-color: ' . DfdThemeSettings::get("footer_bg_color") . '} ';
}
if (DfdThemeSettings::get("footer_bg_image")) {
    echo '#footer{ background-image: url("' . DfdThemeSettings::get("footer_bg_image") . '")} ';
}
if (DfdThemeSettings::get("footer_custom_repeat")) {
    echo '#footer{ background-repeat: ' . DfdThemeSettings::get("footer_custom_repeat") . '} ';
}
// sub footer
if (DfdThemeSettings::get("sub_footer_font_color")) {
    echo '#sub-footer, #sub-footer a, #sub-footer .footer-menu { color: ' . DfdThemeSettings::get("sub_footer_font_color") . ' !important; } ';
}
if (DfdThemeSettings::get("sub_footer_bg_color")) {
    echo '#sub-footer { background-color: ' . DfdThemeSettings::get("sub_footer_bg_color") . ' !important; } ';
}
if (DfdThemeSettings::get("sub_footer_bg_image")) {
    echo '#sub-footer { background-image: url("' . DfdThemeSettings::get("sub_footer_bg_image") . '") !important; } ';
}
if (!DfdThemeSettings::get("sub_footer_bg_image") && !DfdThemeSettings::get("sub_footer_bg_color")) {
    echo '#sub-footer { background-image: url("../assets/img/sub.jpg") !important; background-color: rgba(0, 0, 0, 0); } ';
}
if (DfdThemeSettings::get("sub_footer_custom_repeat")) {
    echo '#sub-footer { background-repeat: ' . DfdThemeSettings::get("sub_footer_custom_repeat") . ' !important; } ';
}
/*
 * Custom CSS
 */
echo DfdThemeSettings::get("custom_css");
예제 #10
0
 /**
  * Enqueue front scripts and styles
  * @global obj $woocommerce
  */
 function dfd_kadabra_scripts()
 {
     /*
      * Css styles
      */
     wp_enqueue_style('dfd_preloader_indicator', get_template_directory_uri() . '/assets/css/site-preloader.css');
     wp_enqueue_style('main-style', get_stylesheet_uri());
     wp_register_script('dfd_queryloader2', get_template_directory_uri() . '/assets/js/jquery.queryloader2.js', array('jquery'), '2', false);
     wp_register_style('dfd_preloader_style', get_template_directory_uri() . '/assets/css/preloader.css', false, null);
     wp_register_style('dfd_site_style', get_template_directory_uri() . '/assets/css/app.css', false, null);
     wp_enqueue_style('dfd_preloader_style');
     wp_enqueue_style('dfd_site_style');
     /**
      * Check if WooCommerce is active
      * */
     if (is_plugin_active('woocommerce/woocommerce.php')) {
         wp_register_style('dfd_wocommerce_style', get_template_directory_uri() . '/assets/css/woocommerce.css', false, null);
         wp_enqueue_style('dfd_wocommerce_style');
         global $woocommerce;
         if (intval($woocommerce->version) >= 2) {
             wp_deregister_script('wc-add-to-cart-variation');
             wp_register_script('wc-add-to-cart-variation', get_template_directory_uri() . '/assets/js/woocommerce/add-to-cart-variation.js', array('jquery'), $woocommerce->version, true);
         }
     }
     /* TODO: move to less */
     wp_enqueue_style('crum_effects', get_template_directory_uri() . '/assets/css/animate-custom.css', false, null);
     wp_enqueue_style('crum_bbpress', get_template_directory_uri() . '/assets/css/bbpress.css', false, null);
     wp_enqueue_style('isotope_style', get_template_directory_uri() . '/assets/css/jquery.isotope.css', false, null);
     wp_enqueue_style('prettyphoto_style', get_template_directory_uri() . '/assets/css/prettyPhoto.css', false, null);
     /*********** ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ *********/
     wp_enqueue_style('flexslider_style', get_template_directory_uri() . '/assets/css/flexslider.css', false, null);
     wp_enqueue_style('crum_theme_options', get_template_directory_uri() . '/css/options.css', false, null);
     /*
      * JS register
      */
     wp_register_script('crum_foundation', get_template_directory_uri() . '/assets/js/foundation.min.js', false, null, true);
     wp_register_script('crum_effects', get_template_directory_uri() . '/assets/js/animation.js', false, null, true);
     wp_register_script('dfd_slide_parallax', get_template_directory_uri() . '/assets/js/jquery.slide_parallax.js', false, null, true);
     wp_register_script('smooth-scroll', get_template_directory_uri() . '/assets/js/jquery.smothscroll.min.js', false, '1.4.11', true);
     wp_register_script('crum_main', get_template_directory_uri() . '/assets/js/app.js', false, null, true);
     wp_register_script('isotope', get_template_directory_uri() . '/assets/js/jquery.isotope.min.js', false, null, true);
     wp_register_script('isotope_recenworks', get_template_directory_uri() . '/assets/js/jquery.isotope.recentworks.js', false, null, true);
     wp_register_script('isotope-run-2col', get_template_directory_uri() . '/assets/js/jquery.isotope.2col.run.js', false, null, true);
     wp_register_script('isotope-run-3col', get_template_directory_uri() . '/assets/js/jquery.isotope.3col.run.js', false, null, true);
     wp_register_script('isotope-run-4col', get_template_directory_uri() . '/assets/js/jquery.isotope.4col.run.js', false, null, true);
     wp_register_script('masonry', get_template_directory_uri() . '/assets/js/jquery.masonry.min.js', true, null, false);
     wp_deregister_script('flexslider');
     wp_register_script('flexslider', get_template_directory_uri() . '/assets/js/jquery.flexslider-min.js', false, null, false);
     wp_register_script('jcarousel', get_template_directory_uri() . '/assets/js/jquery.jcarousel.min.js', false, null, false);
     if (!wp_script_is('themepunchtools') && !wp_script_is('revslider-jquery.themepunch.plugins.min')) {
         wp_register_script('hammer', get_template_directory_uri() . '/assets/js/hammer.min.js', false, null, false);
     }
     wp_register_script('jCarouselSwipe', get_template_directory_uri() . '/assets/js/jCarouselSwipe.min.js', array('jcarousel', 'crum_foundation'), null, false);
     wp_register_script('gmaps', '//maps.google.com/maps/api/js?sensor=false', false, null, false);
     wp_register_script('gmap3', get_template_directory_uri() . '/assets/js/gmap3.min.js', false, null, true);
     wp_register_script('prettyphoto', get_template_directory_uri() . '/assets/js/jquery.prettyPhoto.js', false, null, true);
     wp_register_script('qr_code', get_template_directory_uri() . '/assets/js/qrcode.min.js', false, null, true);
     wp_register_script('custom-share', get_template_directory_uri() . '/assets/js/jquery.sharrre.js', array('jquery'), '1.3.5', true);
     wp_register_script('feature-image-box-transform', get_template_directory_uri() . '/assets/js/jquery.feature-image-box-transform.js', false, null, true);
     wp_register_script('vertical_js', get_template_directory_uri() . '/assets/js/vertical.js', false, null, false);
     wp_register_script('woocommerce_hack', get_template_directory_uri() . '/assets/js/woocommerce_hack.js', false, null, false);
     wp_register_script('dropdown', get_template_directory_uri() . '/assets/js/dropdown.js', false, null, true);
     wp_register_script('dropkick', get_template_directory_uri() . '/assets/js/jquery.dropkick-min.js', false, null, true);
     // Audioplayer
     wp_register_script('js-audio', get_template_directory_uri() . '/assets/js/audioplayer.js', false, null, true);
     wp_register_script('js-audio-run', get_template_directory_uri() . '/assets/js/audioplayer.run.js', false, null, true);
     // Video Player
     wp_register_script('dfd_self_hosted_videos_js', '//vjs.zencdn.net/c/video.js');
     wp_register_style('dfd_self_hosted_videos_css', '//vjs.zencdn.net/c/video-js.css');
     // Facebook Widget
     wp_register_script('dfd_facebook_widget_script', get_template_directory_uri() . '/assets/js/widget-facebook.js', false, null, true);
     wp_register_script('mega_menu', get_template_directory_uri() . '/assets/js/jquery.mega-menu.js', false, null, false);
     wp_register_script('mega_menu_run', get_template_directory_uri() . '/assets/js/jquery.mega-menu.run.js', false, null, false);
     wp_register_script('dl_menu', get_template_directory_uri() . '/assets/js/jquery.dlmenu.js', false, '1.0.1', true);
     /**
      * Enqueue Preloader
      */
     if (strcmp(DfdThemeSettings::get('site_preloader_enabled'), '1') === 0) {
         wp_enqueue_style('dfd_preloader_indicator');
     }
     /*
      * JS enquene
      */
     wp_enqueue_script('jquery');
     if (strcmp(DfdThemeSettings::get('site_preloader_enabled'), '1') === 0) {
         wp_enqueue_script('dfd_queryloader2');
     }
     wp_enqueue_script('crum_foundation');
     wp_enqueue_script('flexslider');
     wp_enqueue_script('jcarousel');
     wp_enqueue_script('hammer');
     wp_enqueue_script('jCarouselSwipe');
     wp_enqueue_script('crum_effects');
     if (strcmp(DfdThemeSettings::get('scroll_animation'), 'off') !== 0) {
         wp_enqueue_script('smooth-scroll');
     }
     wp_enqueue_script('custom-share');
     wp_enqueue_script('vertical_js');
     if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
         wp_enqueue_script('dropdown');
         wp_enqueue_script('dropkick');
         wp_enqueue_script('woocommerce_hack');
     }
     wp_enqueue_script('crum_main');
     wp_enqueue_script('prettyphoto');
     wp_enqueue_script('dl_menu');
     wp_register_style('dfd_zencdn_video_css', '//vjs.zencdn.net/c/video-js.css', false, null);
     wp_register_script('dfd_zencdn_video_js', '//vjs.zencdn.net/c/video.js', false, null);
     wp_register_script('dfd-masonry-2cols-run', get_template_directory_uri() . '/assets/js/jquery.masonry.2cols.run.js', true, null, true);
     wp_register_script('dfd-masonry-3cols-run', get_template_directory_uri() . '/assets/js/jquery.masonry.3cols.run.js', true, null, true);
     wp_register_script('dfd-masonry-mini-3cols-run', get_template_directory_uri() . '/assets/js/jquery.masonry.mini.3cols.run.js', true, null, true);
     wp_register_script('dfd-masonry-mini-4cols-run', get_template_directory_uri() . '/assets/js/jquery.masonry.mini.4cols.run.js', true, null, true);
     wp_register_script('dfd-isotope-enable', get_template_directory_uri() . '/assets/js/jquery.isotope.enable.js', true, null, true);
     // deprecated
     wp_register_script('dfd-masonry-enable', get_template_directory_uri() . '/assets/js/jquery.masonry.enable.js', true, null, true);
     # Load script/styles for page templates
     if (is_page()) {
         $curr_page_template = basename(get_page_template());
         switch ($curr_page_template) {
             case 'page-contacts.php':
                 wp_enqueue_script('gmaps');
                 wp_enqueue_script('gmap3');
                 wp_enqueue_script('qr_code');
                 break;
             case 'tmp-posts-masonry-2.php':
             case 'tmp-posts-masonry-2-side.php':
             case 'tmp-posts-masonry-2-left-side.php':
                 wp_enqueue_script('isotope');
                 wp_enqueue_script('dfd-masonry-2cols-run');
                 break;
             case 'tmp-posts-masonry-3-left-sidebar.php':
             case 'tmp-posts-masonry-3-right-sidebar.php':
             case 'tmp-posts-masonry-3.php':
                 wp_enqueue_script('isotope');
                 wp_enqueue_script('dfd-masonry-3cols-run');
                 break;
             case 'tmp-portfolio-masonry-full-width.php':
             case 'tmp-portfolio-masonry-full-width-bordered.php':
             case 'tmp-portfolio-masonry-1.php':
             case 'tmp-portfolio-masonry-1-bordered.php':
                 wp_enqueue_script('isotope');
                 wp_enqueue_script('dfd-isotope-enable');
                 break;
             case 'tmp-portfolio-template-2mini.php':
             case 'tmp-portfolio-template-2excerpt.php':
             case 'tmp-portfolio-template-2.php':
             case 'tmp-portfolio-template-2-right-sidebar.php':
                 wp_enqueue_script('isotope');
                 wp_enqueue_script('isotope-run-2col');
                 break;
             case 'tmp-portfolio-template-3excerpt.php':
             case 'tmp-portfolio-template-3.php':
             case 'tmp-portfolio-template-3-right-sidebar.php':
             case 'tmp-portfolio-template-3mini.php':
                 wp_enqueue_script('isotope');
                 wp_enqueue_script('isotope-run-3col');
                 break;
             case 'tmp-portfolio-template-4mini.php':
             case 'tmp-portfolio-template-4excerpt.php':
             case 'tmp-portfolio-template-4.php':
                 wp_enqueue_script('isotope');
                 wp_enqueue_script('isotope-run-4col');
                 break;
             case 'tmp-portfolio-masonry_mini.php':
             case 'tmp-portfolio-masonry_excerpt.php':
             case 'tmp-portfolio-masonry.php':
             case 'tmp-portfolio-masonry-sidebar_mini.php':
             case 'tmp-portfolio-masonry-sidebar_excerpt.php':
             case 'tmp-portfolio-masonry-sidebar.php':
                 wp_enqueue_script('isotope');
                 wp_enqueue_script('dfd-masonry-mini-3cols-run');
                 break;
             case 'tmp-portfolio-masonry-4mini.php':
             case 'tmp-portfolio-masonry-4excerpt.php':
             case 'tmp-portfolio-masonry-4.php':
                 wp_enqueue_script('isotope');
                 wp_enqueue_script('dfd-masonry-mini-4cols-run');
                 break;
         }
     }
     if (function_exists('post_like_scripts')) {
         post_like_scripts();
     }
 }
 public function validateUserOptions()
 {
     if (!DfdThemeSettings::get('themeforest_username') || !DfdThemeSettings::get('themeforest_api_key')) {
         add_action('admin_notices', 'envato_toolkit_credentials_admin_notices');
         return false;
     }
     return true;
 }
예제 #12
0
if (strcmp(DfdThemeSettings::get('post_header'), '1') === 0) {
    ?>
			<?php 
    get_template_part('templates/entry-meta', 'post');
    ?>
		<?php 
}
?>
	</div>

    <?php 
if (has_post_thumbnail()) {
    if (!DfdThemeSettings::get('thumb_image_crop')) {
        $image_crop = true;
    } else {
        $image_crop = DfdThemeSettings::get('thumb_image_crop');
    }
    $thumb = get_post_thumbnail_id();
    $img_url = wp_get_attachment_url($thumb, 'large');
    //get img URL
    if (is_page_template('tmp-posts-masonry-2-side.php')) {
        $article_image = aq_resize($img_url, 407, 270, $image_crop);
    } elseif (is_page_template('tmp-posts-masonry-2.php')) {
        $article_image = aq_resize($img_url, 567, 320, $image_crop);
    } else {
        $article_image = aq_resize($img_url, 407, 270, $image_crop);
    }
    ?>
        <div class="entry-thumb">
            <img src="<?php 
    echo $article_image;
예제 #13
0
 public static function reloadInstance()
 {
     self::$_settings = null;
     self::getInstance();
 }
예제 #14
0
if (DfdThemeSettings::get('custom_logo_image')) {
    $_logo_size = array(164, 104);
    $custom_logo_image = aq_resize(DfdThemeSettings::get('custom_logo_image'), $_logo_size[0], $_logo_size[1]);
    if (empty($custom_logo_image)) {
        $custom_logo_image = DfdThemeSettings::get('custom_logo_image');
    }
    $custom_retina_logo_image = '';
    $logo_image_w = '';
    $logo_image_h = '';
    $upload_info = wp_upload_dir();
    $rel_path = str_replace($upload_info['baseurl'], '', $custom_logo_image);
    $custom_logo_image_path = $upload_info['basedir'] . $rel_path;
    if (DfdThemeSettings::get('custom_retina_logo_image') && file_exists(DfdThemeSettings::get('custom_retina_logo_image')) && getimagesize(DfdThemeSettings::get('custom_retina_logo_image'))) {
        # Retina ready logo
        $custom_retina_logo_image = aq_resize(DfdThemeSettings::get('custom_retina_logo_image'), $_logo_size[0] * 2, $_logo_size[1] * 2);
        list($logo_image_w, $logo_image_h) = getimagesize(DfdThemeSettings::get('custom_retina_logo_image'));
    }
    ?>
	<div class="logo-for-panel">
		<a href="<?php 
    echo home_url();
    ?>
/">
			<img src="<?php 
    echo $custom_logo_image;
    ?>
" alt="<?php 
    bloginfo('name');
    ?>
" data-retina="<?php 
    echo $custom_retina_logo_image;
예제 #15
0
<?php

if (strcmp(DfdThemeSettings::get('show_search_form'), '1') === 0) {
    ?>
<div class="form-search-wrap">
	<?php 
    echo get_template_part('templates/searchform', 'mini');
    ?>
</div>
<?php 
}
예제 #16
0
            <div class="soc-icons-title"><?php 
_e('Share us', 'dfd');
?>
</div>
        </div>
    </div>
</section>
	
<?php 
echo DfdThemeSettings::get("custom_js");
?>

<?php 
if (DfdThemeSettings::get("site_boxed")) {
    ?>
</div><?php 
}
?>

</div>

<?php 
echo DfdThemeSettings::get('social_counters_code');
?>

<?php 
wp_footer();
?>
</body>
</html>
예제 #17
0
        $image_src = wp_get_attachment_image_src($attachment_id, 'full');
        // returns an array
        $thumb_image = aq_resize($image_attributes[0], 126, 88, true);
        echo '<li data-thumb="' . $thumb_image . '">';
        echo '<a href="' . $image_src[0] . '" data-rel="prettyPhoto[pp_gal]">';
        echo wp_get_attachment_image($attachment_id, 'full');
        echo '</a>';
        echo '</li>';
    }
    echo '  </ul></div>';
} elseif (has_post_thumbnail() && !$embed_url) {
    $thumb = get_post_thumbnail_id();
    echo wp_get_attachment_image($thumb, 'full');
}
if (DfdThemeSettings::get('portfolio_page_select')) {
    $page = DfdThemeSettings::get('portfolio_page_select');
    $slug = get_permalink($page);
}
?>
</div>
<article class="folio-info folio-info-variant-2 twelve columns">

	<dl class="tabs contained horisontal clearfix">

		<dd class="active"><a href="#folio-desc-1"><?php 
_e('Description', 'dfd');
?>
</a></dd>

		<?php 
if (function_exists('get_field_objects')) {
예제 #18
0
<?php

/*
 * List of included into theme files
 */
# Theme options panel
require_once locate_template('/options/options.php');
# Including theme settings class
require_once locate_template('/inc/settings.php');
DfdThemeSettings::getInstance();
# Include scripts ans styles
require_once locate_template('/inc/assets.php');
#Theme icons pack
require_once locate_template('/inc/icons/icons.php');
# Rewrite theme components
require_once locate_template('/inc/components.php');
# Theme Wrapper
require_once locate_template('/inc/wrapping.php');
# Resize images on the fly
require_once locate_template('/inc/aq_resizer.php');
# Cleanup - remove unused HTML and functions
require_once locate_template('/inc/cleanup.php');
# Add Framework additional functions
require_once locate_template('/inc/actions.php');
# Mega menu
require_once locate_template('/inc/menu.php');
# Site preloader
require_once locate_template('/inc/preloader.php');
# Envato updater init
require_once locate_template('/inc/envato.php');
# Enable SVG mime type
예제 #19
0
<?php

if (strcmp(DfdThemeSettings::get('show_login_form'), '1') === 0) {
    ?>
<div class="login-header">
	<?php 
    if (!is_user_logged_in()) {
        ?>
		<div class="links">
			<a href="<?php 
        echo esc_url(wp_login_url());
        ?>
" class="drop-login" data-reveal-id="loginModal">
				<i class="icon-user-filled icon-hover"></i>
				<i class="icon-user-lined"></i>
			</a>
		</div>

		<div id="loginModal" class="reveal-modal">
			<?php 
        crum_login_form('');
        ?>
			<a class="close-reveal-modal">&#215;</a>
		</div>
	<?php 
    } else {
        ?>

		<div class="links">
			<a href="<?php 
        echo esc_url(wp_logout_url());
예제 #20
0
<?php

global $post;
if (!empty($post) && isset($post->ID)) {
    $custom_head_img = get_post_meta($post->ID, 'crum_headers_bg_img', true);
    $custom_head_color = get_post_meta($post->ID, 'crum_headers_bg_color', true);
    $custom_head_subtitle = get_post_meta($post->ID, 'crum_headers_subtitle', true);
} else {
    $custom_head_img = '';
    $custom_head_color = '';
    $custom_head_subtitle = '';
}
if (DfdThemeSettings::get('stan_header')) {
    echo '<div id="stuning-header" style="';
    if ($custom_head_color && $custom_head_color != '#ffffff' && $custom_head_color != '#') {
        echo ' background-color: ' . $custom_head_color . '; ';
    } elseif (DfdThemeSettings::get('stan_header_color')) {
        echo ' background-color: ' . DfdThemeSettings::get('stan_header_color') . '; ';
    }
    if (!empty($custom_head_img)) {
        echo 'background-image: url(' . $custom_head_img . ');  background-position: center;';
    } elseif (DfdThemeSettings::get('stan_header_image') && !($custom_head_color && $custom_head_color != '#ffffff' && $custom_head_color != '#')) {
        echo 'background-image: url(' . DfdThemeSettings::get('stan_header_image') . ');  background-position: center;';
    }
    if (DfdThemeSettings::get('stan_header_fixed')) {
        echo 'background-attachment: fixed; background-position:  center -10%;';
    }
    echo '">';
}
예제 #21
0
		<script type="text/javascript">
				jQuery('#stuning-header').css('display','none');
		</script>
    
		
        <div class="map-holder">
			<div class="left-mask"></div>
            <div id="map"></div>
			<div class="right-mask"></div>
        </div>

        <script type="text/javascript">
            jQuery(document).ready(function () {
                jQuery("#map")<?php 
    if (DfdThemeSettings::get("cont_m_height")) {
        echo '.height("' . DfdThemeSettings::get("cont_m_height") . 'px")';
    }
    ?>
.gmap3({
                    marker: {
                        values: [
                            <?php 
    foreach ($map_address as $k => $val) {
        $map_address[$k] = $val;
        echo '{address: " ' . $map_address[$k] . '"},';
    }
    ?>
                        ]
                    },
                    map: {
                        options: {
예제 #22
0
echo get_the_date('F Y');
?>
</span>
    </time>


    <div class="post-format clearfix">
        <?php 
get_template_part('templates/entry-meta/post-format-icon');
?>
    </div>

    <?php 
if (strcmp(DfdThemeSettings::get("post_share_button"), '1') === 0) {
    if (DfdThemeSettings::get("custom_share_code")) {
        echo DfdThemeSettings::get("custom_share_code");
    } else {
        ?>

            <div class="count">
                <div class="fb-like" data-send="false" data-layout="box_count" data-width="50" data-show-faces="false" data-font="arial"></div>
                <script type="text/javascript">
                    (function (d, s, id) {
                        var js = undefined,
                            fjs = d.getElementsByTagName(s)[0];

                        if (d.getElementById(id)) {
                            return;
                        }

                        js = d.createElement(s);
예제 #23
0
function dfd_get_header_layout()
{
    $available = dfd_header_layouts();
    $header_layout = DfdThemeSettings::get('header_layout');
    if (empty($header_layout) || !isset($available[$header_layout])) {
        $available_keys = array_keys($available);
        $header_layout = array_shift($available_keys);
    }
    return $header_layout;
}
예제 #24
0
파일: post.php 프로젝트: sabdev1/ljcdevsab
<?php

if (has_post_thumbnail()) {
    if (!DfdThemeSettings::get('thumb_image_crop')) {
        $image_crop = true;
    } else {
        $image_crop = DfdThemeSettings::get('thumb_image_crop');
    }
    $thumb = get_post_thumbnail_id();
    $img_url = wp_get_attachment_url($thumb, 'full');
    //get img URL
    if (DfdThemeSettings::get('post_thumbnails_width') && DfdThemeSettings::get('post_thumbnails_height')) {
        $article_image = aq_resize($img_url, DfdThemeSettings::get('post_thumbnails_width'), DfdThemeSettings::get('post_thumbnails_height'), $image_crop);
    } else {
        $article_image = aq_resize($img_url, 900, 400, $image_crop);
    }
    ?>
	<div class="entry-thumb">
		<img src="<?php 
    echo $article_image;
    ?>
" alt="<?php 
    the_title();
    ?>
"/>
		<?php 
    get_template_part('templates/entry-meta/hover-link');
    ?>
	</div>
<?php 
}
예제 #25
0
?>
		</div>

		<div class="entry-meta-wrap">
			<div class="entry-title">
				<a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a>
			</div>

			<?php 
if (strcmp(DfdThemeSettings::get('post_header'), '1') === 0) {
    ?>
				<?php 
    get_template_part('templates/entry-meta', 'post');
    ?>
			<?php 
}
?>
		</div>
	</div>

	<div class="entry-content">
		<?php 
the_excerpt();
?>
	</div>
예제 #26
0
파일: base.php 프로젝트: sabdev1/ljcdevsab
if (DfdThemeSettings::get("site_boxed")) {
    echo ' boxed_lay';
}
?>
">

			<?php 
get_template_part('templates/section', 'header');
?>

			<?php 
include crum_template_path();
?>
			
		</div>
		
		<?php 
switch (DfdThemeSettings::get('show_body_back_to_top')) {
    case 'left':
    case 'right':
        echo '<div class="body-back-to-top align-' . DfdThemeSettings::get('show_body_back_to_top') . '"></div>';
        break;
}
?>

		<?php 
get_template_part('templates/section', 'twitter-panel');
?>

<?php 
get_footer();
예제 #27
0
} else {
    the_content();
}
?>
	</div>
	
	<?php 
if (DfdThemeSettings::get("recent_items_disp")) {
    echo do_shortcode(DfdThemeSettings::get('block_single_folio_item'));
}
?>

</section>

<?php 
if (strcmp(DfdThemeSettings::get('portfolio_single_slider'), 'slider') === 0) {
    ?>
    <script type="text/javascript">
        jQuery(window).load(function () {
            var target_flexslider = jQuery('#my-work-slider');
            target_flexslider.flexslider({
                namespace: "my-work-",
                animation: "slide",
                controlNav: "thumbnails",
				animationLoop: false,
                smoothHeight: true,
                directionNav: false,

                start: function (slider) {
                    slider.removeClass('loading');
                }
예제 #28
0
            $page_lay = "3c-r-fixed";
            break;
        case "left-2":
            $page_lay = "3c-l-fixed";
            break;
        case "both":
            $page_lay = "3c-fixed";
            break;
        default:
            $page_lay = "3c-fixed";
            break;
    }
} elseif (get_post_meta($post->ID, 'blog_layout_select', true)) {
    $page_lay = get_post_meta($post->ID, 'blog_layout_select', true);
} else {
    $page_lay = DfdThemeSettings::get("archive_layout");
}
?>

<?php 
get_template_part('templates/top', 'page');
?>


<section id="layout">
    <div class="row">

        <?php 
if ($page_lay == "1col-fixed") {
    $cr_layout = '';
    $cr_width = 'twelve';
if (DfdThemeSettings::get("folio_sorting")) {
    $taxonomy = 'my-product_category';
    if ($folio_custom_categories) {
        $categories = get_terms($taxonomy, array('include' => $folio_custom_categories));
    } else {
        $categories = get_terms($taxonomy);
    }
}
?>

	<div class="row">
		<div class="columns twelve">
			<div id="portfolio-page">

				<?php 
if (DfdThemeSettings::get("folio_sorting")) {
    dfd_folio_sort_panel($categories);
}
?>

				<div class="works-list">

					<?php 
if ($folio_custom_categories) {
    $args = array('post_type' => 'my-product', 'posts_per_page' => $number_per_page, 'paged' => $paged, 'tax_query' => array(array('taxonomy' => 'my-product_category', 'field' => 'id', 'terms' => $blog_cut_array)));
} else {
    $args = array('post_type' => 'my-product', 'posts_per_page' => $number_per_page, 'paged' => $paged);
}
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query($args);
예제 #30
0
    }
    ?>
		<section id="bot-twitter" style="
				<?php 
    if (DfdThemeSettings::get('t_panel_padding')) {
        echo 'padding:30px 0;';
    }
    ?>
				<?php 
    if (DfdThemeSettings::get('t_panel_bg_color')) {
        echo 'background-color:' . DfdThemeSettings::get('t_panel_bg_color') . ';';
    }
    ?>
				<?php 
    if (DfdThemeSettings::get('t_panel_bg_image')) {
        echo 'background-image:url(' . DfdThemeSettings::get('t_panel_bg_image') . '); background-position: center; background-attachment: fixed;';
    }
    ?>
		">
			<div class="row">
				<?php 
    echo do_shortcode('[dfd_twitter_row]');
    ?>
			</div>
		</section>
	<?php 
    if (DfdThemeSettings::get("site_boxed")) {
        ?>
</div><?php 
    }
}