Skip to content

Commit

Permalink
v2.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
raducretu committed Mar 29, 2018
1 parent 802ff2f commit a403a4f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion curly-extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Curly Themes Extension
Plugin URI: http://demo.curlythemes.com
Description: Curly Themes Extension is a collection of Shortcodes, Widgets and Plugins. This plugin exclusive for Curly Themes
Version: 2.4.1
Version: 2.4.2
Author: Curly Themes
Author URI: http://www.curlythemes.com
*/
Expand Down
68 changes: 34 additions & 34 deletions plugins/simple-qr/simple-qr.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
function curly_qr_options_header() {
if ( !is_admin() ) {
wp_enqueue_style('arrow-icons', plugins_url( '/css/arrow-icons.css' , __FILE__ ), true);
wp_enqueue_style('arrow-icons-font', 'http://fonts.googleapis.com/css?family=Pacifico', true);
}
wp_enqueue_style('arrow-icons-font', '//fonts.googleapis.com/css?family=Pacifico', true);
}
}
add_action('wp_enqueue_scripts', 'curly_qr_options_header');

function curly_qr( $atts ) {
extract(shortcode_atts(array(
extract(shortcode_atts(array(
'type' => null,
'title' => null,
'url' => null,
Expand All @@ -40,45 +40,45 @@ function curly_qr( $atts ) {
'pointer_color' => '#CC0000',
'pointer_position' => 'left',
'margin' => 20
), $atts));

), $atts));

switch($type){
case 'url' :
$out = 'type=url&url='.$atts['url'];

case 'url' :
$out = 'type=url&url='.$atts['url'];
break;
case 'contact' :
$out = 'type=contact&name='.$atts['name'].'&address='.$atts['address'].'&phone='.$atts['phone'].'&email='.$atts['email'];
case 'contact' :
$out = 'type=contact&name='.$atts['name'].'&address='.$atts['address'].'&phone='.$atts['phone'].'&email='.$atts['email'];
break;
case 'email' :
$out = 'type=email&email='.$atts['email'].'&subject='.$atts['subject'].'&message='.$atts['message'];
case 'email' :
$out = 'type=email&email='.$atts['email'].'&subject='.$atts['subject'].'&message='.$atts['message'];
break;
case 'geo' :
$out = 'type=geo&lat='.$atts['lat'].'&lon='.$atts['lon'].'&height='.$atts['height'];
case 'geo' :
$out = 'type=geo&lat='.$atts['lat'].'&lon='.$atts['lon'].'&height='.$atts['height'];
break;
case 'phone' :
$out = 'type=phone&phone='.$atts['phone'];
case 'phone' :
$out = 'type=phone&phone='.$atts['phone'];
break;
case 'sms' :
$out = 'type=sms&phone='.$atts['phone'].'&message='.$atts['message'];
case 'sms' :
$out = 'type=sms&phone='.$atts['phone'].'&message='.$atts['message'];
break;
case 'text' :
$out = 'type=text&text='.$text;
case 'text' :
$out = 'type=text&text='.$text;
break;
case 'wifi' :
$out = 'type=wifi&wifi_type='.$atts['wifi_type'].'&ssid='.$atts['ssid'].'&password='.$atts['password'];
case 'wifi' :
$out = 'type=wifi&wifi_type='.$atts['wifi_type'].'&ssid='.$atts['ssid'].'&password='.$atts['password'];
break;
case 'bookmark' :
$out = 'type=bookmark&text='.$title.'&url='.$url;
case 'bookmark' :
$out = 'type=bookmark&text='.$title.'&url='.$url;
break;
case 'auto' :
$out = 'type=url&url='.get_permalink();
case 'auto' :
$out = 'type=url&url='.get_permalink();
break;
}

$css = 'alignnone';

switch($align){
case 'right' : $css = 'alignright'; break;
case 'left' : $css = 'alignleft'; break;
Expand All @@ -89,14 +89,14 @@ function curly_qr( $atts ) {
$arrow = '<span style="color:'.$pointer_color.'; margin-top: -'.($margin+3).'px; text-align: '.$pointer_position.'" data-arrow-icon="4">';
$arrow .= $pointer_text.'</span>';
}

$inline = ($margin) ? ' style="margin-bottom: '.$margin.'px" ' : null;

$html = '<div class="simple-qr" style="width: '.$size.'px"><img src="'.plugins_url().'/curly-extension/plugins/simple-qr/qr-generator.php?size='.$atts['size'].'&amp;'.$out.'" class="wp-image-qr '.$css.'" alt="'.$alt.'" '.$inline.'>'.$arrow.'</div>';

return $html;

}
add_shortcode( 'simple-qr', 'curly_qr' );

?>
?>

0 comments on commit a403a4f

Please sign in to comment.