Changeset 1895629
- Timestamp:
- 06/20/2018 07:43:56 AM (8 years ago)
- File:
-
- 1 edited
-
impulse-widget/trunk/impulse.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
impulse-widget/trunk/impulse.php
r1857097 r1895629 3 3 Plugin Name: Impulse Widget 4 4 Description: This plugin implements the Impulse functionality. Check the Impulse Settings for instructions. 5 Version: 1.0.1 65 Version: 1.0.18 6 6 Author: Enock Mudde, Annemiek Pronk 7 7 License: GPL2 … … 20 20 function impulse_load_textdomain() { 21 21 $loaded = load_plugin_textdomain( 'impulse', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 22 } 23 24 if(!function_exists('deactivate_impulse')){ 25 register_deactivation_hook( __FILE__, 'impulse_deactivate' ); 26 function impulse_deactivate(){ 27 error_log('Impulse has been deactivated'); 28 } 22 29 } 23 30 … … 509 516 if(isset($atts['button']) && $atts['button'] != ''){ 510 517 $buttonText = esc_html( $atts['button'] ); 511 $result = "< button class='impulseButton' clientId='$clientId'>$buttonText</button>";518 $result = "<a href='https://impulse.click'><button>$buttonText</button></a>"; 512 519 } 513 520 … … 515 522 $linkTitle = esc_html( $atts['title'] ); 516 523 517 $result = "<a class='impulseButton' clientId='$clientId'>$linkTitle</a>";524 $result = "<a href='https://impulse.click'>$linkTitle</a>"; 518 525 } 519 526 … … 530 537 $width = '100%'; 531 538 532 if($selectedWidth == 'small') $width = ' 90px';539 if($selectedWidth == 'small') $width = '150px'; 533 540 if($selectedWidth == 'medium') $width = '300px'; 534 541 535 542 if($align== 'left' || $align == 'right'){ 536 $result = "< img style='margin: 7px; float: $align;' class='impulseButton' clientId='" . esc_attr( $clientId ) . "' src='" . esc_attr( $imageUrl ) ."' width='$width' />";543 $result = "<a href='https://impulse.click'><img style='margin: 7px; float: $align;' class='impulseButton' src='" . esc_attr( $imageUrl ) ."' width='$width' /></a>"; 537 544 } 538 545 else{ 539 546 #none, center?! 540 $result = "<div style='text-align: center;'>< img class='impulseButton' clientId='" . esc_attr( $clientId ) . "' src='" . esc_attr( $imageUrl ) ."' width='$width' /></div>";547 $result = "<div style='text-align: center;'><a href='https://impulse.click'><img src='" . esc_attr( $imageUrl ) ."' width='$width' /></a></div>"; 541 548 } 542 549 } 543 550 else{ 544 551 if($align== 'left' || $align == 'right'){ 545 $result = "< img style='margin: 7px; float: $align;' class='impulseButton' clientId='" . esc_attr( $clientId ) . "' src='" . esc_attr( $imageUrl ) ."' width='90' height='90' />";552 $result = "<a href='https://impulse.click'><img style='margin: 7px; float: $align;' src='" . esc_attr( $imageUrl ) ."' width='90' height='90' /></a>"; 546 553 } 547 554 else{ 548 555 #none, center?! 549 $result = "<div style='text-align: center'>< img class='impulseButton' clientId='" . esc_attr( $clientId ) . "' src='" . esc_attr( $imageUrl ) ."' style='align:$align;' width='90' height='90' /></div>";556 $result = "<div style='text-align: center'><a href='https://impulse.click'><img src='" . esc_attr( $imageUrl ) ."' style='align:$align;' width='90' height='90' /></a></div>"; 550 557 } 551 558 } … … 1059 1066 <label for="contactChoice2"><?php esc_html_e( 'Image Size (only for custom triggers): ', 'impulse' ); ?></label><br> 1060 1067 <select id="trigger-image-size"> 1061 <option value="small"><?php esc_html_e( 'Small (width: 90px)', 'impulse' ); ?></option>1068 <option value="small"><?php esc_html_e( 'Small (width: 150px)', 'impulse' ); ?></option> 1062 1069 <option value="medium"><?php esc_html_e( 'Medium (width: 300px)', 'impulse' ); ?></option> 1063 1070 <option selected value="normal"><?php esc_html_e( 'Original Size (default)', 'impulse' ); ?></option>
Note: See TracChangeset
for help on using the changeset viewer.