'something',
'bar' => 'something else',
), $atts ) );
$html ='';
$html .='
';
$clients = $smof_data['clients'];
foreach ((array)$clients as $client) {
$html .='
';
}
$html .='
';
return $html;
}
add_shortcode( 'st_clients', 'shortcode_clients' );
if(function_exists('vc_map')){
vc_map( array(
"name" => __("ST Clients", "icommerce"),
"base" => "st_clients",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Title","icommerce"),
"param_name" => "title",
"value" => __("Message Title","icommerce"),
"description" => __("Message Title","icommerce")
),
) );
}
function shortcode_message( $atts, $content = null ) {
extract( shortcode_atts( array(
'title' => 'something',
'bar' => 'something else',
), $atts ) );
$html ='';
$html .='
'.$title.'
'.$content.'
';
return $html;
}
add_shortcode( 'st_message', 'shortcode_message' );
if(function_exists('vc_map')){
vc_map( array(
"name" => __("ST Message","icommerce"),
"base" => "st_message",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Title","icommerce"),
"param_name" => "title",
"value" => __("Message Title","icommerce"),
"description" => __("Message Title","icommerce")
),
array(
"type" => "textarea_html",
"holder" => "div",
"class" => "",
"heading" => __("Message Content","icommerce"),
"param_name" => "content",
"value" => __("I am test text block. Click edit button to change this text.
","icommerce"),
"description" => __("Enter your content.","icommerce")
)
)
) );
}
function shortcode_rate_product( $atts, $content = null ) {
extract( shortcode_atts( array(
'show_posts' => '4',
'title' => '',
), $atts ) );
ob_start(); ?>
query, 'order_by_rating_post_clauses' ) );
$query_args = array('posts_per_page' => $show_posts, 'no_found_rows' => 1, 'post_status' => 'publish', 'post_type' => 'product' );
$query_args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
$query_args['meta_query'][] = $woocommerce->query->visibility_meta_query();
$top_rated_posts = new WP_Query( $query_args );
if ( $top_rated_posts->have_posts() ) {
while ( $top_rated_posts->have_posts() ) : $top_rated_posts->the_post(); global $product ?>
ID, 'product_cat' );
foreach( $product_category as $cat ):
if( 0 == $cat->parent )
echo '
'.$cat->name.'
';
endforeach;
?>
product_type, $product );
switch ( $handler ) {
case "variable" :
$add_cart = get_permalink();
break;
case "grouped" :
$add_cart = get_permalink();
break;
case "external" :
$add_cart = get_permalink();
break;
default :
if ( $product->is_purchasable() ) {
$add_cart = esc_url( $product->add_to_cart_url() );
} else {
$add_cart = get_permalink();
}
break;
}
?>
Cart
Details
query, 'order_by_rating_post_clauses' ) );
?>
__("ST Top Rated Product","icommerce"),
"base" => "st_product",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Title","icommerce"),
"param_name" => "title",
"value" => __("Editor Pick's","icommerce"),
"description" => __("Message Title","icommerce")
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Show Posts","icommerce"),
"param_name" => "show_posts",
"value" => __("12","icommerce"),
"description" => __("Enter number posts per page.","icommerce")
)
)
) );
}
function shortcode_seller_product( $atts, $content = null ) {
extract( shortcode_atts( array(
'show_posts' => '4',
'title' => 'St Product',
), $atts ) );
ob_start(); ?>
$show_posts,
'post_status' => 'publish',
'post_type' => 'product',
'meta_key' => 'total_sales',
'orderby' => 'meta_value_num',
'no_found_rows' => 1,
);
$query_args['meta_query'] = array();
$query_args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
$query_args['meta_query'][] = $woocommerce->query->visibility_meta_query();
$top_seller_posts = new WP_Query( $query_args );
if ( $top_seller_posts->have_posts() ) {
while ( $top_seller_posts->have_posts() ) : $top_seller_posts->the_post(); global $product ?>
ID, 'product_cat' );
foreach( $product_category as $cat ):
if( 0 == $cat->parent )
echo '
'.$cat->name.'
';
endforeach;
?>
product_type, $product );
switch ( $handler ) {
case "variable" :
$add_cart = get_permalink();
break;
case "grouped" :
$add_cart = get_permalink();
break;
case "external" :
$add_cart = get_permalink();
break;
default :
if ( $product->is_purchasable() ) {
$add_cart = esc_url( $product->add_to_cart_url() );
} else {
$add_cart = get_permalink();
}
break;
}
?>
Cart
Details
__("ST Top Seller Product","icommerce"),
"base" => "st_seller_product",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Title","icommerce"),
"param_name" => "title",
"value" => __("Best Seller","icommerce"),
"description" => __("Message Title","icommerce")
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Show Posts","icommerce"),
"param_name" => "show_posts",
"value" => "12",
"description" => __("Enter number posts per page.","icommerce")
)
)
) );
}
function shortcode_recent_product( $atts, $content = null ) {
extract( shortcode_atts( array(
'show_posts' => '4',
'title' => '',
'number' => '',
), $atts ) );
ob_start(); ?>
$number, 'no_found_rows' => 1, 'post_status' => 'publish', 'post_type' => 'product');
$query_args['meta_query'] = array();
$query_args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
$top_seller_posts = new WP_Query( $query_args );
if ( $top_seller_posts->have_posts() ) {
while ( $top_seller_posts->have_posts() ) : $top_seller_posts->the_post(); global $product ?>
ID, 'product_cat' );
foreach( $product_category as $cat ):
if( 0 == $cat->parent )
echo '
'.$cat->name.'
';
endforeach;
?>
product_type, $product );
switch ( $handler ) {
case "variable" :
$add_cart = get_permalink();
break;
case "grouped" :
$add_cart = get_permalink();
break;
case "external" :
$add_cart = get_permalink();
break;
default :
if ( $product->is_purchasable() ) {
$add_cart = esc_url( $product->add_to_cart_url() );
} else {
$add_cart = get_permalink();
}
break;
}
?>
Cart
Details
__("ST Recent Product","icommerce"),
"base" => "st_recent_product",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Title","icommerce"),
"param_name" => "title",
"value" => __("Recent Product","icommerce"),
"description" => __("Carousel Title","icommerce")
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Show Posts","icommerce"),
"param_name" => "show_posts",
"value" => "12",
"description" => __("Enter number posts per page.","icommerce")
)
)
) );
}
function shortcode_category_product( $atts, $content = null ) {
extract( shortcode_atts( array(
'show_posts' => '4',
'cat_slug' => '',
'title' => 'St Product',
), $atts ) );
ob_start(); ?>
$number,
'no_found_rows' => 1,
'post_status' => 'publish',
'post_type' => 'product',
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => $cat_slug
)
)
);
$query_args['meta_query'] = array();
$query_args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
$top_seller_posts = new WP_Query( $query_args );
if ( $top_seller_posts->have_posts() ) {
while ( $top_seller_posts->have_posts() ) : $top_seller_posts->the_post(); global $product ?>
ID, 'product_cat' );
foreach( $product_category as $cat ):
if( 0 == $cat->parent )
echo '
'.$cat->name.'
';
endforeach;
?>
product_type, $product );
switch ( $handler ) {
case "variable" :
$add_cart = get_permalink();
break;
case "grouped" :
$add_cart = get_permalink();
break;
case "external" :
$add_cart = get_permalink();
break;
default :
if ( $product->is_purchasable() ) {
$add_cart = esc_url( $product->add_to_cart_url() );
} else {
$add_cart = get_permalink();
}
break;
}
?>
Cart
Details
__("ST Products In Category","icommerce"),
"base" => "st_cat_product",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Title","icommerce"),
"param_name" => "title",
"value" => __("Products In Category","icommerce"),
"description" => __("Section Title","icommerce")
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Show Posts","icommerce"),
"param_name" => "show_posts",
"value" => __("12"),
"description" => __("Enter number posts per page.","icommerce")
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Category Slug","icommerce"),
"param_name" => "cat_slug",
"value" => "",
"description" => __("Enter Your category slug.","icommerce")
)
)
) );
}
function shortcode_master_slider( $atts, $content = null ) {
extract( shortcode_atts( array(
'show_posts' => '4',
'cat_slug' => '',
'title' => 'St Product',
), $atts ) );
ob_start(); ?>
'flexslider',
'order' => 'ASC',
);
$query = new WP_Query($args);
?>
have_posts()) : $query->the_post(); ?>
\s*+(
)?\s*#i', '', get_the_content());
echo do_shortcode($content);
?>
__("ST Master Slider","icommerce"),
"base" => "master_slider",
"class" => "",
"category" => __("Content", "icommerce"),
) );
}
add_shortcode( 'st_master_slider_product', 'shortcode_master_slider_product' );
function shortcode_master_slider_product( $atts, $content = null ) {
extract( shortcode_atts( array(
'show_posts' => '4',
'title' => '',
), $atts ) );
ob_start(); ?>
$show_posts, 'no_found_rows' => 1, 'post_status' => 'publish', 'post_type' => 'product' );
$query_args['meta_query'] = array();
$query_args['meta_query'][] = array(
'key' => '_featured',
'value' => 'yes'
);
$query_args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
$query_args['meta_query'][] = $woocommerce->query->visibility_meta_query();
$top_rated_posts = new WP_Query( $query_args );
if ( $top_rated_posts->have_posts() ) {
while ( $top_rated_posts->have_posts() ) : $top_rated_posts->the_post(); global $product ?>
/
get_price_html(); ?>
ID, 'product_cat' );
foreach( $product_category as $cat ):
if( 0 == $cat->parent )
echo '
'.$cat->name.'
';
endforeach;
?>
__("ST Master Slider Product","icommerce"),
"base" => "st_master_slider_product",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Show Posts","icommerce"),
"param_name" => "show_posts",
"value" => "3",
"description" => __("Enter number posts per page.","icommerce")
),
)
) );
}
add_shortcode( 'st_seller_style_2', 'shortcode_seller_style_2' );
function shortcode_seller_style_2( $atts, $content = null ) {
extract( shortcode_atts( array(
'show_posts' => '4',
'title' => '',
), $atts ) );
ob_start(); ?>
$show_posts,
'post_status' => 'publish',
'post_type' => 'product',
'meta_key' => 'total_sales',
'orderby' => 'meta_value_num',
'no_found_rows' => 1,
);
$query_args['meta_query'] = array();
$query_args['meta_query'][] = $woocommerce->query->stock_status_meta_query();
$query_args['meta_query'][] = $woocommerce->query->visibility_meta_query();
$top_seller_posts = new WP_Query( $query_args );
if ( $top_seller_posts->have_posts() ) {
while ( $top_seller_posts->have_posts() ) : $top_seller_posts->the_post(); global $product ?>
__("ST Master Top Seller Product","icommerce"),
"base" => "st_seller_style_2",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Title","icommerce"),
"param_name" => "title",
"value" => __("Best Seller","icommerce"),
"description" => __("Message Title","icommerce")
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Show Posts","icommerce"),
"param_name" => "show_posts",
"value" => __("12"),
"description" => __("Enter number posts per page.","icommerce")
)
)
) );
}
function st_shortcode_banner($atts, $content = null){
extract( shortcode_atts( array(
'title' => 'Banner Title',
'sub_title' => 'Banner Sub Title',
'image_url' => ''
), $atts ) );
ob_start(); ?>
__("ST Banner","icommerce"),
"base" => "st_banner",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Title","icommerce"),
"param_name" => "title",
"value" => __("Title","icommerce"),
"description" => __("Input your title","icommerce")
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Sub Title","icommerce"),
"param_name" => "sub_title",
"value" => __("Sub Title","icommerce"),
"description" => __("Input your sub title","icommerce")
),
array(
"type" => "attach_image",
"holder" => "div",
"class" => "",
"heading" => __("Upload your image","icommerce"),
"param_name" => "image_url",
"value" => "",
"description" => __("Your Banner image","icommerce")
)
)
) );
}
function st_shortcode_promotion( $atts, $content = null ) {
extract( shortcode_atts( array(
'effect' => 'helix',
'image_id' => '',
), $atts ) );
ob_start(); ?>
__("ST Promotion","icommerce"),
"base" => "st_promotion",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Effect","icommerce"),
"param_name" => "effect",
"value" => "helix",
"description" => __("Input your effect","icommerce")
),
array(
"type" => "textarea_html",
"holder" => "div",
"class" => "",
"heading" => __("Promotion Content","icommerce"),
"param_name" => "content",
"value" => "",
"description" => __("Enter your content.","icommerce")
),
array(
"type" => "attach_image",
"holder" => "div",
"class" => "",
"heading" => __("Upload your image","icommerce"),
"param_name" => "image_id",
"value" => "",
"description" => __("Your Banner image","icommerce")
)
)
) );
}
function st_shortcode_testimonials( $atts, $content = null ) {
extract( shortcode_atts( array(
'items' => '10',
), $atts ) );
ob_start(); ?>
'testimonial',
'posts_per_page' => $items,
);
$testimonial = new WP_Query($args);
?>
have_posts()) : $testimonial->the_post(); ?>
have_posts()) : $testimonial->the_post(); ?>
__("ST Testimonials","icommerce"),
"base" => "st_testimonials",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Show items","icommerce"),
"param_name" => "items",
"value" => "10",
"description" => __("Input number of items to show","icommerce")
),
)
) );
}
function st_shortcode_blogs( $atts, $content = null ) {
extract( shortcode_atts( array(
'show_posts' => '3',
), $atts ) );
ob_start(); ?>
'post',
'posts_per_page' => $show_posts,
);
$testimonial = new WP_Query($args);
?>
have_posts()) : $testimonial->the_post(); ?>
__("ST Recent Blogs","icommerce"),
"base" => "st_recent_blogs",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Show posts","icommerce"),
"param_name" => "items",
"value" => "3",
"description" => __("Input number of items to show","icommerce")
),
)
) );
}
function st_google_map( $atts, $content = null ) {
extract( shortcode_atts( array(
'address' => 'İstanbul Üniversitesi İletişim Fakültesi, İstanbul, Türkiye',
'html' => "We Are ICOMMERCE!
İstanbul, Türkiye Office
+ View Original Map",
'latitude' => '41.01300',
'longitude' => '28.96191',
'icon' => ''
), $atts ) );
$i_icon = '';
if($icon == ''){
$i_icon = get_template_directory_uri().'/images/pin.png';
}else{
$img = wp_get_attachment_image_src($icon, 'full');
$img = $img[0];
$i_icon = $img;
}
ob_start(); ?>
__("ST Google Map","icommerce"),
"base" => "st_google_map",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Your latitude","icommerce"),
"param_name" => "latitude",
"value" => "41.01300",
"description" => __("Input your latitude","icommerce")
),array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Your longitude","icommerce"),
"param_name" => "longitude",
"value" => "28.96191",
"description" => __("Input your longitude","icommerce")
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Your address","icommerce"),
"param_name" => "address",
"value" => "3",
"description" => __("Input your Adress","icommerce")
),
array(
"type" => "textfield",
"holder" => "div",
"class" => "",
"heading" => __("Your address","icommerce"),
"param_name" => "address",
"value" => __("İstanbul Üniversitesi İletişim Fakültesi, İstanbul, Türkiye","icommerce"),
"description" => __("Input your Adress","icommerce")
),
array(
"type" => "attach_image",
"holder" => "div",
"class" => "",
"heading" => __("Your icon","icommerce"),
"param_name" => "icon",
"value" => __("","icommerce"),
"description" => __("Input your icon map","icommerce")
),
array(
"type" => "textarea_html",
"holder" => "div",
"class" => "",
"heading" => __("Html Popup","icommerce"),
"param_name" => "html",
"value" => "We Are ICOMMERCE!
İstanbul, Türkiye Office
[+] View Original Map",
"description" => __("Enter your Html Popup.","icommerce")
),
)
) );
}
function st_shortcode_pricing_table( $atts, $content = null ) {
extract( shortcode_atts( array(
'title' => 'STANDARD',
'price' => '$15',
'info' => 'Sorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit illo voluptas aperiam.',
'button_text' => 'Order Now',
'button_link' => '#',
'active' => '',
), $atts ) );
ob_start(); ?>
__("Pricing Table", "js_composer"),
"base" => "st_pricing_table",
"class" => "",
"category" => __("Content", "icommerce"),
"params" => array(
// add params same as with any other content element
array(
"type" => "textfield",
"heading" => __("Title", "icommerce"),
"param_name" => "title",
"value" => 'STANDARD',
"description" => __("Pricing Title", "icommerce")
),
array(
"type" => "textfield",
"heading" => __("Price", "icommerce"),
"param_name" => "price",
"value" => "$15",
"description" => __("Pricing Price", "icommerce")
),
array(
"type" => "textarea",
"heading" => __("Info", "icommerce"),
"param_name" => "info",
"value" => "Sorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit illo voluptas aperiam.",
"description" => __("Pricing Info", "icommerce")
),array(
"type" => "checkbox",
"heading" => __("Active", "icommerce"),
"param_name" => "active",
"value" => Array(__("Yes", "icommerce") => 'yes'),
"description" => __("Pricing Info", "icommerce")
),
array(
"type" => "textfield",
"heading" => __("Button Link", "icommerce"),
"param_name" => "button_link",
"value" => "#",
"description" => __("Pricing Button Link", "icommerce")
),
array(
"type" => "textfield",
"heading" => __("Button Text", "icommerce"),
"param_name" => "button_text",
"value" => "Order Now",
"description" => __("Pricing Button Text", "icommerce")
),
array(
"type" => "textarea_html",
"holder" => "div",
"class" => "",
"heading" => __("Pricing Content","icommerce"),
"param_name" => "content",
"value" => "
- 150 Mb Storage
- 1 Domain
- 2 Sub Domains
- 3 MySQL DBs
- 2 Emails
- WordPress Installation
- 24/7 Support
",
"description" => __("Enter your content.","icommerce")
)
)
) );
}
if(function_exists('vc_add_param')){
vc_add_param( 'vc_row', array(
"type" => "textfield",
"heading" => __("Title", 'icommerce'),
"param_name" => "title",
"value" => "",
"description" => __("Input Your title.", "icommerce")
) );
vc_add_param( 'vc_row', array(
"type" => "textfield",
"heading" => __("Sub Title", 'icommerce'),
"param_name" => "sub_title",
"value" => "",
"description" => __("Input Sub title.", "icommerce")
) );
vc_add_param( 'vc_row', array(
"type" => "textfield",
"heading" => __("Row Full Width", 'icommerce'),
"param_name" => "full",
"value" => "",
"description" => __("Value is 'yes' or 'no'.", "icommerce")
) );
}
?>