bicycleshop_get_meta( '_'.$parent ); //check if it is "new post" page global $pagenow; if('post-new.php' == $pagenow ) { $parent_value = $bicycleshop_a13->defaults_of_meta[$parent]; } //check operators if($operator === '='){ return $value === $parent_value; } elseif($operator === '!='){ return $value !== $parent_value; } //for all other operators return false; } /** * @param array $required dependency to check in form of 3 fields array * @param bool $is_meta is it called for meta filed or option * * @return bool */ function bicycleshop_check_control_dependencies($required, $is_meta ){ if($is_meta){ //we have more then one required condition if(is_array($required[0]) ){ foreach($required as $dependency){ if(!bicycleshop_compare_dependency($dependency)){ //some dependency were not met return false; } } //all dependencies were met return true; } //we have only one required condition else{ return bicycleshop_compare_dependency($required); } } //classic option - not supported else{ return true; } } function bicycleshop_input_help_tip($message){ ?>
?
get_option( $option['id'] ); } //check if field should be visible if ( isset( $option['required'] ) && is_array( $option['required'] ) ) { //display or not $style .= bicycleshop_check_control_dependencies( $option['required'], $is_meta ) ? '' : 'display: none;'; } $valid_tags = array( 'a' => array( 'href' => array(), ), 'br' => array(), 'code' => array(), 'strong' => array(), ); /* TYPES */ if ( $option['type'] == 'upload' ) { $upload_button_text = ! empty( $option['button_text'] ) ? $option['button_text'] : esc_html__( 'Upload', 'bicycleshop' ); ?>
>
type="text" size="36" name="" value="" /> />

>
type="text" size="36" name="" value="" />

>
>

>

>
$html_option ) { echo ''; } ?>

>
'.__( 'Use the correct color property in CSS( green, #33FF99, rgb(255,128,0), rgba(222,112,12,0.5) ), or choose a color with a color picker. Leave an empty value to use the default theme value.', 'bicycleshop' ).'

'.__( 'Use the "Transparent" button to insert a transparent value.', 'bicycleshop' ) ); ?>

>

>

>
'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => PHP_INT_MAX, 'orderby' => 'title' ); $products = get_posts( apply_filters( 'woocommerce_shortcode_products_query', $args ) ); if ( $products ) { echo ''; } else{ echo ''. esc_html__( 'There are no products yet!', 'bicycleshop' ) . ''; } ?>