예제 #1
0
 function vp_ajax_wrapper()
 {
     $function = $_POST['func'];
     $params = $_POST['params'];
     if (VP_Security::instance()->is_function_whitelisted($function)) {
         if (!is_array($params)) {
             $params = array($params);
         }
         try {
             $result['data'] = call_user_func_array($function, $params);
             $result['status'] = true;
             $result['message'] = __("Successful", 'vp_textdomain');
         } catch (Exception $e) {
             $result['data'] = '';
             $result['status'] = false;
             $result['message'] = $e->getMessage();
         }
     } else {
         $result['data'] = '';
         $result['status'] = false;
         $result['message'] = __("Unauthorized function", 'vp_textdomain');
     }
     if (ob_get_length()) {
         ob_clean();
     }
     header('Content-type: application/json');
     echo json_encode($result);
     die;
 }
예제 #2
0
파일: Admin.php 프로젝트: wir/WP-Tiles
 public static function setup()
 {
     \VP_Security::instance()->whitelist_function('wp_tiles_preview_tile');
     self::$options = self::setup_options();
     self::$shortcode_generator = self::setup_shortcode_generator();
     GridTemplates::get_instance();
     add_action('wp_tiles_after_admin_page', array(__CLASS__, 'render_about_box'));
 }
예제 #3
0
    global $woocommerce;
    if ($woocommerce) {
        $woo_posts = new WP_Query(array('posts_per_page' => 10, 'post_type' => 'product', 'post_status' => 'publish'));
        $rehub_count_woo = $woo_posts->max_num_pages;
        if ($rehub_count_woo < 50) {
            $woo_product_select = array('type' => 'select', 'name' => 'review_woo_link', 'label' => __('Choose woocommerce product', 'rehub_framework'), 'description' => __('Choose woocommerce product for review', 'rehub_framework'), 'items' => array('data' => array(array('source' => 'function', 'value' => 'rehub_get_woo'))), 'default' => '');
        } else {
            $woo_product_select = array('type' => 'textbox', 'name' => 'review_woo_link', 'label' => __('Set woocommerce product ID', 'rehub_framework'), 'description' => __('Type Id of woocommerce product', 'rehub_framework'), 'default' => '');
        }
        wp_reset_postdata();
    } else {
        $woo_product_select = array('type' => 'textbox', 'name' => 'review_woo_link', 'label' => __('Set woocommerce product ID', 'rehub_framework'), 'description' => __('Type Id of woocommerce product', 'rehub_framework'), 'default' => '');
    }
    return $woo_product_select;
}
VP_Security::instance()->whitelist_function('rehub_woo_select_two');
function rehub_woo_select_two()
{
    global $woocommerce;
    if ($woocommerce) {
        $woo_posts = new WP_Query(array('posts_per_page' => 10, 'post_type' => 'product', 'post_status' => 'publish'));
        $rehub_count_woo = $woo_posts->max_num_pages;
        if ($rehub_count_woo < 50) {
            $woo_products_select = array('type' => 'sorter', 'name' => 'review_woo_list_links', 'label' => __('Choose woocommerce offers', 'rehub_framework'), 'description' => __('Choose woocommerce offers that you want to show in list', 'rehub_framework'), 'items' => array('data' => array(array('source' => 'function', 'value' => 'rehub_get_woo'))));
        } else {
            $woo_products_select = array('type' => 'textbox', 'name' => 'review_woo_list_links', 'label' => __('Set woocommerce product IDs', 'rehub_framework'), 'description' => __('Insert woocommerce IDs of offers that you want to show in list with commas. Example, 22,33,45', 'rehub_framework'));
        }
        wp_reset_postdata();
    } else {
        $woo_products_select = array('type' => 'textbox', 'name' => 'review_woo_list_links', 'label' => __('Set woocommerce product IDs', 'rehub_framework'), 'description' => __('Insert woocommerce IDs of offers that you want to show in list with commas. Example, 22,33,45', 'rehub_framework'));
    }
예제 #4
0
function vp_dep_is_video($value)
{
    if ($value === 'video') {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('vp_dep_is_custom_color');
function vp_dep_is_custom_color($value)
{
    if ($value === 'custom') {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('vp_dep_is_custom_header');
function vp_dep_is_custom_header($value)
{
    if ($value === true) {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('vp_dep_show_footer');
function vp_dep_show_footer($value)
{
    if ($value === true) {
        return true;
    }
    return false;
}
예제 #5
0
파일: admin.php 프로젝트: GaryJones/m2xdemo
 public function whitelist_functions()
 {
     VP_Security::instance()->whitelist_function('vp_pf_dep_portfolio_images_mode_image');
     VP_Security::instance()->whitelist_function('vp_pf_dep_portfolio_images_mode_video');
     VP_Security::instance()->whitelist_function('vp_pf_dep_portfolio_images_mode_video_external');
     VP_Security::instance()->whitelist_function('vp_pf_dep_portfolio_images_mode_video_internal');
 }
예제 #6
0
    } else {
        return false;
    }
}
VP_Security::instance()->whitelist_function('jeg_plugin_use_fullwidth');
function jeg_plugin_use_fullwidth($value)
{
    return !$value;
}
VP_Security::instance()->whitelist_function('jeg_get_team_member');
function jeg_get_team_member()
{
    $result = array();
    $pages = new WP_Query(array('post_type' => 'team', 'nopaging' => true));
    $pages = $pages->posts;
    foreach ($pages as $page) {
        $result[] = array('value' => $page->ID, 'label' => $page->post_title);
    }
    return $result;
}
VP_Security::instance()->whitelist_function('jeg_get_pricing');
function jeg_get_pricing()
{
    $result = array();
    $pages = new WP_Query(array('post_type' => 'pricing', 'nopaging' => true));
    $pages = $pages->posts;
    foreach ($pages as $page) {
        $result[] = array('value' => $page->ID, 'label' => $page->post_title);
    }
    return $result;
}
VP_Security::instance()->whitelist_function('wpurp_admin_custom_fields');
VP_Security::instance()->whitelist_function('wpurp_admin_manage_tags');
VP_Security::instance()->whitelist_function('wpurp_admin_template_editor_recipe');
VP_Security::instance()->whitelist_function('wpurp_admin_template_editor');
VP_Security::instance()->whitelist_function('wpurp_admin_templates');
VP_Security::instance()->whitelist_function('wpurp_admin_import_easyrecipe');
VP_Security::instance()->whitelist_function('wpurp_admin_import_recipecard');
VP_Security::instance()->whitelist_function('wpurp_admin_import_recipress');
VP_Security::instance()->whitelist_function('wpurp_admin_import_ziplist');
VP_Security::instance()->whitelist_function('wpurp_admin_import_xml');
VP_Security::instance()->whitelist_function('wpurp_admin_import_fdx');
VP_Security::instance()->whitelist_function('wpurp_admin_export_xml');
VP_Security::instance()->whitelist_function('wpurp_admin_system_3');
VP_Security::instance()->whitelist_function('wpurp_admin_system_4');
VP_Security::instance()->whitelist_function('wpurp_admin_system_5');
VP_Security::instance()->whitelist_function('wpurp_admin_system_cups');
VP_Security::instance()->whitelist_function('wpurp_get_unit_systems');
VP_Security::instance()->whitelist_function('wpurp_alias_options');
VP_Security::instance()->whitelist_function('vp_dep_boolean_inverse');
VP_Security::instance()->whitelist_function('wpurp_font_preview');
VP_Security::instance()->whitelist_function('wpurp_font_preview_with_text');
VP_Security::instance()->whitelist_function('wpurp_reset_demo_recipe');
VP_Security::instance()->whitelist_function('wpurp_manage_recipe_grid');
VP_Security::instance()->whitelist_function('wpurp_reset_recipe_grid_terms');
VP_Security::instance()->whitelist_function('wpurp_reset_cache');
VP_Security::instance()->whitelist_function('wpurp_admin_user_submission_required_fields');
VP_Security::instance()->whitelist_function('wpurp_admin_recipe_tags');
VP_Security::instance()->whitelist_function('wpurp_admin_category_terms');
VP_Security::instance()->whitelist_function('wpurp_admin_tag_terms');
VP_Security::instance()->whitelist_function('wpurp_admin_post_types');
    while (true) {
        $args = array('post_type' => 'menu', 'post_status' => array('publish', 'private'), 'posts_per_page' => $limit, 'offset' => $offset);
        $query = new WP_Query($args);
        if (!$query->have_posts()) {
            break;
        }
        $posts = $query->posts;
        foreach ($posts as $post) {
            $id = $post->ID;
            $author = $post->post_author;
            if (!in_array($author, $menu_author_ids)) {
                $menu_author_ids[] = $author;
                $user = get_userdata($author);
                $name = $user ? $user->display_name : __('n/a', 'wp-ultimate-recipe');
                $menu_authors[] = array('value' => $author, 'label' => $name);
            }
            wp_cache_delete($id, 'posts');
            wp_cache_delete($id, 'post_meta');
        }
        $offset += $limit;
        wp_cache_flush();
    }
    return $menu_authors;
}
VP_Security::instance()->whitelist_function('wpurp_shortcode_generator_templates');
VP_Security::instance()->whitelist_function('wpurp_shortcode_generator_recipes_by_date');
VP_Security::instance()->whitelist_function('wpurp_shortcode_generator_recipes_by_title');
VP_Security::instance()->whitelist_function('wpurp_shortcode_generator_taxonomies');
VP_Security::instance()->whitelist_function('wpurp_shortcode_generator_authors');
VP_Security::instance()->whitelist_function('wpurp_shortcode_generator_user_menu_authors');
예제 #9
0
    return false;
}
VP_Security::instance()->whitelist_function('sh_dep_pb_dropdown');
function sh_dep_pb_dropdown($value)
{
    if ($value == 'select') {
        return true;
    } elseif ($value == 'video') {
        return true;
    } else {
        return false;
    }
}
VP_Security::instance()->whitelist_function('sh_dep_pb_checkbox');
function sh_dep_pb_checkbox($value)
{
    if ($value == 'checkbox') {
        return true;
    } else {
        return false;
    }
}
VP_Security::instance()->whitelist_function('sh_dep_pb_radio');
function sh_dep_pb_radio($value)
{
    if ($value == 'radio') {
        return true;
    } else {
        return false;
    }
}
예제 #10
0
}
VP_Security::instance()->whitelist_function('sh_get_sidebars_2');
function sh_get_sidebars_2()
{
    global $wp_registered_sidebars;
    $sidebars = !$wp_registered_sidebars ? get_option('wp_registered_sidebars') : $wp_registered_sidebars;
    $data = array(array('value' => '', 'label' => __('No Sidebar', SH_NAME)));
    foreach ((array) $sidebars as $sidebar) {
        $data[] = array('value' => sh_set($sidebar, 'id'), 'label' => sh_set($sidebar, 'name'));
    }
    return $data;
}
/*------------------------------------------------*/
VP_Security::instance()->whitelist_function('vp_dep_style1');
VP_Security::instance()->whitelist_function('vp_dep_style2');
VP_Security::instance()->whitelist_function('vp_dep_style3');
function vp_dep_style1($value)
{
    if ($value == 'normal') {
        return true;
    }
    return false;
}
function vp_dep_style2($value)
{
    if ($value == 'side') {
        return true;
    }
    return false;
}
function vp_dep_style3($value)
예제 #11
0
function hb_page_featured_image($value)
{
    if ($value == 'featured_image') {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('hb_page_featured_revslider');
function hb_page_featured_revslider($value)
{
    if ($value == 'revolution') {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('hb_page_featured_layer');
function hb_page_featured_layer($value)
{
    if ($value == 'layer') {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('hb_page_featured_video');
function hb_page_featured_video($value)
{
    if ($value == 'video') {
        return true;
    }
    return false;
}
예제 #12
0
        return $return;
    }
    VP_Security::instance()->whitelist_function('jobboard_get_sliders');
}
//endif;
if (!function_exists('jobboard_get_entrance_slider_animation')) {
    function jobboard_get_entrance_slider_animation()
    {
        $data_animation = array('bounceIn' => __('Bounce-In', 'jobboard'), 'bounceInDown' => __('Bounce-In-Down', 'jobboard'), 'bounceInLeft' => __('Bounce-In-Left', 'jobboard'), 'bounceInRight' => __('Bounce-In-Right', 'jobboard'), 'bounceInUp' => __('Bounce-In-Up', 'jobboard'), 'fadeIn' => __('Fade-In', 'jobboard'), 'fadeInDown' => __('Fade-In-Down', 'jobboard'), 'fadeInDownBig' => __('Fade-In-Down-Big', 'jobboard'), 'fadeInLeft' => __('Fade-In-Left', 'jobboard'), 'fadeInLeftBig' => __('Fade-In-Left-Big', 'jobboard'), 'fadeInRight' => __('Fade-In-Right', 'jobboard'), 'fadeInRightBig' => __('Fade-In-Right-Big', 'jobboard'), 'fadeInUp' => __('Fade-In-Up', 'jobboard'), 'fadeInUpBig' => __('Fade-In-Up-Big', 'jobboard'), 'flipInX' => __('Flip-In-X', 'jobboard'), 'flipInY' => __('Flip-In-Y', 'jobboard'), 'lightSpeedIn' => __('Light-Speed-In', 'jobboard'), 'rotateIn' => __('Rotate-In', 'jobboard'), 'rotateInDownLeft' => __('Rotate-In-Down-Left', 'jobboard'), 'rotateInDownRight' => __('Rotate-In-Down-Right', 'jobboard'), 'rotateInUpLeft' => __('Rotate-In-Up-Left', 'jobboard'), 'rotateInUpRight' => __('Rotate-In-Up-Right', 'jobboard'), 'rollIn' => __('Roll-In', 'jobboard'), 'zoomIn' => __('Zoom-In', 'jobboard'), 'zoomInDown' => __('Zoom-In-Down', 'jobboard'), 'zoomInLeft' => __('Zoom-In-Left', 'jobboard'), 'zoomInRight' => __('Zoom-In-Right', 'jobboard'), 'zoomInUp' => __('Zoom-In-Up', 'jobboard'));
        $return = array();
        foreach ($data_animation as $key => $value) {
            $return[] = array('value' => $key, 'label' => $value);
        }
        return $return;
    }
    VP_Security::instance()->whitelist_function('jobboard_get_entrance_slider_animation');
}
//endif;
if (!function_exists('jobboard_get_exit_slider_animation')) {
    function jobboard_get_exit_slider_animation()
    {
        $data_animation = array('bounceOut' => __('Bounce-Out', 'jobboard'), 'bounceOutDown' => __('Bounce-Out-Down', 'jobboard'), 'bounceOutLeft' => __('Bounce-Out-Left', 'jobboard'), 'bounceOutRight' => __('Bounce-Out-Right', 'jobboard'), 'bounceOutUp' => __('Bounce-Out-Up', 'jobboard'), 'fadeOut' => __('Fade-Out', 'jobboard'), 'fadeOutDown' => __('Fade-Out-Down', 'jobboard'), 'fadeOutDownBig' => __('Fade-Out-Down-Big', 'jobboard'), 'fadeOutLeft' => __('Fade-Out-Left', 'jobboard'), 'fadeOutLeftBig' => __('Fade-Out-Left-Big', 'jobboard'), 'fadeOutRight' => __('Fade-Out-Right', 'jobboard'), 'fadeOutRightBig' => __('Fade-Out-Right-Big', 'jobboard'), 'fadeOutUp' => __('Fade-Out-Up', 'jobboard'), 'fadeOutUpBig' => __('Fade-Out-Up-Big', 'jobboard'), 'flipOutX' => __('Flip-Out-X', 'jobboard'), 'flipOutY' => __('Flip-Out-Y', 'jobboard'), 'lightSpeedOut' => __('Light-Speed-Out', 'jobboard'), 'rotateOut' => __('Rotate-Out', 'jobboard'), 'rotateOutDownLeft' => __('Rotate-Out-Down-Left', 'jobboard'), 'rotateOutDownRight' => __('Rotate-Out-Down-Right', 'jobboard'), 'rotateOutUpLeft' => __('Rotate-Out-Up-Left', 'jobboard'), 'rotateOutUpRight' => __('Rotate-Out-Up-Right', 'jobboard'), 'rollOut' => __('Roll-Out', 'jobboard'), 'zoomOut' => __('Zoom-Out', 'jobboard'), 'zoomOutDown' => __('Zoom-Out-Down', 'jobboard'), 'zoomOutLeft' => __('Zoom-Out-Left', 'jobboard'), 'zoomOutRight' => __('Zoom-Out-Right', 'jobboard'), 'zoomOutUp' => __('Zoom-Out-Up', 'jobboard'));
        $return = array();
        foreach ($data_animation as $key => $value) {
            $return[] = array('value' => $key, 'label' => $value);
        }
        return $return;
    }
    VP_Security::instance()->whitelist_function('jobboard_get_exit_slider_animation');
}
//endif;
예제 #13
0
function k_get_layout_style_5($selection)
{
    if ($selection === '1_3-2_3') {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('k_get_layout_style_6');
function k_get_layout_style_6($selection)
{
    if ($selection === '2_3-1_3') {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('k_get_layout_style_7');
function k_get_layout_style_7($selection)
{
    if ($selection === '1_4-3_4') {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('k_get_layout_style_8');
function k_get_layout_style_8($selection)
{
    if ($selection === '3_4-1_4') {
        return true;
    }
    return false;
}
예제 #14
0
    // Built path to metabox template array file
    //$text=$product->get_attribute('pa_soffietto');
    //return $text;
}
VP_Security::instance()->whitelist_function('soff_func');
function vp_bind_selectize($title)
{
    $terms = get_terms('pa_' . $title, 'orderby=name&hide_empty=0');
    $result = array();
    foreach ($terms as $term) {
        $data = $term->name;
        $result[] = array('value' => $data, 'label' => $data);
    }
    return $result;
}
VP_Security::instance()->whitelist_function('vp_bind_selectize');
function create_textbox($name, $title = '', $change = false)
{
    $title = $title != '' ? $title : $name;
    $comp_name = $change ? $name : 'pa_' . $name;
    return array('type' => 'textbox', 'name' => $comp_name, 'label' => __(ucfirst($title), 'vp_textdomain'), 'binding' => array('function' => 'soff_func', 'field' => $comp_name));
}
function create_ebay_dep($name, $title = '', $type, $change = false)
{
    $title = $title != '' ? $title : $name;
    $comp_name = $change ? $name : 'pa_' . $name;
    return array('type' => $type, 'name' => $comp_name, 'label' => __(ucfirst($title), 'vp_textdomain'), 'dependency' => array('field' => 'libro_type', 'function' => 'vp_dep_boolean_ebay'), 'binding' => array('function' => 'soff_func', 'field' => $comp_name));
}
function create_texarea($name, $title = '')
{
    $title = $title != '' ? $title : $name;
예제 #15
0
        case 'blue':
            return '#0000ff';
        default:
            return '#000000';
    }
}
VP_Security::instance()->whitelist_function('vp_bind_color_subtle');
function vp_bind_color_subtle($preset)
{
    return vp_bind_color_accent($preset);
}
VP_Security::instance()->whitelist_function('vp_bind_color_background');
function vp_bind_color_background($preset)
{
    return vp_bind_color_accent($preset);
}
VP_Security::instance()->whitelist_function('vp_font_preview');
function vp_font_preview($face, $style, $weight, $size, $line_height)
{
    $gwf = new VP_Site_GoogleWebFont();
    $gwf->add($face, $style, $weight);
    $links = $gwf->get_font_links();
    $link = reset($links);
    $dom = <<<EOD
<link href='{$link}' rel='stylesheet' type='text/css'>
<p style="padding: 0 10px 0 10px; font-family: {$face}; font-style: {$style}; font-weight: {$weight}; font-size: {$size}px; line-height: {$line_height}em;">
\tGrumpy wizards make toxic brew for the evil Queen and Jack
</p>
EOD;
    return $dom;
}
function vp_dep_is_tags($value)
{
    if ($value === 'tags') {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('vp_bind_color_accent');
function vp_bind_color_accent($preset)
{
    switch ($preset) {
        case 'red':
            return '#ff0000';
        case 'green':
            return '#00ff00';
        case 'blue':
            return '#0000ff';
        default:
            return '#000000';
    }
}
VP_Security::instance()->whitelist_function('vp_bind_color_subtle');
function vp_bind_color_subtle($preset)
{
    return vp_bind_color_accent($preset);
}
VP_Security::instance()->whitelist_function('vp_bind_color_background');
function vp_bind_color_background($preset)
{
    return vp_bind_color_accent($preset);
}
예제 #17
0
{
    $ret = array();
    foreach (ld_get_regular_font_faces() as $font) {
        $ret[] = array('label' => sprintf(__('Standard : %s', 'lovey_dovey'), $font), 'value' => $font);
    }
    return $ret;
}
/**
 * Social Media Links
 */
function ld_data_source_social_media_links()
{
    return array(array('value' => 'behance', 'label' => 'Behance'), array('value' => 'blogger', 'label' => 'Blogger'), array('value' => 'delicious', 'label' => 'Delicious'), array('value' => 'deviantart', 'label' => 'DeviantArt'), array('value' => 'digg', 'label' => 'Digg'), array('value' => 'dribbble', 'label' => 'Dribbble'), array('value' => 'dropbox', 'label' => 'Dropbox'), array('value' => 'email', 'label' => 'Email'), array('value' => 'facebook', 'label' => 'Facebook'), array('value' => 'flickr', 'label' => 'Flickr'), array('value' => 'forrst', 'label' => 'Forrst'), array('value' => 'foursquare', 'label' => 'Foursquare'), array('value' => 'github', 'label' => 'Github'), array('value' => 'googleplus', 'label' => 'Google+'), array('value' => 'instagram', 'label' => 'Instagram'), array('value' => 'lastfm', 'label' => 'Last.FM'), array('value' => 'linkedin', 'label' => 'LinkedIn'), array('value' => 'myspace', 'label' => 'MySpace'), array('value' => 'pinterest', 'label' => 'Pinterest'), array('value' => 'reddit', 'label' => 'Reddit'), array('value' => 'rss', 'label' => 'RSS'), array('value' => 'skype', 'label' => 'Skype'), array('value' => 'soundcloud', 'label' => 'SoundCloud'), array('value' => 'stumbleupon', 'label' => 'StumbleUpon'), array('value' => 'tumblr', 'label' => 'Tumblr'), array('value' => 'twitter', 'label' => 'Twitter'), array('value' => 'vimeo', 'label' => 'Vimeo'), array('value' => 'wordpress', 'label' => 'WordPress'), array('value' => 'xing', 'label' => 'Xing'), array('value' => 'yahoo', 'label' => 'Yahoo'), array('value' => 'youtube', 'label' => 'Youtube'));
}
function ld_ninja_form_get_fields_by_form_id($form_id)
{
    $return = array();
    if (function_exists('ninja_forms_get_fields_by_form_id')) {
        $all_fields = ninja_forms_get_fields_by_form_id($form_id);
        if (!empty($all_fields)) {
            foreach ($all_fields as $field) {
                if ($field['type'] !== '_submit') {
                    $return[] = array('label' => $field['data']['label'] . ' (' . $field['id'] . ')', 'value' => $field['id']);
                }
            }
        }
    }
    return $return;
}
VP_Security::instance()->whitelist_function('ld_ninja_form_get_fields_by_form_id');
예제 #18
0
    /**
     * product type value cars
     *
     * @return void
     * @author alispx
     **/
    function upwork_product_type_cars_value($value)
    {
        if ($value === 'cars') {
            return true;
        }
        return false;
    }
    VP_Security::instance()->whitelist_function('upwork_product_type_cars_value');
    /**
     * product type value watches
     *
     * @return void
     * @author alispx
     **/
    function upwork_product_type_watches_value($value)
    {
        if ($value === 'watches') {
            return true;
        }
        return false;
    }
    VP_Security::instance()->whitelist_function('upwork_product_type_watches_value');
    $product_details = array('id' => 'upwork_page_options', 'types' => array('page'), 'title' => esc_html__('Product Details', 'jogja'), 'priority' => 'high', 'context' => 'normal', 'template' => array(array('type' => 'select', 'name' => 'product_type', 'label' => esc_html__('Product Type', 'jogja'), 'items' => array(array('value' => 'watches', 'label' => esc_html__('Watches', 'jogja')), array('value' => 'cars', 'label' => esc_html__('Cars', 'jogja'))), 'default' => array('cars')), array('type' => 'group', 'repeating' => false, 'length' => 1, 'name' => 'cars_details', 'title' => esc_html__('Cars Details', 'jogja'), 'dependency' => array('field' => 'product_type', 'function' => 'upwork_product_type_cars_value'), 'fields' => array(array('type' => 'textbox', 'name' => 'year', 'label' => esc_html__('Year', 'jogja')), array('type' => 'textbox', 'name' => 'make', 'label' => esc_html__('Make', 'jogja')), array('type' => 'textbox', 'name' => 'model', 'label' => esc_html__('Model', 'jogja')), array('type' => 'textbox', 'name' => 'trim', 'label' => esc_html__('Trim', 'jogja')), array('type' => 'textbox', 'name' => 'mileage', 'label' => esc_html__('Mileage', 'jogja')), array('type' => 'textbox', 'name' => 'engine', 'label' => esc_html__('Engine', 'jogja')), array('type' => 'textbox', 'name' => 'exterior_color', 'label' => esc_html__('Exterior Color', 'jogja')), array('type' => 'textbox', 'name' => 'interior_color', 'label' => esc_html__('Interior Color', 'jogja')), array('type' => 'textbox', 'name' => 'drive_train', 'label' => esc_html__('Drive Train', 'jogja')), array('type' => 'textbox', 'name' => 'transmission', 'label' => esc_html__('Transmission', 'jogja')), array('type' => 'textbox', 'name' => 'body_style', 'label' => esc_html__('Body Style', 'jogja')), array('type' => 'textbox', 'name' => 'doors', 'label' => esc_html__('Doors', 'jogja')), array('type' => 'textbox', 'name' => 'wheelbase', 'label' => esc_html__('Wheelbase', 'jogja')), array('type' => 'textbox', 'name' => 'fuel', 'label' => esc_html__('Fuel', 'jogja')), array('type' => 'textbox', 'name' => 'stock', 'label' => esc_html__('Stock', 'jogja')), array('type' => 'textbox', 'name' => 'vin', 'label' => esc_html__('Vin', 'jogja')), array('type' => 'textbox', 'name' => 'dpr', 'label' => esc_html__('DPR', 'jogja')))), array('type' => 'group', 'repeating' => false, 'length' => 1, 'name' => 'wathces_basic_info', 'title' => esc_html__('Basic Info', 'jogja'), 'dependency' => array('field' => 'product_type', 'function' => 'upwork_product_type_watches_value'), 'fields' => array(array('type' => 'textbox', 'name' => 'ref_no', 'label' => esc_html__('Ref. No.', 'jogja')), array('type' => 'textbox', 'name' => 'movement', 'label' => esc_html__('Movement', 'jogja')), array('type' => 'textbox', 'name' => 'case_material', 'label' => esc_html__('Case material', 'jogja')), array('type' => 'textbox', 'name' => 'bracelet_material', 'label' => esc_html__('Bracelet material', 'jogja')), array('type' => 'textbox', 'name' => 'year', 'label' => esc_html__('Year', 'jogja')), array('type' => 'textbox', 'name' => 'condition', 'label' => esc_html__('Condition', 'jogja')), array('type' => 'textbox', 'name' => 'gender', 'label' => esc_html__('Gender', 'jogja')), array('type' => 'textbox', 'name' => 'location', 'label' => esc_html__('Location', 'jogja')), array('type' => 'textbox', 'name' => 'availability', 'label' => esc_html__('Availability', 'jogja')))), array('type' => 'group', 'repeating' => false, 'length' => 1, 'name' => 'wathces_caliber_info', 'title' => esc_html__('Caliber', 'jogja'), 'dependency' => array('field' => 'product_type', 'function' => 'upwork_product_type_watches_value'), 'fields' => array(array('type' => 'textbox', 'name' => 'caliber', 'label' => esc_html__('Caliber', 'jogja')))), array('type' => 'group', 'repeating' => false, 'length' => 1, 'name' => 'wathces_case_info', 'title' => esc_html__('Case', 'jogja'), 'dependency' => array('field' => 'product_type', 'function' => 'upwork_product_type_watches_value'), 'fields' => array(array('type' => 'textbox', 'name' => 'case_material', 'label' => esc_html__('Case material', 'jogja')), array('type' => 'textbox', 'name' => 'case_diameter', 'label' => esc_html__('Case diameter', 'jogja')), array('type' => 'textbox', 'name' => 'material_bezel', 'label' => esc_html__('Material bezel', 'jogja')), array('type' => 'textbox', 'name' => 'glass', 'label' => esc_html__('Glass', 'jogja')), array('type' => 'textbox', 'name' => 'dial', 'label' => esc_html__('Dial', 'jogja')), array('type' => 'textbox', 'name' => 'dial_numerals', 'label' => esc_html__('Dial numerals', 'jogja')))), array('type' => 'group', 'repeating' => false, 'length' => 1, 'name' => 'wathces_bracelet_info', 'title' => esc_html__('Bracelet/strap', 'jogja'), 'dependency' => array('field' => 'product_type', 'function' => 'upwork_product_type_watches_value'), 'fields' => array(array('type' => 'textbox', 'name' => 'bracelet_material', 'label' => esc_html__('Bracelet material', 'jogja')), array('type' => 'textbox', 'name' => 'bracelet_color', 'label' => esc_html__('Bracelet color', 'jogja')), array('type' => 'textbox', 'name' => 'clasp', 'label' => esc_html__('Clasp', 'jogja')), array('type' => 'textbox', 'name' => 'clasp_material', 'label' => esc_html__('Clasp material', 'jogja')))), array('type' => 'group', 'repeating' => false, 'length' => 1, 'name' => 'wathces_comments', 'title' => esc_html__('Comments', 'jogja'), 'dependency' => array('field' => 'product_type', 'function' => 'upwork_product_type_watches_value'), 'fields' => array(array('type' => 'textarea', 'name' => 'comments', 'label' => esc_html__('Comments', 'jogja'))))));
    new VP_Metabox($product_details);
}
예제 #19
0
        foreach ($matches as $match) {
            $icons[] = array('value' => 'fa ' . $match[1], 'label' => $match[1]);
        }
        set_transient('vp_fontawesome_icons', $icons, 60 * 60 * 24);
    }
    return $icons;
}
VP_Security::instance()->whitelist_function('vp_dep_boolean');
function vp_dep_boolean($value = null)
{
    $args = func_get_args();
    $result = true;
    foreach ($args as $val) {
        $result = ($result and !empty($val));
    }
    return $result;
}
VP_Security::instance()->whitelist_function('sh_get_sidebars_2');
function sh_get_sidebars_2()
{
    global $wp_registered_sidebars;
    $sidebars = !$wp_registered_sidebars ? get_option('wp_registered_sidebars') : $wp_registered_sidebars;
    $data = array(array('value' => '', 'label' => __('No Sidebar', SH_NAME)));
    foreach ((array) $sidebars as $sidebar) {
        $data[] = array('value' => sh_set($sidebar, 'id'), 'label' => sh_set($sidebar, 'name'));
    }
    return $data;
}
/**
 * EOF
 */
예제 #20
0
// @see theme-options.php
function adventure_tours_vp_is_tour_categories_visible_on_search($values)
{
    return $values && is_array($values) && in_array('__tour_categories_filter', $values);
}
VP_Security::instance()->whitelist_function('adventure_tours_vp_is_tour_categories_visible_on_search');
/**
 * Checks if user selected tours page style grid.
 * 
 * @return boolean
 */
function adventure_tours_vp_tour_page_style_is_grid($value)
{
    return $value == 'grid';
}
VP_Security::instance()->whitelist_function('adventure_tours_vp_tour_page_style_is_grid');
/**
 * Theme options helper function.
 * Returns list of available attributes (attributes that have few values saved for a tours) for tour entities.
 *
 * @return array
 */
function adventure_tours_vp_get_tour_attributes_list()
{
    static $cache;
    $ignore_empty_lists = false;
    if (null != $cache) {
        return $cache;
    }
    $result = array();
    if (adventure_tours_check('tour_category_taxonomy_exists')) {
예제 #21
0
        $icons = array();
        foreach ($matches as $match) {
            $icons[] = array('value' => $match[1], 'label' => $match[1]);
        }
        set_transient('vp_fontawesome_icons', $icons, 60 * 60 * 24);
    }
    return $icons;
}
VP_Security::instance()->whitelist_function('vp_dep_boolean');
function vp_dep_boolean($value)
{
    $args = func_get_args();
    $result = true;
    foreach ($args as $val) {
        $result = ($result and !empty($val));
    }
    return $result;
}
function vp_gallery_image($value)
{
    return $value == "image" ? true : false;
}
VP_Security::instance()->whitelist_function('vp_gallery_image');
function vp_gallery_video($value)
{
    return $value == "video" ? true : false;
}
VP_Security::instance()->whitelist_function('vp_gallery_video');
/**
 * EOF
 */
예제 #22
0
 */
VP_Security::instance()->whitelist_function('willow_dependency_hero_slide_button');
function willow_dependency_hero_slide_button($value)
{
    if ($value != 'style-0') {
        return true;
    }
    return false;
}
/**
 * Dependency: Hero Slide Button 2
 */
VP_Security::instance()->whitelist_function('willow_dependency_hero_slide_button_2');
function willow_dependency_hero_slide_button_2($value)
{
    if (!in_array($value, array('style-0', 'style-1', 'style-2'))) {
        return true;
    }
    return false;
}
/**
 * Dependency: Hero Slide CSS animation
 */
VP_Security::instance()->whitelist_function('willow_dependency_hero_slide_css_animation');
function willow_dependency_hero_slide_css_animation($value)
{
    if ($value !== 'style-0') {
        return true;
    }
    return false;
}
예제 #23
0
    $socmeds = array(array('value' => 'blogger', 'label' => 'Blogger'), array('value' => 'delicious', 'label' => 'Delicious'), array('value' => 'deviantart', 'label' => 'DeviantArt'), array('value' => 'digg', 'label' => 'Digg'), array('value' => 'dribbble', 'label' => 'Dribbble'), array('value' => 'email', 'label' => 'Email'), array('value' => 'facebook', 'label' => 'Facebook'), array('value' => 'flickr', 'label' => 'Flickr'), array('value' => 'forrst', 'label' => 'Forrst'), array('value' => 'foursquare', 'label' => 'Foursquare'), array('value' => 'github', 'label' => 'Github'), array('value' => 'googleplus', 'label' => 'Google+'), array('value' => 'instagram', 'label' => 'Instagram'), array('value' => 'lastfm', 'label' => 'Last.FM'), array('value' => 'linkedin', 'label' => 'LinkedIn'), array('value' => 'myspace', 'label' => 'MySpace'), array('value' => 'pinterest', 'label' => 'Pinterest'), array('value' => 'reddit', 'label' => 'Reddit'), array('value' => 'rss', 'label' => 'RSS'), array('value' => 'soundcloud', 'label' => 'SoundCloud'), array('value' => 'stumbleupon', 'label' => 'StumbleUpon'), array('value' => 'tumblr', 'label' => 'Tumblr'), array('value' => 'twitter', 'label' => 'Twitter'), array('value' => 'vimeo', 'label' => 'Vimeo'), array('value' => 'wordpress', 'label' => 'WordPress'), array('value' => 'yahoo', 'label' => 'Yahoo!'), array('value' => 'youtube', 'label' => 'Youtube'));
    return $socmeds;
}
function vp_get_fontawesome_icons()
{
    // scrape list of icons from fontawesome css
    if (false === ($icons = get_transient('vp_fontawesome_icons'))) {
        $pattern = '/\\.(fa-(?:\\w+(?:-)?)+):before\\s*{\\s*content/';
        $subject = file_get_contents(VP_DIR . '/public/css/vendor/font-awesome.min.css');
        preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
        $icons = array();
        foreach ($matches as $match) {
            $icons[] = array('value' => $match[1], 'label' => $match[1]);
        }
        set_transient('vp_fontawesome_icons', $icons, 60 * 60 * 24);
    }
    return $icons;
}
VP_Security::instance()->whitelist_function('vp_dep_boolean');
function vp_dep_boolean($value)
{
    $args = func_get_args();
    $result = true;
    foreach ($args as $val) {
        $result = ($result and !empty($val));
    }
    return $result;
}
/**
 * EOF
 */
<?php

function wpupg_shortcode_generator_grids_by_date()
{
    $args = array('post_type' => WPUPG_POST_TYPE, 'post_status' => 'any', 'posts_per_page' => -1, 'nopaging' => true);
    $query = new WP_Query($args);
    $posts = $query->have_posts() ? $query->posts : array();
    $grids = array();
    foreach ($posts as $post) {
        $grids[] = array('value' => $post->post_name, 'label' => $post->post_title);
    }
    return $grids;
}
VP_Security::instance()->whitelist_function('wpupg_shortcode_generator_grids_by_date');
예제 #25
0
function hb_sticky_header_dependency_alt($value)
{
    if ($value == "nav-type-2 centered-nav") {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('hb_header_text_dependency');
function hb_header_text_dependency($value)
{
    if ($value == "nav-type-2") {
        return true;
    }
    return false;
}
VP_Security::instance()->whitelist_function('hb_maint_dependency');
function hb_maint_dependency($value)
{
    return $value;
}
VP_Security::instance()->whitelist_function('hb_navigation_animation_binding');
function hb_navigation_animation_binding($value)
{
    $ret_array = array('default-skin' => array(array('value' => 'no-effect', 'label' => __('None', 'hbthemes'))), 'second-skin' => array(array('value' => 'no-effect', 'label' => __('None', 'hbthemes'))), 'third-skin' => array(array('value' => 'no-effect', 'label' => __('None', 'hbthemes')), array('value' => 'hb-effect-1', 'label' => __('Brackets Effect', 'hbthemes')), array('value' => 'hb-effect-9', 'label' => __('Top Border Effect', 'hbthemes')), array('value' => 'hb-effect-2', 'label' => __('Bottom Border Effect', 'hbthemes')), array('value' => 'hb-effect-4', 'label' => __('Bottom Border Effect 2', 'hbthemes')), array('value' => 'hb-effect-7', 'label' => __('Thick Bottom Border Effect', 'hbthemes')), array('value' => 'hb-effect-3', 'label' => __('Top Border Effect 2', 'hbthemes')), array('value' => 'hb-effect-10', 'label' => __('Bottom Border Grow Effect', 'hbthemes')), array('value' => 'hb-effect-8', 'label' => __('Borders Grow Effect', 'hbthemes')), array('value' => 'hb-effect-11', 'label' => __('Bottom Circles Effect', 'hbthemes'))), 'minimal-skin' => array(array('value' => 'no-effect', 'label' => __('None', 'hbthemes')), array('value' => 'hb-effect-1', 'label' => __('Brackets Effect', 'hbthemes')), array('value' => 'hb-effect-9', 'label' => __('Top Border Effect', 'hbthemes')), array('value' => 'hb-effect-2', 'label' => __('Bottom Border Effect', 'hbthemes')), array('value' => 'hb-effect-4', 'label' => __('Bottom Border Effect 2', 'hbthemes')), array('value' => 'hb-effect-7', 'label' => __('Thick Bottom Border Effect', 'hbthemes')), array('value' => 'hb-effect-3', 'label' => __('Top Border Effect 2', 'hbthemes')), array('value' => 'hb-effect-5', 'label' => __('Grey Hover Effect', 'hbthemes')), array('value' => 'hb-effect-6', 'label' => __('Focus Hover Effect', 'hbthemes')), array('value' => 'hb-effect-10', 'label' => __('Bottom Border Grow Effect', 'hbthemes')), array('value' => 'hb-effect-8', 'label' => __('Borders Grow Effect', 'hbthemes')), array('value' => 'hb-effect-11', 'label' => __('Bottom Circles Effect', 'hbthemes'))));
    return $ret_array[$value];
}
function hb_get_social_medias()
{
    $socmeds = array(array('value' => 'facebook', 'label' => 'Facebook'), array('value' => 'blogger', 'label' => 'Blogger'), array('value' => 'delicious', 'label' => 'Delicious'), array('value' => 'deviantart', 'label' => 'DeviantArt'), array('value' => 'dribbble', 'label' => 'Dribbble'), array('value' => 'envelop', 'label' => 'Email'), array('value' => 'flickr', 'label' => 'Flickr'), array('value' => 'forrst', 'label' => 'Forrst'), array('value' => 'foursquare', 'label' => 'Foursquare'), array('value' => 'github', 'label' => 'Github'), array('value' => 'google-plus', 'label' => 'Google+'), array('value' => 'instagram', 'label' => 'Instagram'), array('value' => 'lastfm', 'label' => 'Last.FM'), array('value' => 'linkedin', 'label' => 'LinkedIn'), array('value' => 'pinterest', 'label' => 'Pinterest'), array('value' => 'reddit', 'label' => 'Reddit'), array('value' => 'feed-2', 'label' => 'RSS'), array('value' => 'skype', 'label' => 'Skype'), array('value' => 'soundcloud', 'label' => 'SoundCloud'), array('value' => 'stumbleupon', 'label' => 'StumbleUpon'), array('value' => 'tumblr', 'label' => 'Tumblr'), array('value' => 'twitter', 'label' => 'Twitter'), array('value' => 'vimeo', 'label' => 'Vimeo'), array('value' => 'xing', 'label' => 'Xing'), array('value' => 'behance', 'label' => 'Behance'), array('value' => 'vk', 'label' => 'VKontakte'), array('value' => 'wordpress', 'label' => 'WordPress'), array('value' => 'yahoo', 'label' => 'Yahoo!'), array('value' => 'yelp', 'label' => 'Yelp'), array('value' => 'youtube', 'label' => 'Youtube'), array('value' => 'custom-url', 'label' => 'Custom'));
    return $socmeds;
}
<?php

/* Return true if another field value is false (oposite to vp_dep_boolean) */
function locations_and_routes_false_boolen($value)
{
    $args = func_get_args();
    $result = false;
    foreach ($args as $val) {
        $result = !$result && empty($val);
    }
    return $result;
}
VP_Security::instance()->whitelist_function('locations_and_routes_false_boolen');
/* Return HTML for map preview fields */
function locations_and_routes_map_preview_generate()
{
    return '<div id="location-and-routes-map-preview" class="location-and-routes-map-preview"></div>';
}
VP_Security::instance()->whitelist_function('locations_and_routes_map_preview_generate');