Example #1
0
 static function register_taxonomies()
 {
     $post_types = array('object');
     if (get_theme_option('enable_taxonomy')) {
         register_taxonomy('object_type', $post_types, array('hierarchical' => true, 'labels' => self::get_taxonomy_label(), 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => get_theme_option('taxonomy_url'))));
     }
 }
    function form($instance)
    {
        $sidebar = $instance['sidebar'];
        $sidebars = get_theme_option('general', 'sidebars');
        $sidebars = explode(';', $sidebars);
        if (count($sidebars) != 0) {
            ?>
        <p>
        	<label for="<?php 
            echo $this->get_field_id('sidebar');
            ?>
"><?php 
            _e('Sidebar', THEME_ADMIN_LANG_DOMAIN);
            ?>
</label>
        	<select name="<?php 
            echo $this->get_field_name('sidebar');
            ?>
" id="<?php 
            echo $this->get_field_id('sidebar');
            ?>
">
        	<?php 
            foreach ($sidebars as $sider) {
                $siderr = strtolower(str_replace(' ', '', $sider));
                echo '<option value="' . $siderr . '" ' . selected($sidebar, $siderr, false) . '>' . $sider . '</option>';
            }
            ?>
        	</select>
        </p>
        <?php 
        } else {
            echo '<p>' . __('you do not have any sidebars defined please define some in developer options page', THEME_ADMIN_LANG_DOMAIN) . '</p>';
        }
    }
Example #3
0
 public function testConfigureThemeWithNoLogoFileAndNoPreviousLogoFile()
 {
     $themeName = self::THEME;
     $this->assertEquals('', (string) get_theme_option('logo', $themeName));
     // specify the files array for the post
     $_FILES = array('logo' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0), 'header_background' => array('name' => '', 'type' => '', 'tmp_name' => '', 'error' => 4, 'size' => 0));
     // specify the theme options for the post
     $themeOptions = array('display_featured_item' => '1', 'display_featured_collection' => '1', 'display_featured_exhibit' => '1', 'homepage_recent_items' => '', 'homepage_text' => '', 'footer_text' => '', 'display_footer_copyright' => '0');
     $csrf = new Zend_Form_Element_Hash('theme_config_csrf');
     $csrf->initCsrfToken();
     // specify other post data
     $otherPostData = array('hidden_file_logo' => '', 'hidden_file_header_background' => '', 'MAX_FILE_SIZE' => '33554432', 'submit' => 'Save Changes', 'theme_config_csrf' => $csrf->getHash());
     // set the the post data
     $post = array_merge($themeOptions, $otherPostData);
     $this->getRequest()->setParam('name', $themeName);
     $this->getRequest()->setPost($post);
     $this->getRequest()->setMethod('POST');
     // dispatch the controller action
     $this->dispatch('themes/config');
     $actualOptions = Theme::getOptions(self::THEME);
     $this->assertArrayNotHasKey('theme_config_csrf', $actualOptions);
     foreach ($themeOptions as $name => $value) {
         $this->assertArrayHasKey($name, $actualOptions);
         $this->assertEquals($actualOptions[$name], $value, "Option '{$name}' was not correctly set.");
     }
     // verify that logo is empty
     $this->assertEmpty(get_theme_option('logo', $themeName));
 }
function dez_custom_google_font()
{
    $safe_font = array("Arial", "Arial Black", "Verdana", "Tahoma", "Trebuchet MS", "Times New Roman", "Helvetica Neue", "Helvetica", "Lucida Grande", "Courier New", "Lucida Console", "Impact", "Georgia", "Palatino Linotype");
    $http = !empty($_SERVER['HTTPS']) ? "https" : "http";
    $un_bodytype = get_theme_option('body_font');
    $un_headtype = get_theme_option('headline_font');
    $un_navtype = get_theme_option('navigation_font');
    $bodytype = str_replace(' ', '+', get_theme_option('body_font'));
    $headtype = str_replace(' ', '+', get_theme_option('headline_font'));
    $navtype = str_replace(' ', '+', get_theme_option('navigation_font'));
    $font_var = '100,200,300,400,600,700,900,100italic,200italic,300italic,400italic,600italic,700italic,900italic';
    $font_subset = 'latin,cyrillic-ext,latin-ext,cyrillic,greek,greek-ext,vietnamese';
    if ($un_bodytype == "" || $un_bodytype == "Choose a font" || in_array($un_bodytype, $safe_font)) {
    } else {
        wp_register_style('body_gwf', $http . "://fonts.googleapis.com/css?family=" . $bodytype . ":" . $font_var . "&subset=" . $font_subset);
        wp_enqueue_style('body_gwf');
    }
    if ($un_headtype == "" || $un_headtype == "Choose a font" || in_array($un_headtype, $safe_font)) {
    } else {
        wp_register_style('headline_gwf', $http . "://fonts.googleapis.com/css?family=" . $headtype . ":" . $font_var . "&subset=" . $font_subset);
        wp_enqueue_style('headline_gwf');
    }
    if ($un_navtype == "" || $un_navtype == "Choose a font" || in_array($un_navtype, $safe_font)) {
    } else {
        wp_register_style('nav_gwf', $http . "://fonts.googleapis.com/css?family=" . $navtype . ":" . $font_var . "&subset=" . $font_subset);
        wp_enqueue_style('nav_gwf');
    }
}
Example #5
0
 public function testWithThemeName()
 {
     set_theme_option('logo', 'jammy.png', 'whatever');
     $this->assertEquals('jammy.png', get_theme_option('logo', 'whatever'));
     set_theme_option('new_option', 'hoohas', 'whatever');
     $this->assertEquals('hoohas', get_theme_option('new_option', 'whatever'));
 }
function mapasdevista_admin_init()
{
    global $pagenow;
    if ($pagenow === "post.php" || $pagenow === "post-new.php" || isset($_GET['page']) && $_GET['page'] === "mapasdevista_maps") {
        wp_enqueue_script('jquery-ui-core');
        wp_enqueue_script('jquery-ui-resizable');
        wp_enqueue_script('jquery-ui-dialog');
        // api do google maps versao 3 direto
        $googleapikey = get_theme_option('google_key');
        $googleapikey = $googleapikey ? "&key={$googleapikey}" : '';
        wp_enqueue_script('google-maps-v3', 'http://maps.google.com/maps/api/js?sensor=false' . $googleapikey);
        wp_enqueue_script('openlayers', 'http://openlayers.org/api/OpenLayers.js');
        wp_enqueue_script('mapstraction', mapasdevista_get_baseurl() . '/js/mxn/mxn-min.js');
        wp_enqueue_script('mapstraction-core', mapasdevista_get_baseurl() . '/js/mxn/mxn.core-min.js');
        wp_enqueue_script('mapstraction-googlev3', mapasdevista_get_baseurl() . '/js/mxn/mxn.googlev3.core-min.js');
        wp_enqueue_script('mapstraction-openlayers', mapasdevista_get_baseurl() . '/js/mxn/mxn.openlayers.core-min.js');
    }
    if (isset($_GET['page']) && $_GET['page'] === "mapasdevista_theme_page") {
        wp_enqueue_script('jcolorpicker', mapasdevista_get_baseurl() . '/admin/colorpicker/js/colorpicker.js', array('jquery'));
        wp_enqueue_style('colorpicker', mapasdevista_get_baseurl() . '/admin/colorpicker/css/colorpicker.css');
        wp_enqueue_script('mapasdevista_theme_options', mapasdevista_get_baseurl() . '/admin/mapasdevista_theme_options.js', array('jquery', 'jcolorpicker'));
    }
    if ($pagenow === "post.php" || $pagenow === "post-new.php") {
        wp_enqueue_script('metabox', mapasdevista_get_baseurl() . '/admin/metabox.js');
    } elseif (isset($_GET['page']) && $_GET['page'] === 'mapasdevista_pins_page') {
        wp_enqueue_script('metabox', mapasdevista_get_baseurl() . '/admin/pins.js');
    }
    wp_enqueue_style('mapasdevista-admin', mapasdevista_get_baseurl('template_directory') . '/admin/admin.css');
}
Example #7
0
/**
 * Faz a validação dos dados
 * 
 */
function theme_options_validate_callback_function($input)
{
    if (!empty($_FILES['logo']['name'])) {
        $allowed_file_types = array('jpg' => 'image/jpg', 'jpeg' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png');
        if (!in_array($_FILES['logo']['type'], $allowed_file_types)) {
            wp_die(__('Sorry, this file type is not permitted for security reasons.'));
        }
        /*
         * O antigo wp_handle_upload( $_FILES[$field], array( 'test_form' => false ) ); foi substituído
         */
        $upload = media_handle_upload('logo', 0);
        if ($upload) {
            $input['logo'] = $upload;
        }
    } else {
        if (isset($_POST['restore-default-image']) && $_POST['restore-default-image'] == 1) {
            unset($input['logo']);
        } else {
            $logo = get_theme_option('logo');
            if (!empty($logo)) {
                $input['logo'] = get_theme_option('logo');
            }
        }
    }
    return $input;
}
Example #8
0
/**
 * Get a theme option wuith a default value
 *
 * @param string $option The theme option name
 * @param $def The default value if the option is not set
 * @param string|null $theme The theme name (defaults to the current theme)
 * @return string
 */
function get_theme_option_with_default($option, $def, $theme = null)
{
    $value = get_theme_option($option, $theme);
    if ($value == null || strlen($value) == 0) {
        $value = $def;
    }
    return $value;
}
Example #9
0
 function getHTML()
 {
     if ($this->html != "") {
         return stripslashes($this->html);
     } else {
         return "<a " . (get_theme_option('redirect-banner-window') != "" ? "target=\"_blank\"" : "") . " title=\"" . $this->alt . "\"  href=\"" . $this->getLinkURL() . "\"><img class=\"bannerAd\" alt=\"" . $this->alt . "\" src=\"" . $this->image . "\" /></a>";
     }
 }
Example #10
0
/**
 * Output theme meta value
 *
 */
function theme_option($key, $default = '', $filter = '')
{
    $value = get_theme_option($key, $default);
    switch ($filter) {
        case 'wpautop':
            $value = wpautop($value);
            break;
    }
    echo $value;
}
Example #11
0
 function get_unused_id_ajax()
 {
     $lastid = get_theme_option("last_slide_id");
     if ($lastid < 3) {
         $lastid = 2;
     }
     $lastid++;
     echo esc_html($lastid);
     update_theme_option("last_slide_id", $lastid);
     die;
 }
Example #12
0
 function getReviewsRatingWordValue($r, $words = '')
 {
     $maxLevel = max(5, (int) get_custom_option('reviews_max_level'));
     if (trim($words) == '') {
         $words = get_theme_option('reviews_criterias_levels');
     }
     $words = explode(',', $words);
     $k = $maxLevel / count($words);
     $r = max(0, min(count($words) - 1, floor($r / $k)));
     return isset($words[$r]) ? trim($words[$r]) : __('no rated', 'themerex');
 }
    /**
     * How to display the widget on the screen.
     */
    function widget($args, $instance)
    {
        extract($args);
        global $wp_query, $post;
        global $THEMEREX_CURRENT_SIDEBAR;
        /* Our variables from the widget settings. */
        $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : '');
        $number = isset($instance['number']) ? (int) $instance['number'] : '';
        $show_date = isset($instance['show_date']) ? (int) $instance['show_date'] : 0;
        $show_image = isset($instance['show_image']) ? (int) $instance['show_image'] : 0;
        $show_author = isset($instance['show_author']) ? (int) $instance['show_author'] : 0;
        $show_counters = isset($instance['show_counters']) ? (int) $instance['show_counters'] : 0;
        $category = isset($instance['category']) ? (int) $instance['category'] : 0;
        $show_counters = $show_counters ? get_theme_option("blog_counters") : '';
        $output = '';
        if ($THEMEREX_CURRENT_SIDEBAR == 'top') {
            $output .= '<div class="columnsWrap"><div class="columns1_2">';
        }
        $args = array('numberposts' => $number, 'offset' => 0, 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => current_user_can('read_private_pages') && current_user_can('read_private_posts') ? array('publish', 'private') : 'publish', 'ignore_sticky_posts' => 1, 'suppress_filters' => true);
        if ($category > 0) {
            $args['category'] = $category;
        }
        $ex = get_theme_option('exclude_cats');
        if (!empty($ex)) {
            $args['category__not_in'] = explode(',', $ex);
        }
        $recent_posts = wp_get_recent_posts($args, OBJECT);
        $post_number = 0;
        foreach ($recent_posts as $post) {
            $post_number++;
            require themerex_get_file_dir('/templates/page-part-widgets-posts.php');
            if ($THEMEREX_CURRENT_SIDEBAR == 'top' && $post_number == round($number / 2)) {
                $output .= '
					</div><div class="columns1_2">
				';
            }
            if ($post_number >= $number) {
                break;
            }
        }
        if ($THEMEREX_CURRENT_SIDEBAR == 'top') {
            $output .= '</div></div>';
        }
        if (!empty($output)) {
            /* Before widget (defined by themes). */
            echo balanceTags($before_widget);
            /* Display the widget title if one was input (before and after defined by themes). */
            echo balanceTags($before_title) . esc_html($title) . balanceTags($after_title);
            echo balanceTags($output);
            /* After widget (defined by themes). */
            echo balanceTags($after_widget);
        }
    }
Example #14
0
function tf_print_styles()
{
    if (is_admin()) {
        return false;
    }
    wp_enqueue_style('base.css', THEME_CSS . '/base.css');
    if (get_theme_option('color_scheme') != 'orange') {
        wp_enqueue_style('skin', THEME_CSS . '/' . get_theme_option('color_scheme') . '.css');
    }
    wp_enqueue_style('skeleton.css', THEME_CSS . '/skeleton.css');
    wp_enqueue_style('prettyPhoto.css', THEME_CSS . '/prettyPhoto.css');
    wp_enqueue_style('responsive-grid.css', THEME_CSS . '/responsive-grid.css');
}
Example #15
0
function ultimatum_add_admin_submenus()
{
    $user = wp_get_current_user();
    add_submenu_page(THEME_SLUG, __('General Settings', THEME_LANG_DOMAIN), __('General Settings', THEME_LANG_DOMAIN), 'manage_options', THEME_SLUG, 'wonderworks_default');
    if (get_theme_option('general', 'ultimatum_seo')) {
        add_submenu_page(THEME_SLUG, __('SEO Options', THEME_LANG_DOMAIN), __('SEO Options', THEME_LANG_DOMAIN), 'manage_options', 'wonder-seo', 'seoDefaults');
    }
    add_submenu_page(THEME_SLUG, __('Font Library', THEME_LANG_DOMAIN), __('Font Library', THEME_LANG_DOMAIN), 'manage_options', 'wonder-fonts', 'fonts');
    add_submenu_page(THEME_SLUG, __('Templates', THEME_LANG_DOMAIN), __('Templates', THEME_LANG_DOMAIN), 'manage_options', 'wonder-themes', 'ultimatum_themes');
    add_submenu_page('wonder-themes', __('Layout Settings', THEME_LANG_DOMAIN), __('Layout Settings', THEME_LANG_DOMAIN), 'manage_options', 'wonder-layout', 'ultimatum_layouts', THEME_URI . '/wonderfoundry/images/ultimatum-icon.png');
    add_submenu_page('wonder-themes', __('CSS Editor', THEME_LANG_DOMAIN), __('CSS Editor', THEME_LANG_DOMAIN), 'manage_options', 'wonder-css', 'cssDefaults', THEME_URI . '/wonderfoundry/images/ultimatum-icon.png');
    add_submenu_page(THEME_SLUG, __('Custom Post Types', THEME_LANG_DOMAIN), __('Custom Post Types', THEME_LANG_DOMAIN), 'manage_options', 'wonder-types', 'PostTypes');
    add_submenu_page(THEME_SLUG, __('Updates', THEME_LANG_DOMAIN), __('Updates', THEME_LANG_DOMAIN), 'manage_options', 'wonder-update', 'wonder_update');
}
function collection_order_array()
{
    $commaSeparatedList = get_theme_option('Collection Order');
    if ($commaSeparatedList == NULL) {
        $collections = get_records('Collection', array(), 0);
        $num_collections = count($collections);
        $commaSeparatedList = '';
        for ($i = 0; $i < $num_collections; $i++) {
            $commaSeparatedList .= $collections[$i]->id;
            $commaSeparatedList .= ',';
        }
        $commaSeparatedList = rtrim($commaSeparatedList, ",");
    }
    $arrayList = explode(",", $commaSeparatedList);
    return $arrayList;
}
Example #17
0
function enqueue_general_scripts()
{
    if (is_admin()) {
        return;
    }
    wp_enqueue_script('jquery-tools', THEME_JS . '/jquery.tools.min.js', array('jquery'));
    wp_enqueue_script('jquery-prettyphoto', THEME_JS . '/jquery.prettyPhoto.js', array('jquery'));
    $fitvids = get_theme_option('general', 'fitvids');
    if ($fitvids) {
        wp_enqueue_script('jquery-fitvids', THEME_JS . '/jquery.fitvids.js', array('jquery'));
    }
    wp_enqueue_script('theme.js', THEME_JS . '/theme.js.php', array('jquery-tools'));
    if (function_exists('bp_plugin_is_active')) {
        if (bp_plugin_is_active()) {
            activate_ult_bp();
        }
    }
}
Example #18
0
 function getPostShare($arg, $post_data)
 {
     $side_bar = get_custom_option('show_sidebar_main');
     if (sc_param_is_on(get_custom_option('show_post_info', null, $post_data['post_id'])) && !is_single()) {
         $array_info = explode(',', $arg);
         $array_list = array();
         if ($side_bar != "wide") {
             $array_list['views'] = '<div class="postSpan postViews"><span class="icon icon-eye"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . $post_data['post_views'] . '</a></div>';
             $array_list['likes'] = '<div class="postSpan postLikes likeButton like" data-postid="' . $post_data['post_id'] . '" data-likes="' . $post_data['post_likes'] . '"><span class="icon icon-heart"></span><a href="" class="revInfo">' . $post_data['post_likes'] . '</a></div>';
             $array_list['more'] = $post_data['post_link'] ? '<div class="postSpan postMore"><span class="icon icon-link"></span><a href="' . $post_data['post_link'] . '"  class="revInfo">' . __('More ', 'themerex') . '</a></div>' : '';
             //review
             if ($post_data['post_reviews_author'] && sc_param_is_on(get_custom_option('show_reviews', null, $post_data['post_id']))) {
                 $avg_author = $post_data['post_reviews_' . (get_theme_option('reviews_first') == 'author' ? 'author' : 'users')];
                 $rating_max = get_custom_option('reviews_max_level');
                 $array_list['reviews'] = '<div class="postSpan postReview" title="' . sprintf(__('Rating - %s/%s', 'themerex'), $avg_author, $rating_max) . '"><span class="icon icon-star"></span><a href="' . $post_data['post_link'] . '" class="revInfo">' . getReviewsSummaryStarsSharing($avg_author, false, false) . '</a></div>';
             }
         }
         $array_list['comments'] = '<div class="postSpan postComment"><span class="icon icon-post"></span><a href="' . $post_data['post_comments_link'] . '" class="revInfo">' . $post_data['post_comments'] . ($side_bar == 'wide' ? ' comments' : '') . '</a></div>';
         $post_share = showShareButtons(array("post_id" => $post_data["post_id"], "post_link" => $post_data["post_link"], "post_title" => $post_data["post_title"], "post_descr" => strip_tags($post_data["post_excerpt"]), "post_thumb" => $post_data["post_attachment"], "style" => "drop", "echo" => false));
         if ($side_bar != "wide") {
             $array_list['share'] = '<div class="postSpan postShare share"><span class="icon icon-share"></span><a class="revInfo shareDrop" href="#">' . __('Share ', 'themerex') . '</a>' . $post_share . '</div>';
         } else {
             $array_list['share'] = '<div class="postSpan postShare share">' . $post_share . '</div>';
         }
         $post_info_html = '';
         foreach ($array_info as $array_infos) {
             foreach ($array_list as $k => $val) {
                 if ($k == $array_infos) {
                     $post_info_html .= $val;
                 }
             }
         }
         if ($post_info_html != '') {
             return '<div class="postSharing hoverUnderline">' . $post_info_html . '</div>';
         } else {
             return '';
         }
     }
 }
function tk_add_scripts()
{
    global $variable_array;
    $slider_type = get_theme_option(wp_get_theme()->name . '_general_slider_type');
    wp_enqueue_script('jquery');
    wp_enqueue_script('bootstrap', get_template_directory_uri() . '/script/bootstrap/bootstrap.min.js', false, false, true);
    wp_enqueue_script('bootstrap-dropdown', get_template_directory_uri() . '/script/bootstrap/twitter-bootstrap-hover-dropdown.min.js', false, false, true);
    wp_enqueue_script('jquery-easing', get_template_directory_uri() . '/script/easing/jquery.easing.js', false, false, true);
    //checks to see if enabled slider is slit slider
    wp_enqueue_script('slitslider', get_template_directory_uri() . '/script/home-slider/js/jquery.slitslider.js', false, false, true);
    wp_enqueue_script('modernizer', get_template_directory_uri() . '/script/home-slider/js/modernizr.custom.79639.js', false, false, true);
    wp_enqueue_script('ba-cond', get_template_directory_uri() . '/script/home-slider/js/jquery.ba-cond.min.js', false, false, true);
    wp_enqueue_script('webticker', get_template_directory_uri() . '/script/webticker/jquery.webticker.js', false, false, true);
    wp_enqueue_script('flexslider', get_template_directory_uri() . '/script/flexslider/jquery.flexslider-min.js', false, false, true);
    wp_enqueue_script('jplayer', get_template_directory_uri() . '/script/jplayer/js/jquery.jplayer.min.js', false, false, true);
    wp_enqueue_script('fancybox', get_template_directory_uri() . '/script/fancybox/jquery.fancybox.pack.js', false, false, true);
    wp_enqueue_script('spiner', get_template_directory_uri() . '/script/spiner/spin.min.js', false, false, true);
    wp_enqueue_script('isotope', get_template_directory_uri() . '/script/isotope/jquery.isotope.min.js', false, false, true);
    wp_enqueue_script('countdown', get_template_directory_uri() . '/script/countdown/jquery.countdown.min.js', false, false, true);
    wp_enqueue_script('call-scripts', get_template_directory_uri() . '/script/call-scripts.js', false, false, true);
    require get_template_directory() . '/config/localize-script-config.php';
    wp_localize_script('call-scripts', 'js_variables', $variable_array);
    wp_localize_script('admin', 'js_variables', $variable_array);
    /*********************************************************** */
    /***********SLIT SLIDER************************************ */
    /********************************************************** */
    $sl_slider_autoplay = get_theme_option(wp_get_theme()->name . '_general_slider_autoplay');
    $sl_slider_speed = get_theme_option(wp_get_theme()->name . '_general_slider_pause_time');
    if (empty($sl_slider_speed)) {
        $sl_slider_speed = 4000;
    }
    $sl_slider_animation = get_theme_option(wp_get_theme()->name . '_general_slider_animation_time');
    if (empty($sl_slider_animation)) {
        $sl_slider_animation = 500;
    }
    $slider_option = array('slider_autoplay' => $sl_slider_autoplay, 'slider_pause_time' => $sl_slider_speed, 'slider_animation_time' => $sl_slider_animation);
    wp_localize_script('slitslider', 'slit_slider_option', $slider_option);
}
function fly_casino_posts()
{
    // Check it Slug has been set
    if (get_theme_option('affiliate-slug')) {
        $slug = get_theme_option('affiliate-slug');
    } else {
        $slug = 'review';
    }
    $args = array('labels' => array('name' => __('Online Casinos'), 'singular_name' => __('Online Casino'), 'add_new' => __('Add New Online Casino'), 'add_new_item' => __('Add New Online Casino'), 'edit' => __('Edit Online Casino'), 'edit_item' => __('Edit Online Casino'), 'new_item' => __('New Online Casino'), 'view' => __('View Online Casino'), 'view_item' => __('View Online Casino'), 'search_items' => __('Search Online Casinos'), 'not_found' => __('No Online Casinos found'), 'not_found_in_trash' => __('No Online Casinos found in Trash'), 'parent' => __('Parent Online Casino')), 'public' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => $slug, 'with_front' => false), 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'custom-fields', 'page-attributes', 'comments', 'author'));
    register_post_type('casino', $args);
    $labels = array('name' => _x('Affiliate Tags', 'affiliate tag'), 'singular_name' => _x('affiliate tag', 'affiliate tag'), 'search_items' => __('Search Affiliate Tags'), 'all_items' => __('All Affiliate Tags'), 'parent_item' => __('Parent Affiliate Tag'), 'parent_item_colon' => __('Parent Affiliate Tag:'), 'edit_item' => __('Edit Affiliate Tag'), 'update_item' => __('Update Affiliate Tag'), 'add_new_item' => __('Add New Affiliate Tag'), 'new_item_name' => __('New Affiliate Tag'), 'menu_name' => __('Affiliate Tags'));
    register_taxonomy('affiliate-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-affiliates')));
    $labels2 = array('name' => _x('Networks', 'Network tag'), 'singular_name' => _x('Network tag', 'Network tag'), 'search_items' => __('Search Network Tags'), 'all_items' => __('All Network Tags'), 'parent_item' => __('Parent Network Tag'), 'parent_item_colon' => __('Parent Network Tag:'), 'edit_item' => __('Edit Network Tag'), 'update_item' => __('Update Network Tag'), 'add_new_item' => __('Add New Network Tag'), 'new_item_name' => __('New Network Tag'), 'menu_name' => __('Networks'));
    register_taxonomy('network-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels2, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-networks')));
    $labels3 = array('name' => _x('Deposit Options', 'Deposit Options'), 'singular_name' => _x('Deposit Option', 'Deposit Option'), 'search_items' => __('Search Deposit Options'), 'all_items' => __('All Deposit Options'), 'parent_item' => __('Parent Deposit Option'), 'parent_item_colon' => __('Parent Deposit Options:'), 'edit_item' => __('Edit Deposit Option'), 'update_item' => __('Update Deposit Option'), 'add_new_item' => __('Add New Deposit Option'), 'new_item_name' => __('New Deposit Options'), 'menu_name' => __('Deposit Options'));
    register_taxonomy('deposit-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels3, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-doptions')));
    $labels4 = array('name' => _x('Withdrawal Options', 'Withdrawal Options'), 'singular_name' => _x('Withdrawal Option', 'Withdrawal Option'), 'search_items' => __('Search Withdrawal Options'), 'all_items' => __('All Withdrawal Options'), 'parent_item' => __('Parent Withdrawal Option'), 'parent_item_colon' => __('Parent Withdrawal Options:'), 'edit_item' => __('Edit Withdrawal Option'), 'update_item' => __('Update Withdrawal Option'), 'add_new_item' => __('Add New Withdrawal Option'), 'new_item_name' => __('New Withdrawal Options'), 'menu_name' => __('Withdrawal Options'));
    register_taxonomy('withdrawal-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels4, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-wdptions')));
    $labels5 = array('name' => _x('Platforms', 'Platforms'), 'singular_name' => _x('Platform', 'Platform'), 'search_items' => __('Search Platforms'), 'all_items' => __('All Platforms'), 'parent_item' => __('Parent Platform'), 'parent_item_colon' => __('Parent Platforms:'), 'edit_item' => __('Edit Platform'), 'update_item' => __('Update Platform'), 'add_new_item' => __('Add New Platform'), 'new_item_name' => __('New Platforms'), 'menu_name' => __('Platforms'));
    register_taxonomy('platform-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels5, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-platform')));
    $labels6 = array('name' => _x('Support Type', 'Support Types'), 'singular_name' => _x('Support Type', 'Support Type'), 'search_items' => __('Search Support Types'), 'all_items' => __('All Currencies'), 'parent_item' => __('Parent Support Type'), 'parent_item_colon' => __('Parent Support Types:'), 'edit_item' => __('Edit Support Type'), 'update_item' => __('Update Support Type'), 'add_new_item' => __('Add New Support Type'), 'new_item_name' => __('New Support Types'), 'menu_name' => __('Support Types'));
    register_taxonomy('support-tags', array('casino'), array('hierarchical' => false, 'labels' => $labels6, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'tag-support')));
}
Example #21
0
</div><!-- end featured collection -->
<?php 
}
?>

<?php 
if (get_theme_option('Display Featured Exhibit') !== '0' && plugin_is_active('ExhibitBuilder') && function_exists('exhibit_builder_display_random_featured_exhibit')) {
    ?>
<!-- Featured Exhibit -->
<?php 
    echo exhibit_builder_display_random_featured_exhibit();
}
?>

<?php 
$recentItems = get_theme_option('Homepage Recent Items');
if ($recentItems === null || $recentItems === '') {
    $recentItems = 3;
} else {
    $recentItems = (int) $recentItems;
}
if ($recentItems) {
    ?>
<div id="recent-items">
    <h2><?php 
    echo __('Recently Added Items');
    ?>
</h2>
    <?php 
    echo recent_items($recentItems);
    ?>
Example #22
0
/**
 * Get the theme's header background image style.
 *
 * @package Omeka\Function\View\Head
 * @uses get_theme_option()
 * @return string|null
 */
function theme_header_background()
{
    $headerBg = get_theme_option('Header Background');
    if ($headerBg) {
        $storage = Zend_Registry::get('storage');
        $headerBg = $storage->getUri($storage->getPathByType($headerBg, 'theme_uploads'));
        return '<style type="text/css" media="screen">header {' . 'background:transparent url("' . $headerBg . '") center left no-repeat;' . '}</style>';
    }
}
Example #23
0
wp_head();
?>
</head>
<body <?php 
body_class();
?>
>

<div id="wrapper">
<div id="wrapper-bg"><div id="wrapper-bg2">
<div id="header" class="outer">
<div class="header-part">
<?php 
$get_logo_image = get_theme_option('logo');
$get_banner_image = get_theme_option('topbanner');
$get_banner_url = get_theme_option('topbanner-url');
if ($get_logo_image != '') {
    ?>
        <a href="<?php 
    bloginfo('url');
    ?>
"><img src="<?php 
    echo $get_logo_image;
    ?>
" alt="<?php 
    bloginfo('name');
    ?>
" title="<?php 
    bloginfo('name');
    ?>
" class="logoimg" /></a>
Example #24
0
        </article>

        <footer role="contentinfo">

            <nav id="bottom-nav">
                <?php 
echo public_nav_main();
?>
            </nav>

            <div id="footer-text">
                <?php 
echo get_theme_option('Footer Text');
?>
                <?php 
if (get_theme_option('Display Footer Copyright') == 1 && ($copyright = option('copyright'))) {
    ?>
                    <p><?php 
    echo $copyright;
    ?>
</p>
                <?php 
}
?>
                <p><?php 
echo __('Proudly powered by <a href="http://omeka.org">Omeka</a>.');
?>
</p>
                <a href="http://neh.gov" class="logo"><img src="<?php 
echo img('neh_50_logo_black.png');
?>
?>
"><?php 
comments_number('0', '1', '%');
?>
</div>
        <div class="commenters-number" title="<?php 
_e('número de pessoas que comentaram', 'consulta');
?>
"><span class="commenters-number-icon"></span><?php 
echo get_num_pessoas_comentarios($post->ID);
?>
</div>
        <?php 
html::part('show_evaluation');
?>


    </div>
    <?php 
if (get_theme_option('evaluation_show_on_list')) {
    ?>
                     
        <div class="evaluation_container" style="display: none;">
            <?php 
    html::part('evaluation');
    ?>
        </div>
    <?php 
}
?>
</li>
Example #26
0
		var myGallery = new gallery($('myGallery'), {
			timed: true,
			delay: 6000,
			slideInfoZoneOpacity: 0.8,
			showCarousel: false 
		});
	}
	window.addEvent('domready', startGallery);*/
</script>
	<div class="fp-slider clearfix">
    
    <div class="fp-slides-container clearfix">
        
        <div class="fp-slides">		
            	<?php 
    $featured_posts_category = get_theme_option('featured_posts_category');
    if ($featured_posts_category != '' && $featured_posts_category != '0') {
        global $post;
        $featured_posts = get_posts("numberposts=5&&category={$featured_posts_category}");
        $i = 0;
        foreach ($featured_posts as $post) {
            setup_postdata($post);
            if (version_compare($wp_version, '2.9', '>=')) {
                $slide_image_full = get_the_post_thumbnail($post->ID, 'large', array('class' => 'full'));
                $slide_image_thumbnail = get_the_post_thumbnail($post->ID, 'large', array('class' => 'thumbnail'));
            } else {
                $get_slide_image = get_post_meta($post->ID, 'featured', true);
                $slide_image_full = "<img src=\"{$get_slide_image}\" class=\"full\" alt=\"\" />";
                $slide_image_thumbnail = "<img src=\"{$get_slide_image}\" class=\"thumbnail\" alt=\"\" />";
            }
            ?>
Example #27
0
function twitter_script($unique_id, $limit)
{
    require_once dirname(__FILE__) . '/script/twitter/TwitterAPIExchange.php';
    /*GET TWITTER KEYS FROM ADMINISTRATION*/
    $twitter_consumer_key = get_theme_option(tk_theme_name . '_social_twitter_consumer_key');
    $twitter_consumer_secret = get_theme_option(tk_theme_name . '_social_twitter_consumer_secret');
    $twitter_access_token = get_theme_option(tk_theme_name . '_social_twitter_access_token');
    $twitter_token_secret = get_theme_option(tk_theme_name . '_social_twitter_token_secret');
    $twitter_username = get_theme_option(tk_theme_name . '_social_twitter');
    /** Set access tokens here - see: https://dev.twitter.com/apps/ **/
    $settings = array('oauth_access_token' => $twitter_access_token, 'oauth_access_token_secret' => $twitter_token_secret, 'consumer_key' => $twitter_consumer_key, 'consumer_secret' => $twitter_consumer_secret);
    /** URL for REST request, see: https://dev.twitter.com/docs/api/1.1/ **/
    $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
    $getfield = '?screen_name=' . $twitter_username;
    if (!empty($unique_id)) {
        $getfield .= "&count=" . $limit;
    } else {
        $getfield .= "&count=1";
    }
    $requestMethod = 'GET';
    /** Perform the request and echo the response **/
    $twitter = new TwitterAPIExchange($settings);
    $twitter_results = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();
    if ($unique_id !== 'home') {
        ?>
    <ul class="twitter_ul">
<?php 
    }
    foreach ($twitter_results as $single_tweet) {
        if (!empty($single_tweet->text)) {
            //gets twitter content, time and name
            $twitter_status = $single_tweet->text;
            $twitter_time = $single_tweet->created_at;
            $twitter_name = $single_tweet->user->screen_name;
            $twitter_status = preg_replace("#(^|[\n ])([\\w]+?://[\\w]+[^ \"\n\r\t< ]*)#", "\\1<a href=\"\\2\">\\2</a>", $twitter_status);
            $twitter_status = preg_replace("#(^|[\n ])((www|ftp)\\.[^ \"\t\n\r< ]*)#", "\\1<a href=\"http://\\2\">\\2</a>", $twitter_status);
            $twitter_status = preg_replace("/@(\\w+)/", "<a href=\"http://twitter.com/\\1\">@\\1</a>", $twitter_status);
            $twitter_status = preg_replace("/#(\\w+)/", "<a href=\"http://search.twitter.com/search?q=\\1\">#\\1</a>", $twitter_status);
            //checks if it's single tweet on home or twitter widget
            if ($unique_id == 'home') {
                ?>
                        
    <div class="home-twitter left">
        <div class="home-twitter-content">
            <img src="<?php 
                echo get_template_directory_uri();
                ?>
/style/img/twitter-home.png" alt="img" title="img" />
            <div class="home-twitter-text right">
                    <span><?php 
                echo $twitter_status;
                ?>
</span>
                    <p><?php 
                echo '@' . $twitter_name;
                ?>
</p>
            </div><!--/home-twitter-text-->
        </div><!--/home-twitter-content-->
    </div><!--/home-twitter-->       
            
    <?php 
                //use this if it's twitter widget
            } else {
                ?>
    
            <li><div class="bg-widget-center left"><span class="twitt"></span><span><?php 
                echo $twitter_status;
                ?>
</span></div><p class="twitter-links"><?php 
                echo twitter_time($twitter_time);
                ?>
</p></li>
    <?php 
            }
            //$unique_id == 'home'
            ?>
      

<?php 
        }
        //single_tweet->text
    }
    //uniquer_id
    if ($unique_id !== 'home') {
        ?>
    </ul>
    <?php 
    }
}
Example #28
0
</div>
</div>
	<div id="footer">
	
		
		    <?php 
if ($footerText = get_theme_option('Footer Text')) {
    ?>
        <p><?php 
    echo $footerText;
    ?>
</p>
        <?php 
}
?>
    <?php 
fire_plugin_hook('public_footer');
?>
		<ul class="pagination">
	
		</ul>
		<div class="row">
			<div class="footer-menu large-4 columns">
			
			<h4>About</h4>
		<ul class="link-list">
			<li><a href="http://omeka.org" id="omeka-logo" name="omeka-logo">Powered by Omeka</a></li> <li> <a href="http://omeka.org/codex/">Documentation</a></li> <li> <a href="http://omeka.org/forums/">Support Forums</a></li>
		</ul>
		</div>
		<div class="footer-menu large-4 columns">
			<h4>Menu</h4>
    /**
     * How to display the widget on the screen.
     */
    function widget($args, $instance)
    {
        extract($args);
        global $wp_query, $post;
        /* Our variables from the widget settings. */
        $title = apply_filters('widget_title', isset($instance['title']) ? $instance['title'] : '');
        $title_tabs = array(apply_filters('widget_title', isset($instance['title_author']) ? $instance['title_author'] : ''), apply_filters('widget_title', isset($instance['title_users']) ? $instance['title_users'] : ''));
        $number = isset($instance['number']) ? (int) $instance['number'] : '';
        $show_date = isset($instance['show_date']) ? (int) $instance['show_date'] : 0;
        $show_image = isset($instance['show_image']) ? (int) $instance['show_image'] : 0;
        $show_author = isset($instance['show_author']) ? (int) $instance['show_author'] : 0;
        $show_counters = isset($instance['show_counters']) ? (int) $instance['show_counters'] : 0;
        $category = isset($instance['category']) ? (int) $instance['category'] : 0;
        $counters = 'stars';
        $output = '';
        $tabs = array();
        $reviews_first_author = get_theme_option('reviews_first') == 'author';
        $reviews_second_hide = get_theme_option('reviews_second') == 'hide';
        for ($i = 0; $i < 2; $i++) {
            if ($i == 0 && !$reviews_first_author && $reviews_second_hide) {
                continue;
            }
            if ($i == 1 && $reviews_first_author && $reviews_second_hide) {
                continue;
            }
            $args = array('post_type' => 'post', 'post_status' => current_user_can('read_private_pages') && current_user_can('read_private_posts') ? array('publish', 'private') : 'publish', 'post_password' => '', 'posts_per_page' => $number, 'ignore_sticky_posts' => 1, 'order' => 'DESC', 'orderby' => 'meta_value_num', 'meta_key' => 'reviews_avg' . ($i == 0 ? '' : '2'));
            if ($category > 0) {
                $args['cat'] = $category;
            }
            $ex = get_theme_option('exclude_cats');
            if (!empty($ex)) {
                $args['category__not_in'] = explode(',', $ex);
            }
            query_posts($args);
            /* Loop posts */
            if (have_posts()) {
                $tabs[$i] = '<li><a href="#widget_top10_' . $i . '" class="theme_button"><span>' . $title_tabs[$i] . '</span></a></li>';
                $output .= '
					<div class="tab_content" id="widget_top10_' . $i . '"' . ($i == 1 && !$output ? ' style="display: block;"' : '') . '>
				';
                $post_number = 0;
                while (have_posts()) {
                    the_post();
                    $post_number++;
                    $post_id = get_the_ID();
                    $post_date = getDateOrDifference(get_the_date('Y-m-d H:i:s'));
                    $post_title = $post->post_title;
                    $post_link = get_permalink();
                    $output .= '
						<div class="post_item' . ($post_number == 1 ? ' first' : '') . '">
					';
                    if ($show_image) {
                        $post_thumb = getResizedImageTag($post_id, 60, 60);
                        if ($post_thumb) {
                            $output .= '
									<div class="post_thumb image_wrapper">' . $post_thumb . '</div>
							';
                        }
                    }
                    $output .= '
									<div class="post_wrapper">
										<h5 class="post_title theme_title' . ($show_counters == 2 ? '' : ' title_padding') . '"><a href="' . $post_link . '">' . $post_title . '</a></h5>
					';
                    if ($show_counters) {
                        $post_counters = marksToDisplay(get_post_meta($post_id, 'reviews_avg' . ($i == 0 ? '' : '2'), true));
                        if ($post_counters > 0) {
                            if (themerex_strlen($post_counters) == 1) {
                                $post_counters .= '.0';
                            }
                            if ($show_counters == 2 && get_custom_option('show_reviews') == 'yes') {
                                $output .= '
									<div class="reviews_summary blog_reviews">
										<div class="criteria_summary criteria_row">
											' . getReviewsSummaryStars($post_counters) . '
										</div>
									</div>
								';
                            }
                        }
                    }
                    if ($show_date || $show_counters || $show_author) {
                        $output .= '
										<div class="post_info theme_info">
						';
                        if ($show_date) {
                            $output .= '
												<span class="post_date theme_text">' . $post_date . '</span>
							';
                        }
                        if ($show_author) {
                            $post_author_id = $post->post_author;
                            $post_author_name = get_the_author_meta('display_name', $post_author_id);
                            $post_author_url = get_author_posts_url($post_author_id, '');
                            $output .= '
											<span class="post_author">' . __('by', 'themerex') . ' <a href="' . $post_author_url . '">' . $post_author_name . '</a></span>
							';
                        }
                        if ($show_counters == 1 && $post_counters) {
                            $output .= '
										<span class="post_comments"><a href="' . $post_link . '">
											<span class="comments_icon icon-star"></span><span class="post_comments_number">' . $post_counters . '</span>
										</a></span>';
                        }
                        $output .= '
										</div>
						';
                    }
                    $output .= '
							</div>
						</div>
					';
                    if ($post_number >= $number) {
                        break;
                    }
                }
                $output .= '
					</div>
				';
            }
        }
        /* Restore main wp_query and current post data in the global var $post */
        wp_reset_query();
        wp_reset_postdata();
        if (!empty($output)) {
            if (!$reviews_second_hide) {
                wp_enqueue_script('jquery-ui-tabs', false, array('jquery', 'jquery-ui-core'), null, true);
            }
            /* Before widget (defined by themes). */
            echo $before_widget;
            /* Display the widget title if one was input (before and after defined by themes). */
            if ($title) {
                echo $before_title . $title . $after_title;
            }
            echo '
				<div class="top10_tabs' . ($show_image ? '' : ' ordered_list') . ($show_image || $show_date || $show_author ? '' : ' flat_list') . '">' . (!$reviews_second_hide ? '<ul class="tabs">' . ($reviews_first_author ? $tabs[0] . $tabs[1] : $tabs[1] . $tabs[0]) . '</ul>' : '') . $output . (!$reviews_second_hide ? '
							<script type="text/javascript">
								jQuery(document).ready(function() {
									jQuery(\'.top10_tabs\').tabs();
								});
							</script>' : '') . '
				</div>
			';
            /* After widget (defined by themes). */
            echo $after_widget;
        }
    }
        wp_title("", true);
        ?>
</h1>
                <div class="append-bottom"></div>
                <?php 
        echo $termDiscription;
        ?>
            </div>
        <?php 
    }
    ?>
    <?php 
} else {
    ?>
        <?php 
    echo get_theme_option('object_list_intro');
    ?>
    <?php 
}
?>
 
    
    <section class="tema">
        <ul>
            <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        html::part('loop-single-list-title');
    }
}