Changeset 2263538
- Timestamp:
- 03/19/2020 01:34:43 AM (6 years ago)
- Location:
- ppo-call-to-actions/trunk
- Files:
-
- 7 added
- 5 edited
-
call2actions.php (modified) (18 diffs)
-
images/messenger.png (added)
-
images/regbutton.png (modified) (previous)
-
images/zalo.png (added)
-
readme.txt (modified) (2 diffs)
-
screenshot-1.png (modified) (previous)
-
screenshot-2.png (modified) (previous)
-
screenshot-3.png (added)
-
screenshot-4.png (added)
-
screenshot-5.png (added)
-
screenshot-6.png (added)
-
screenshot-7.png (added)
Legend:
- Unmodified
- Added
- Removed
-
ppo-call-to-actions/trunk/call2actions.php
r1744153 r2263538 5 5 Description: Tiện ích kêu gọi hành động phù hợp cho các website về giới thiệu hoặc sản phẩm, dịch vụ. Phát triển miễn phí bởi PPO Việt Nam. 6 6 Author: PPO Việt Nam (ppo.vn) 7 Version: 0.1. 28 Author URI: http ://ppo.vn7 Version: 0.1.3 8 Author URI: https://ppo.vn 9 9 */ 10 10 … … 46 46 ), 47 47 array( 48 'name' => __('Display screen', 'ppo-cta'), 49 'desc' => '', 50 'id' => 'ppocta_display_screen', 51 'type' => 'radio', 52 'std' => 'mobile', 53 'options' => array( 54 'mobile' => __('Mobile', 'ppo-cta'), 55 'desktop' => __('Desktop', 'ppo-cta'), 56 'mobile_desktop' => __('Mobile & Desktop', 'ppo-cta'), 57 ) 58 ), 59 array( 60 'name' => __('Display type', 'ppo-cta'), 61 'desc' => '', 62 'id' => 'ppocta_display_type', 63 'type' => 'radio', 64 'std' => 'horizontal', 65 'options' => array( 66 'horizontal' => __('Horizontal', 'ppo-cta'), 67 'vertical' => __('Vertical', 'ppo-cta'), 68 ) 69 ), 70 array( 48 71 'name' => __('Call button', 'ppo-cta'), 49 72 'desc' => '', … … 57 80 ), 58 81 array( 59 'name' => __(' Registerbutton', 'ppo-cta'),60 'desc' => '', 61 'id' => 'ppocta_hide_ register',82 'name' => __('Zalo button', 'ppo-cta'), 83 'desc' => '', 84 'id' => 'ppocta_hide_zalo', 62 85 'type' => 'radio', 63 86 'std' => '', … … 68 91 ), 69 92 array( 93 'name' => __('Messenger button', 'ppo-cta'), 94 'desc' => '', 95 'id' => 'ppocta_hide_messenger', 96 'type' => 'radio', 97 'std' => '', 98 'options' => array( 99 '0' => __('Show', 'ppo-cta'), 100 '1' => __('Hide', 'ppo-cta'), 101 ) 102 ), 103 array( 104 'name' => __('Register button', 'ppo-cta'), 105 'desc' => '', 106 'id' => 'ppocta_hide_register', 107 'type' => 'radio', 108 'std' => '', 109 'options' => array( 110 '0' => __('Show', 'ppo-cta'), 111 '1' => __('Hide', 'ppo-cta'), 112 ) 113 ), 114 array( 70 115 'name' => __('Phone number', 'ppo-cta'), 71 116 'desc' => '', … … 78 123 'desc' => '', 79 124 'id' => 'ppocta_calltext', 125 'type' => 'text', 126 'std' => '', 127 ), 128 array( 129 'name' => __('Zalo Phone', 'ppo-cta'), 130 'desc' => '', 131 'id' => 'ppocta_zalo', 132 'type' => 'text', 133 'std' => '', 134 ), 135 array( 136 'name' => __('Messenger ID', 'ppo-cta'), 137 'desc' => '', 138 'id' => 'ppocta_messenger', 80 139 'type' => 'text', 81 140 'std' => '', … … 95 154 add_action('save_post', array(&$this, 'ppocta_add_box')); 96 155 add_action('save_post', array(&$this, 'ppocta_save_data')); 156 // } else if(wp_is_mobile()){ 97 157 } else { 98 // if(!wp_is_mobile()){ 99 add_filter('wp_head', array(&$this, 'add_style'), 100); 100 // } 158 add_filter('wp_head', array(&$this, 'add_style'), 100); 101 159 add_filter('wp_footer', array(&$this, 'add_buttons'), 100); 102 160 } … … 115 173 116 174 if(isset($_GET['page']) and $_GET['page'] == 'PPOCTA'){ 117 if( isset($_POST['do_action']) and $_POST['do_action'] == 'save' and 118 isset( $_POST['423XqnC2zFJHmN7ThAfyv5rk'] ) and wp_verify_nonce( $_POST['423XqnC2zFJHmN7ThAfyv5rk'], 'ppocta_settings_page' ) ){ 175 if(isset($_POST['do_action']) and $_POST['do_action'] == 'save'){ 119 176 $ppocta_fields = array( 120 "ppocta_hide_call", "ppocta_hide_register", "ppocta_phone", "ppocta_reg_url", "ppocta_calltext" 177 "ppocta_display_screen", "ppocta_display_type", 178 "ppocta_hide_call", "ppocta_hide_zalo", "ppocta_hide_messenger", "ppocta_hide_register", 179 "ppocta_phone", "ppocta_zalo", "ppocta_messenger", "ppocta_reg_url", "ppocta_calltext" 121 180 ); 122 181 foreach ($ppocta_fields as $field) { … … 144 203 <tr> 145 204 <td> 205 <label for="ppocta_display_screen"><?php _e('Display screen', 'ppo-cta') ?></label> 206 </td> 207 <td> 208 <input type="radio" name="ppocta_display_screen" id="ppocta_display_screen_mobile" value="mobile" 209 <?php echo (get_settings('ppocta_display_screen') != 'desktop' and get_settings('ppocta_display_screen') != 'mobile_desktop') ? "checked" : ""; ?> /> 210 <label for="ppocta_display_screen_mobile"><?php _e('Mobile', 'ppo-cta') ?></label> 211 <input type="radio" name="ppocta_display_screen" id="ppocta_display_screen_desktop" value="desktop" 212 <?php echo (get_settings('ppocta_display_screen') == 'desktop') ? "checked" : ""; ?> /> 213 <label for="ppocta_display_screen_desktop"><?php _e('Desktop', 'ppo-cta') ?></label> 214 <input type="radio" name="ppocta_display_screen" id="ppocta_display_screen_mobile_desktop" value="mobile_desktop" 215 <?php echo (get_settings('ppocta_display_screen') == 'mobile_desktop') ? "checked" : ""; ?> /> 216 <label for="ppocta_display_screen_mobile_desktop"><?php _e('Mobile & Desktop', 'ppo-cta') ?></label> 217 <td> 218 </tr> 219 <tr> 220 <td> 221 <label for="ppocta_display_type"><?php _e('Display type', 'ppo-cta') ?></label> 222 </td> 223 <td> 224 <input type="radio" name="ppocta_display_type" id="ppocta_display_type_horizontal" value="horizontal" 225 <?php echo (get_settings('ppocta_display_type') != 'vertical') ? "checked" : ""; ?> /> 226 <label for="ppocta_display_type_horizontal"><?php _e('Horizontal', 'ppo-cta') ?></label> 227 <input type="radio" name="ppocta_display_type" id="ppocta_display_type_vertical" value="vertical" 228 <?php echo (get_settings('ppocta_display_type') == 'vertical') ? "checked" : ""; ?> /> 229 <label for="ppocta_display_type_vertical"><?php _e('Vertical', 'ppo-cta') ?></label> 230 <td> 231 </tr> 232 <tr> 233 <td> 146 234 <label for="ppocta_hide_call"><?php _e('Call button', 'ppo-cta') ?></label> 147 235 </td> … … 157 245 <tr> 158 246 <td> 247 <label for="ppocta_hide_zalo"><?php _e('Zalo button', 'ppo-cta') ?></label> 248 </td> 249 <td> 250 <input type="radio" name="ppocta_hide_zalo" id="ppocta_hide_zalo_1" value="1" 251 <?php echo (intval(get_settings('ppocta_hide_zalo')) == 1) ? "checked" : ""; ?> /> 252 <label for="ppocta_hide_zalo_1"><?php _e('Show', 'ppo-cta') ?></label> 253 <input type="radio" name="ppocta_hide_zalo" id="ppocta_hide_zalo_0" value="0" 254 <?php echo (intval(get_settings('ppocta_hide_zalo')) != 1) ? "checked" : ""; ?> /> 255 <label for="ppocta_hide_zalo_0"><?php _e('Hide', 'ppo-cta') ?></label> 256 <td> 257 </tr> 258 <tr> 259 <td> 260 <label for="ppocta_hide_messenger"><?php _e('Messenger button', 'ppo-cta') ?></label> 261 </td> 262 <td> 263 <input type="radio" name="ppocta_hide_messenger" id="ppocta_hide_messenger_1" value="1" 264 <?php echo (intval(get_settings('ppocta_hide_messenger')) == 1) ? "checked" : ""; ?> /> 265 <label for="ppocta_hide_messenger_1"><?php _e('Show', 'ppo-cta') ?></label> 266 <input type="radio" name="ppocta_hide_messenger" id="ppocta_hide_messenger_0" value="0" 267 <?php echo (intval(get_settings('ppocta_hide_messenger')) != 1) ? "checked" : ""; ?> /> 268 <label for="ppocta_hide_messenger_0"><?php _e('Hide', 'ppo-cta') ?></label> 269 <td> 270 </tr> 271 <tr> 272 <td> 159 273 <label for="ppocta_hide_register"><?php _e('Register button', 'ppo-cta') ?></label> 160 274 </td> … … 177 291 </tr> 178 292 <tr> 293 <td><label><?php _e('Zalo Phone', 'ppo-cta') ?>:</label></td> 294 <td><input type="text" name="ppocta_zalo" value="<?php echo get_option('ppocta_zalo'); ?>" class="regular-text" /></td> 295 </tr> 296 <tr> 297 <td><label><?php _e('Messenger ID', 'ppo-cta') ?>:</label></td> 298 <td><input type="text" name="ppocta_messenger" value="<?php echo get_option('ppocta_messenger'); ?>" class="regular-text" /></td> 299 </tr> 300 <tr> 179 301 <td><label><?php _e('Register URL', 'ppo-cta') ?>:</label></td> 180 302 <td><input type="text" name="ppocta_reg_url" value="<?php echo get_option('ppocta_reg_url'); ?>" class="regular-text" /></td> … … 185 307 <input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Changes', 'ppo-cta') ?>" /> 186 308 <input type="hidden" name="do_action" value="save" /> 187 <?php wp_nonce_field( 'ppocta_settings_page', '423XqnC2zFJHmN7ThAfyv5rk' ); ?>188 309 </p> 189 310 </form> … … 203 324 $ppocta_active = intval(get_post_meta($post->ID, 'ppocta_active', true)); 204 325 $ppocta_using_settings = intval(get_post_meta($post->ID, 'ppocta_using_settings', true)); 326 $ppocta_display_screen = get_post_meta($post->ID, 'ppocta_display_screen', true); 327 $ppocta_display_type = get_post_meta($post->ID, 'ppocta_display_type', true); 205 328 $ppocta_hide_call = intval(get_post_meta($post->ID, 'ppocta_hide_call', true)); 329 $ppocta_hide_zalo = intval(get_post_meta($post->ID, 'ppocta_hide_zalo', true)); 330 $ppocta_hide_messenger = intval(get_post_meta($post->ID, 'ppocta_hide_messenger', true)); 206 331 $ppocta_hide_register = intval(get_post_meta($post->ID, 'ppocta_hide_register', true)); 207 332 echo '<input type="hidden" name="ppocta_secure_meta_box_nonce" value="', wp_create_nonce(basename(__FILE__)), '" />'; … … 234 359 <tr> 235 360 <td> 361 <label for="ppocta_display_screen"><?php _e('Display screen', 'ppo-cta') ?></label> 362 </td> 363 <td> 364 <input type="radio" name="ppocta_display_screen" id="ppocta_display_screen_mobile" value="mobile" 365 <?php echo ($ppocta_display_screen != 'desktop' and $ppocta_display_screen != 'mobile_desktop') ? "checked" : ""; ?> /> 366 <label for="ppocta_display_screen_mobile"><?php _e('Mobile', 'ppo-cta') ?></label> 367 <input type="radio" name="ppocta_display_screen" id="ppocta_display_screen_desktop" value="desktop" 368 <?php echo ($ppocta_display_screen == 'desktop') ? "checked" : ""; ?> /> 369 <label for="ppocta_display_screen_desktop"><?php _e('Desktop', 'ppo-cta') ?></label> 370 <input type="radio" name="ppocta_display_screen" id="ppocta_display_screen_mobile_desktop" value="mobile_desktop" 371 <?php echo ($ppocta_display_screen == 'mobile_desktop') ? "checked" : ""; ?> /> 372 <label for="ppocta_display_screen_mobile_desktop"><?php _e('Mobile & Desktop', 'ppo-cta') ?></label> 373 <td> 374 </tr> 375 <tr> 376 <td> 377 <label for="ppocta_display_type"><?php _e('Display type', 'ppo-cta') ?></label> 378 </td> 379 <td> 380 <input type="radio" name="ppocta_display_type" id="ppocta_display_type_horizontal" value="horizontal" 381 <?php echo ($ppocta_display_type != 'vertical') ? "checked" : ""; ?> /> 382 <label for="ppocta_display_type_horizontal"><?php _e('Horizontal', 'ppo-cta') ?></label> 383 <input type="radio" name="ppocta_display_type" id="ppocta_display_type_vertical" value="vertical" 384 <?php echo ($ppocta_display_type == 'vertical') ? "checked" : ""; ?> /> 385 <label for="ppocta_display_type_vertical"><?php _e('Vertical', 'ppo-cta') ?></label> 386 <td> 387 </tr> 388 <tr> 389 <td> 236 390 <label for="ppocta_hide_call"><?php _e('Call button', 'ppo-cta') ?></label> 237 391 </td> … … 247 401 <tr> 248 402 <td> 403 <label for="ppocta_hide_zalo"><?php _e('Zalo button', 'ppo-cta') ?></label> 404 </td> 405 <td> 406 <input type="radio" name="ppocta_hide_zalo" id="ppocta_hide_zalo_1" value="1" 407 <?php echo ($ppocta_hide_zalo==1) ? "checked" : ""; ?> /> 408 <label for="ppocta_hide_zalo_1"><?php _e('Show', 'ppo-cta') ?></label> 409 <input type="radio" name="ppocta_hide_zalo" id="ppocta_hide_zalo_0" value="0" 410 <?php echo ($ppocta_hide_zalo!= 1) ? "checked" : ""; ?> /> 411 <label for="ppocta_hide_zalo_0"><?php _e('Hide', 'ppo-cta') ?></label> 412 <td> 413 </tr> 414 <tr> 415 <td> 416 <label for="ppocta_hide_messenger"><?php _e('Messenger button', 'ppo-cta') ?></label> 417 </td> 418 <td> 419 <input type="radio" name="ppocta_hide_messenger" id="ppocta_hide_messenger_1" value="1" 420 <?php echo ($ppocta_hide_messenger==1) ? "checked" : ""; ?> /> 421 <label for="ppocta_hide_messenger_1"><?php _e('Show', 'ppo-cta') ?></label> 422 <input type="radio" name="ppocta_hide_messenger" id="ppocta_hide_messenger_0" value="0" 423 <?php echo ($ppocta_hide_messenger!= 1) ? "checked" : ""; ?> /> 424 <label for="ppocta_hide_messenger_0"><?php _e('Hide', 'ppo-cta') ?></label> 425 <td> 426 </tr> 427 <tr> 428 <td> 249 429 <label for="ppocta_hide_register"><?php _e('Register button', 'ppo-cta') ?></label> 250 430 </td> … … 265 445 <td><label><?php _e('Call Text', 'ppo-cta') ?>:</label></td> 266 446 <td><input type="text" name="ppocta_calltext" value="<?php echo get_post_meta($post->ID, 'ppocta_calltext', true); ?>" class="regular-text" placeholder="<?php _e('Call Now', 'ppo-cta') ?>" /></td> 447 </tr> 448 <tr> 449 <td><label><?php _e('Zalo Phone', 'ppo-cta') ?>:</label></td> 450 <td><input type="text" name="ppocta_zalo" value="<?php echo get_post_meta($post->ID, 'ppocta_zalo', true); ?>" class="regular-text" /></td> 451 </tr> 452 <tr> 453 <td><label><?php _e('Messenger ID', 'ppo-cta') ?>:</label></td> 454 <td><input type="text" name="ppocta_messenger" value="<?php echo get_post_meta($post->ID, 'ppocta_messenger', true); ?>" class="regular-text" /></td> 267 455 </tr> 268 456 <tr> … … 316 504 public function add_style() { 317 505 $call_btn = plugins_url("/images/callbutton.png", __FILE__); 506 $zalo_btn = plugins_url("/images/zalo.png", __FILE__); 507 $messenger_btn = plugins_url("/images/messenger.png", __FILE__); 318 508 $reg_btn = plugins_url("/images/regbutton.png", __FILE__); 319 echo <<<HTML 509 $ppocta_display_screen = get_option('ppocta_display_screen'); 510 $ppocta_display_type = get_option('ppocta_display_type'); 511 $active = true; 512 if(is_single() or is_page()){ 513 $post_id = get_queried_object_id(); 514 if(get_post_meta($post_id, 'ppocta_active', true) != 1){ 515 if(get_post_meta($post_id, 'ppocta_using_settings', true) == 1){ 516 $ppocta_display_screen = get_post_meta($post_id, 'ppocta_display_screen', true); 517 $ppocta_display_type = get_post_meta($post_id, 'ppocta_display_type', true); 518 } 519 } else { 520 $active = false; 521 } 522 } 523 if($active){ 524 echo <<<HTML 320 525 <style type="text/css"> 321 #callNowButton{526 .ppocta-ft-fix{ 322 527 display:none; 323 528 position: fixed; 324 left: 2px; 325 bottom: 2px; 326 border-radius: 22px; 529 bottom: 5px; 530 left: 10px; 531 min-width: 120px; 532 text-align: center; 533 z-index: 9999 534 } 535 #callNowButton{ 536 display: inline-block; 537 position: relative; 538 border-radius: 50%; 327 539 color: #fff; 328 height: 40px; 329 line-height: 40px; 330 padding: 0 10px 0 0; 331 background: #009900; 332 z-index: 9999; 540 width: 50px; 541 height: 50px; 542 line-height: 50px; 543 box-shadow: 0px 0px 10px -2px rgba(0,0,0,0.7); 333 544 } 334 545 #callNowButton i{ 335 margin-right: 5px;336 margin-top: -1px;337 margin-left: -1px;338 border: 2px solid #fff;339 546 border-radius: 50%; 340 547 display:inline-block; 341 width: 40px; 342 height: 40px; 343 background: url("{$call_btn}") center center no-repeat #009900; 344 float: left; 548 width: 50px; 549 height: 50px; 550 background: url("{$call_btn}") center center no-repeat #009900 345 551 } 346 552 #callNowButton a{ 553 display: block; 347 554 text-decoration: none; 348 555 outline: none; 349 556 color: #fff; 350 } 351 #callNowButton span{ 557 text-align: center 558 } 559 #callNowButton a.txt{ 560 position: absolute; 561 top: -40px; 562 left: calc(50% - 60px); 563 background: #009900; 564 width: 120px; 565 max-width: 120px; 566 line-height: 2; 567 text-transform: uppercase; 568 border-radius: 5px; 352 569 font-size: 15px 353 570 } 571 #callNowButton a.txt:after{ 572 position: absolute; 573 bottom: -8px; 574 left: 50px; 575 content: ""; 576 width: 0; 577 height: 0; 578 border-top: 8px solid #009900; 579 border-left: 10px solid transparent; 580 border-right: 10px solid transparent 581 } 582 #zaloButton{ 583 display: inline-block; 584 margin-right: 10px; 585 width: 50px; 586 height: 50px; 587 background: #5AC5EF; 588 border-radius: 50%; 589 box-shadow: 0px 0px 10px -2px rgba(0,0,0,0.7) 590 } 591 #zaloButton>a>i{ 592 background: url("{$zalo_btn}") center center no-repeat; 593 background-size: 57%; 594 width: 50px; 595 height: 50px; 596 display: inline-block 597 } 598 #messengerButton{ 599 display: inline-block; 600 margin-right: 10px; 601 width: 50px; 602 height: 50px; 603 background: #4267B2; 604 border-radius: 50%; 605 box-shadow: 0px 0px 10px -2px rgba(0,0,0,0.7) 606 } 607 #messengerButton>a>i{ 608 background: url("{$messenger_btn}") center center no-repeat; 609 background-size: 57%; 610 width: 50px; 611 height: 50px; 612 display: inline-block 613 } 354 614 #registerNowButton{ 355 display: none;615 display: inline-block; 356 616 color: #fff; 357 617 height: 50px; 358 618 width: 50px; 359 position: fixed;360 right: 8px;361 bottom: 8px;362 619 border-radius: 50%; 620 margin-right: 10px; 363 621 background: url("{$reg_btn}") center center no-repeat #ff0000; 364 622 box-shadow: 0px 0px 10px -2px rgba(0,0,0,0.7); 365 text-decoration: none; 366 z-index: 9999; 367 } 623 text-decoration: none 624 } 625 HTML; 626 if($ppocta_display_type == 'vertical'){ 627 echo <<<HTML 628 .ppocta-ft-fix.vertical{min-width:inherit} 629 .ppocta-ft-fix.vertical #messengerButton, .ppocta-ft-fix.vertical #zaloButton, 630 .ppocta-ft-fix.vertical #registerNowButton, .ppocta-ft-fix.vertical #callNowButton{ 631 display:block; 632 margin-right:0; 633 margin-top:2px 634 } 635 .ppocta-ft-fix.vertical #callNowButton a.txt{ 636 top: 9px; 637 left: 60px; 638 width: auto; 639 white-space: nowrap; 640 padding-left: 8px; 641 padding-right: 10px; 642 } 643 .ppocta-ft-fix.vertical #callNowButton a.txt:after { 644 bottom: 5px; 645 left: -10px; 646 border-top: 10px solid transparent; 647 border-bottom: 10px solid transparent; 648 border-left: none; 649 border-right: 10px solid #090; 650 } 651 HTML; 652 } 653 if($ppocta_display_screen != 'desktop' and $ppocta_display_screen != 'mobile_desktop'){ 654 echo <<<HTML 368 655 @media (max-width: 991px){ 369 #callNowButton, #registerNowButton{display: block} 370 } 371 </style> 656 .ppocta-ft-fix{display: block} 657 } 372 658 HTML; 659 } else if($ppocta_display_screen == 'desktop'){ 660 echo <<<HTML 661 @media (min-width: 992px){ 662 .ppocta-ft-fix{display: block} 663 } 664 HTML; 665 } else { 666 echo '.ppocta-ft-fix{display: block}'; 667 } 668 echo '</style>'; 669 } 373 670 } 374 671 375 672 public function add_buttons() { 673 $ppocta_display_type = get_option('ppocta_display_type'); 376 674 $show_call = get_option('ppocta_hide_call'); 675 $show_zalo = get_option('ppocta_hide_zalo'); 676 $show_messenger = get_option('ppocta_hide_messenger'); 377 677 $show_reg = get_option('ppocta_hide_register'); 378 678 $phone = get_option('ppocta_phone'); 679 $zalo = get_option('ppocta_zalo'); 680 $messenger = get_option('ppocta_messenger'); 379 681 $callText = get_option('ppocta_calltext'); 380 682 $url = get_option('ppocta_reg_url'); … … 384 686 if(get_post_meta($post_id, 'ppocta_active', true) != 1){ 385 687 if(get_post_meta($post_id, 'ppocta_using_settings', true) == 1){ 688 $ppocta_display_type = get_post_meta($post_id, 'ppocta_display_type', true); 386 689 $show_call = intval(get_post_meta($post_id, 'ppocta_hide_call', true)); 690 $show_zalo = intval(get_post_meta($post_id, 'ppocta_hide_zalo', true)); 691 $show_messenger = intval(get_post_meta($post_id, 'ppocta_hide_messenger', true)); 387 692 $show_reg = intval(get_post_meta($post_id, 'ppocta_hide_register', true)); 388 693 $phone = get_post_meta($post_id, 'ppocta_phone', true); 694 $zalo = get_post_meta($post_id, 'ppocta_zalo', true); 695 $messenger = get_post_meta($post_id, 'ppocta_messenger', true); 389 696 $callText = get_post_meta($post_id, 'ppocta_calltext', true); 390 697 $url = get_post_meta($post_id, 'ppocta_reg_url', true); … … 397 704 if(empty($phone)) $phone = ""; 398 705 if(empty($url)) $url = ""; 399 echo '<div class="ft-fix">'; 706 echo '<div class="ppocta-ft-fix '.$ppocta_display_type.'">'; 707 if(intval($show_messenger) == 1){ 708 echo <<<HTML 709 <div id="messengerButton"> 710 <a href="http://fb.com/msg/{$messenger}" target="_blank" class="ppocta-btn-messenger-tracking"><i></i></a> 711 </div> 712 HTML; 713 } 714 if(intval($show_zalo) == 1){ 715 echo <<<HTML 716 <div id="zaloButton"> 717 <a href="http://zalo.me/{$zalo}" target="_blank" class="ppocta-btn-zalo-tracking"><i></i></a> 718 </div> 719 HTML; 720 } 721 if(intval($show_reg) == 1){ 722 echo <<<HTML 723 <a id="registerNowButton" href="{$url}" class="ppocta-btn-register-tracking"><i></i></a> 724 HTML; 725 } 400 726 if(intval($show_call) == 1){ 727 if(!empty($callText)){ 728 $callText = "<a href=\"tel:{$phone}\" class=\"txt\" class=\"ppocta-text-call-tracking\"><span>{$callText}</span></a>"; 729 } 401 730 echo <<<HTML 402 731 <div id="callNowButton"> 403 <a href="tel:{$phone}" ><i></i></a>404 <a href="tel:{$phone}"><span>{$callText}</span></a>732 <a href="tel:{$phone}" class="ppocta-btn-call-tracking"><i></i></a> 733 {$callText} 405 734 </div> 406 HTML;407 }408 if(intval($show_reg) == 1){409 echo <<<HTML410 <a id="registerNowButton" href="{$url}"><i></i></a>411 735 HTML; 412 736 } -
ppo-call-to-actions/trunk/readme.txt
r1744153 r2263538 4 4 Tags: CTA,call to actions,register button,call now,call button,zalo button,messenger button,nút zalo,nút messenger,gọi hành động,nút gọi hành động,nút gọi,nút đăng ký 5 5 Requires at least: 3.5.1 6 Tested up to: 4.8.27 Stable tag: 0.1. 26 Tested up to: 5.3.2 7 Stable tag: 0.1.3 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 42 42 == Changelog == 43 43 44 = 0.1.3 = 45 * Add class support for Google Tag Manager 46 * Add vertical option 47 * Add display screen option 48 * Add Zalo, Messenger buttons 49 * Change style 50 44 51 = 0.1.2 = 45 52 * Setup CTA for posts, pages
Note: See TracChangeset
for help on using the changeset viewer.