Changeset 2018853
- Timestamp:
- 01/25/2019 05:56:37 AM (7 years ago)
- Location:
- hotline-phone-ring/trunk
- Files:
-
- 8 edited
-
assets/css/style-1.css (modified) (4 diffs)
-
hotline-phone-ring.php (modified) (2 diffs)
-
includes/backend.php (modified) (2 diffs)
-
includes/class-hotline-phone-ring.php (modified) (7 diffs)
-
languages/hotline-phone-ring-vi.mo (modified) (previous)
-
languages/hotline-phone-ring-vi.po (modified) (5 diffs)
-
languages/hotline-phone-ring.pot (modified) (4 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hotline-phone-ring/trunk/assets/css/style-1.css
r1997649 r2018853 43 43 width: 55px; 44 44 height: 55px; 45 top: 2 6px;46 left: 2 6px;45 top: 25px; 46 left: 25px; 47 47 position: absolute; 48 48 background-color: rgba(230, 8, 8, 0.7); … … 94 94 .hotline-bar { 95 95 position: absolute; 96 background: #E88A25; 97 background: -webkit-linear-gradient(left, #e88a25, #d40000); 98 background: -o-linear-gradient(right, #e88a25, #d40000); 99 background: -moz-linear-gradient(right, #e88a25, #d40000); 100 background: linear-gradient(to right, #e88a25, #d40000); 96 background: rgba(230, 8, 8, 0.75); 101 97 height: 40px; 102 98 width: 200px; … … 111 107 box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.1); 112 108 border-radius: 50px !important; 113 border: 2px solid white;114 109 /* width: 175px !important; */ 115 110 left: 33px; … … 125 120 display: block; 126 121 letter-spacing: 1px; 127 line-height: 38px;122 line-height: 40px; 128 123 font-family: Arial; 129 124 } -
hotline-phone-ring/trunk/hotline-phone-ring.php
r1997649 r2018853 4 4 * Plugin URI: https://namncn.com/plugins/hotline-phone-ring/ 5 5 * Description: Fixed Hotline on the screen. 6 * Version: 2.0. 26 * Version: 2.0.3 7 7 * Author: Nam Truong 8 8 * Author URI: https://namncn.com … … 19 19 20 20 // Define. 21 define( 'HPR_VERSION', '2.0. 2' );21 define( 'HPR_VERSION', '2.0.3' ); 22 22 define( 'HPR_FILE', __FILE__ ); 23 23 define( 'HPR_PATH', plugin_dir_path( HPR_FILE ) ); -
hotline-phone-ring/trunk/includes/backend.php
r1987961 r2018853 24 24 </th> 25 25 <td> 26 <input id=hpr_phone" name="hpr_options[phone]" type="text" class="regular-text" value="<?php e sc_attr_e( $data['phone'] ); ?>" />26 <input id=hpr_phone" name="hpr_options[phone]" type="text" class="regular-text" value="<?php echo esc_attr( $data['phone'] ); ?>" /> 27 27 </td> 28 28 </tr> 29 29 <tr valign="top"> 30 30 <th scope="row" valign="top"> 31 <?php esc_html_e( 'Select style', 'hotline-phone-ring'); ?>31 <?php esc_html_e( 'Select style', 'hotline-phone-ring' ); ?> 32 32 </th> 33 33 <td> … … 42 42 <tr valign="top"> 43 43 <th scope="row" valign="top"> 44 <?php esc_html_e('Hide Hotline Bar', 'hotline-phone-ring'); ?> 44 <?php esc_html_e( 'Color', 'hotline-phone-ring' ); ?> 45 </th> 46 <td> 47 <label for="hpr_color"> 48 <input id="hpr_color" name="hpr_options[color]" type="text" value="<?php echo esc_attr( $data['color'] ); ?>" class="hpr-color-picker" /> 49 </label> 50 </td> 51 </tr> 52 <tr valign="top"> 53 <th scope="row" valign="top"> 54 <?php esc_html_e( 'Hide Hotline Bar', 'hotline-phone-ring' ); ?> 45 55 </th> 46 56 <td> -
hotline-phone-ring/trunk/includes/class-hotline-phone-ring.php
r1987961 r2018853 48 48 add_action( 'admin_menu', array( $this, 'menu' ) ); 49 49 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 50 add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); 51 add_action( 'wp_head', array( $this, 'frontend_custom_style' ) ); 50 52 add_action( 'wp_footer', array( $this, 'frontend' ) ); 51 53 add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 500 ); 52 54 53 55 if ( isset( $_REQUEST['page'] ) && 'hotline-phone-ring' == $_REQUEST['page'] ) { 54 // Only admins can save settings.55 if ( ! current_user_can('manage_options') ) {56 return;57 }58 59 56 $this->save(); 60 57 } … … 62 59 63 60 /** 64 * Registers Widget.61 * Enqueue frontend styles & scripts. 65 62 */ 66 63 public function enqueue_scripts() { … … 74 71 75 72 /** 76 * Renders the admin settings menu. 73 * Enqueue admin styles & scripts. 74 */ 75 public function admin_enqueue_scripts() { 76 wp_enqueue_style( 'wp-color-picker' ); 77 wp_enqueue_script( 'hpr-admin-script', HPR_ASSETS_URL . 'js/admin.js', array( 'jquery', 'wp-color-picker' ), HPR_VERSION, true ); 78 } 79 80 /** 81 * Register admin settings menu. 77 82 * 78 83 * @since 1.0.0 … … 105 110 'phone' => '', 106 111 'style' => 'style1', 112 'color' => '', 107 113 'hotline_bar' => '', 108 114 ); … … 141 147 142 148 /** 143 * Hotline phone ring front -end template.149 * Hotline phone ring frontend template. 144 150 * @return [type] [description] 145 151 */ … … 238 244 $data['phone'] = isset( $_POST['hpr_options']['phone'] ) ? sanitize_text_field( $_POST['hpr_options']['phone'] ) : ''; 239 245 $data['style'] = isset( $_POST['hpr_options']['style'] ) ? sanitize_text_field( $_POST['hpr_options']['style'] ) : 'style1'; 246 $data['color'] = isset( $_POST['hpr_options']['color'] ) ? sanitize_text_field( $_POST['hpr_options']['color'] ) : ''; 240 247 $data['hotline_bar'] = isset( $_POST['hpr_options']['hotline_bar'] ) ? 'on' : 'off'; 241 248 … … 267 274 return $footer_text; 268 275 } 276 277 /** 278 * Frontend custom style. 279 */ 280 public function frontend_custom_style() { 281 $data = $this->data(); 282 283 if ( $data['color'] ) { ?> 284 <style> 285 .hotline-phone-ring-circle { 286 border-color: <?php echo $data['color'] ?>; 287 } 288 .hotline-phone-ring-circle-fill, .hotline-phone-ring-img-circle, .hotline-bar { 289 background-color: <?php echo $data['color'] ?>; 290 } 291 </style> 292 293 <?php if ( 'style1' == $data['style'] ) { 294 $hex = $data['color']; 295 ( strlen( $hex ) === 4 ) ? list( $r, $g, $b ) = sscanf( $hex, '#%1x%1x%1x' ) : list( $r, $g, $b ) = sscanf( $hex, '#%2x%2x%2x' ); 296 $hotlinebar_bg = "rgb( $r, $g, $b, .7 )"; 297 ?> 298 <style> 299 .hotline-bar { 300 background: <?php echo $hotlinebar_bg ?>; 301 } 302 </style> 303 <?php } ?> 304 305 <?php } 306 } 269 307 } -
hotline-phone-ring/trunk/languages/hotline-phone-ring-vi.po
r1988006 r2018853 3 3 "Project-Id-Version: Hotline Phone Ring\n" 4 4 "Report-Msgid-Bugs-To: \n" 5 "POT-Creation-Date: 201 8-12-07 15:04+0000\n"6 "PO-Revision-Date: 201 8-12-07 15:05+0000\n"5 "POT-Creation-Date: 2019-01-25 05:52+0000\n" 6 "PO-Revision-Date: 2019-01-25 05:52+0000\n" 7 7 "Last-Translator: phoenixdigi <quantri@phoenixdigi.vn>\n" 8 8 "Language-Team: Tiếng Việt\n" … … 18 18 msgstr "Cài đặt nút gọi rung" 19 19 20 #: includes/backend.php:23 includes/class-hotline-phone-ring.php:17 220 #: includes/backend.php:23 includes/class-hotline-phone-ring.php:178 21 21 msgid "Hotline" 22 22 msgstr "Số điện thoại" … … 35 35 36 36 #: includes/backend.php:44 37 msgid "Color" 38 msgstr "Màu sắc" 39 40 #: includes/backend.php:54 37 41 msgid "Hide Hotline Bar" 38 42 msgstr "Ẩn thanh chứa số điện thoại" 39 43 40 #: includes/backend.php: 6244 #: includes/backend.php:72 41 45 msgid "Support" 42 46 msgstr "Hỗ trợ" 43 47 44 #: includes/backend.php: 6448 #: includes/backend.php:74 45 49 msgid "" 46 50 "For submitting any support queries, feedback, bug reports or feature " … … 56 60 "này</a>." 57 61 58 #: includes/class-hotline-phone-ring.php: 8562 #: includes/class-hotline-phone-ring.php:90 59 63 msgid "HPR Options" 60 64 msgstr "HPR Options" 61 65 62 #: includes/class-hotline-phone-ring.php:1 2966 #: includes/class-hotline-phone-ring.php:135 63 67 msgid "Settings updated!" 64 68 msgstr "Cập nhật các cài đặt thành công!" 65 69 66 #: includes/class-hotline-phone-ring.php:2 6470 #: includes/class-hotline-phone-ring.php:271 67 71 msgid "" 68 72 " Enjoyed <strong>Hotline Phone Ring</strong>? Please leave us a <a " … … 90 94 #. Author of the plugin 91 95 msgid "Nam Truong" 92 msgstr " "96 msgstr "Nam Trương" 93 97 94 98 #. Author URI of the plugin -
hotline-phone-ring/trunk/languages/hotline-phone-ring.pot
r1988006 r2018853 4 4 "Project-Id-Version: Hotline Phone Ring\n" 5 5 "Report-Msgid-Bugs-To: \n" 6 "POT-Creation-Date: 201 8-12-07 15:04+0000\n"6 "POT-Creation-Date: 2019-01-25 05:52+0000\n" 7 7 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 8 8 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 19 19 msgstr "" 20 20 21 #: includes/backend.php:23 includes/class-hotline-phone-ring.php:17 221 #: includes/backend.php:23 includes/class-hotline-phone-ring.php:178 22 22 msgid "Hotline" 23 23 msgstr "" … … 36 36 37 37 #: includes/backend.php:44 38 msgid "Color" 39 msgstr "" 40 41 #: includes/backend.php:54 38 42 msgid "Hide Hotline Bar" 39 43 msgstr "" 40 44 41 #: includes/backend.php: 6245 #: includes/backend.php:72 42 46 msgid "Support" 43 47 msgstr "" 44 48 45 #: includes/backend.php: 6449 #: includes/backend.php:74 46 50 msgid "" 47 51 "For submitting any support queries, feedback, bug reports or feature " … … 52 56 msgstr "" 53 57 54 #: includes/class-hotline-phone-ring.php: 8558 #: includes/class-hotline-phone-ring.php:90 55 59 msgid "HPR Options" 56 60 msgstr "" 57 61 58 #: includes/class-hotline-phone-ring.php:1 2962 #: includes/class-hotline-phone-ring.php:135 59 63 msgid "Settings updated!" 60 64 msgstr "" 61 65 62 #: includes/class-hotline-phone-ring.php:2 6466 #: includes/class-hotline-phone-ring.php:271 63 67 msgid "" 64 68 " Enjoyed <strong>Hotline Phone Ring</strong>? Please leave us a <a " -
hotline-phone-ring/trunk/readme.txt
r1997649 r2018853 5 5 License URI: http://www.gnu.org/licenses/gpl.html 6 6 Tags: hotline, phone, fixed, wp phonering, dien thoai rung 7 Tested up to: 5.0. 07 Tested up to: 5.0.3 8 8 Requires PHP: 5.6.3 9 9 … … 36 36 == Changelog == 37 37 38 = 1.0.0=39 * First release.38 = 2.0.3 = 39 * Color option. 40 40 41 = 1.0.1=42 * Update settings.41 = 2.0.2 = 42 * Fix z-index. 43 43 44 = 1.0.2=45 * Update Css default.44 = 2.0.1 = 45 * Update translate. 46 46 47 = 1.0.3=48 * Fixed option.47 = 2.0.0 = 48 * Add new style. 49 49 50 = 1.0. 4=51 * Update admin settings.50 = 1.0.8 = 51 * Add new contributor. 52 52 53 = 1.0. 5=53 = 1.0.7 = 54 54 * Fix bug. 55 55 … … 57 57 * Vietnamese language support. 58 58 59 = 1.0. 7=59 = 1.0.5 = 60 60 * Fix bug. 61 61 62 = 1.0. 8=63 * Add new contributor.62 = 1.0.4 = 63 * Update admin settings. 64 64 65 = 2.0.0=66 * Add new style.65 = 1.0.3 = 66 * Fixed option. 67 67 68 = 2.0.1=69 * Update translate.68 = 1.0.2 = 69 * Update Css default. 70 70 71 = 2.0.2 = 72 * Fix z-index. 71 = 1.0.1 = 72 * Update settings. 73 74 = 1.0.0 = 75 * First release.
Note: See TracChangeset
for help on using the changeset viewer.