Changeset 3209259
- Timestamp:
- 12/17/2024 02:49:54 PM (16 months ago)
- Location:
- liquid-speech-balloon
- Files:
-
- 4 added
- 8 edited
- 1 copied
-
tags/1.2.4 (copied) (copied from liquid-speech-balloon/trunk)
-
tags/1.2.4/inc (added)
-
tags/1.2.4/inc/api.php (added)
-
tags/1.2.4/liquid-speech-balloon.php (modified) (5 diffs)
-
tags/1.2.4/package-lock.json (modified) (1 diff)
-
tags/1.2.4/package.json (modified) (1 diff)
-
tags/1.2.4/readme.txt (modified) (1 diff)
-
trunk/inc (added)
-
trunk/inc/api.php (added)
-
trunk/liquid-speech-balloon.php (modified) (5 diffs)
-
trunk/package-lock.json (modified) (1 diff)
-
trunk/package.json (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
liquid-speech-balloon/tags/1.2.4/liquid-speech-balloon.php
r3070426 r3209259 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 Text Domain: liquid-speech-balloon 11 Version: 1.2. 411 Version: 1.2.5 12 12 */ 13 13 /* Copyright 2019 LIQUID DESIGN Ltd. (email : [email protected]) … … 34 34 add_action( 'init', 'liquid_speech_balloon_init' ); 35 35 36 // api 37 if ( is_admin() ) { 38 $liquid_speech_balloon_api = require_once 'inc/api.php'; 39 $liquid_speech_balloon_json = $liquid_speech_balloon_api('https://lqd.jp/wp/data/p/liquid-speech-balloon.json', 'liquid_speech_balloon_json'); 40 } 41 42 // plugin_action_links_ 36 43 function liquid_speech_balloon_plugin_action_links( $links ) { 37 44 $mylinks = '<a href="'.admin_url( 'options-general.php?page=liquid-speech-balloon' ).'">'.__( 'Settings', 'liquid-speech-balloon' ).'</a>'; … … 144 151 // admin_page 145 152 function liquid_speech_balloon_admin_page() { 146 global $ json_liquid_speech_balloon, $liquid_speech_balloon, $liquid_speech_balloon_img, $liquid_speech_balloon_name, $liquid_speech_balloon_note;153 global $liquid_speech_balloon_json, $liquid_speech_balloon, $liquid_speech_balloon_img, $liquid_speech_balloon_name, $liquid_speech_balloon_note; 147 154 148 155 // POST … … 202 209 203 210 <!-- Recommend --> 204 <?php if( !empty($ json_liquid_speech_balloon->recommend) ){ ?>211 <?php if( !empty($liquid_speech_balloon_json) && !empty($liquid_speech_balloon_json['recommend']) ){ ?> 205 212 <div class="postbox"> 206 213 <h2 style="border-bottom: 1px solid #eee;"><?php _e( 'Recommend', 'liquid-speech-balloon' ); ?></h2> 207 <div class="inside"><?php echo $ json_liquid_speech_balloon->recommend; ?></div>214 <div class="inside"><?php echo $liquid_speech_balloon_json['recommend']; ?></div> 208 215 </div> 209 216 <?php } ?> … … 311 318 <?php } 312 319 313 // json314 if ( is_admin() ) {315 $json_liquid_speech_balloon_error = "";316 $json_liquid_speech_balloon_url = "https://lqd.jp/wp/data/p/liquid-speech-balloon.json";317 $json_liquid_speech_balloon = wp_remote_get($json_liquid_speech_balloon_url);318 if ( is_wp_error( $json_liquid_speech_balloon ) ) {319 $json_liquid_speech_balloon_error = $json_liquid_speech_balloon->get_error_message().$json_liquid_speech_balloon_url;320 }else{321 $json_liquid_speech_balloon = json_decode($json_liquid_speech_balloon['body']);322 }323 }324 325 320 // notices 326 321 function liquid_speech_balloon_admin_notices() { 327 global $json_liquid_speech_balloon, $json_liquid_speech_balloon_error; 328 if ( isset( $_GET['liquid_admin_notices_dismissed'] ) ) { 329 set_transient( 'liquid_admin_notices', 'dismissed', 60*60*24*30 ); 330 } 331 if ( isset( $_GET['liquid_admin_offer_dismissed'] ) ) { 332 set_transient( 'liquid_admin_offer', 'dismissed', 60*60*24*30 ); 333 } 334 if( !empty($json_liquid_speech_balloon->news) && get_transient( 'liquid_admin_notices' ) != 'dismissed' ){ 335 echo '<div class="notice notice-info" style="position: relative;"><p>'.$json_liquid_speech_balloon->news.'</p><a href="?liquid_admin_notices_dismissed" style="position: absolute; right: 10px; top: 10px;">×</a></div>'; 336 } 337 if( !empty($json_liquid_speech_balloon->offer) && get_transient( 'liquid_admin_offer' ) != 'dismissed' ){ 338 echo '<div class="notice notice-info" style="position: relative;"><p>'.$json_liquid_speech_balloon->offer.'</p><a href="?liquid_admin_offer_dismissed" style="position: absolute; right: 10px; top: 10px;">×</a></div>'; 339 } 340 if(!empty($json_liquid_speech_balloon_error)) { 341 echo '<script>console.log("'.$json_liquid_speech_balloon_error.'");</script>'; 322 global $liquid_speech_balloon_json; 323 if( !empty($liquid_speech_balloon_json) ) { 324 if ( isset( $_GET['liquid_admin_notices_dismissed'] ) ) { 325 set_transient( 'liquid_admin_notices', 'dismissed', 60*60*24*30 ); 326 } 327 if ( isset( $_GET['liquid_admin_offer_dismissed'] ) ) { 328 set_transient( 'liquid_admin_offer', 'dismissed', 60*60*24*30 ); 329 } 330 if( !empty($liquid_speech_balloon_json['news']) && get_transient( 'liquid_admin_notices' ) != 'dismissed' ){ 331 echo '<div class="notice notice-info" style="position: relative;"><p>'.$liquid_speech_balloon_json['news'].'</p><a href="?liquid_admin_notices_dismissed" style="position: absolute; right: 10px; top: 10px;">×</a></div>'; 332 } 333 if( !empty($liquid_speech_balloon_json['offer']) && get_transient( 'liquid_admin_offer' ) != 'dismissed' ){ 334 echo '<div class="notice notice-info" style="position: relative;"><p>'.$liquid_speech_balloon_json['offer'].'</p><a href="?liquid_admin_offer_dismissed" style="position: absolute; right: 10px; top: 10px;">×</a></div>'; 335 } 342 336 } 343 337 } -
liquid-speech-balloon/tags/1.2.4/package-lock.json
r3070426 r3209259 1 1 { 2 2 "name": "liquid-speech-balloon", 3 "version": "1.2. 4",3 "version": "1.2.5", 4 4 "lockfileVersion": 1, 5 5 "requires": true, -
liquid-speech-balloon/tags/1.2.4/package.json
r3070426 r3209259 1 1 { 2 2 "name": "liquid-speech-balloon", 3 "version": "1.2. 4",3 "version": "1.2.5", 4 4 "devDependencies": { 5 5 "babel-cli": "^6.9.0", -
liquid-speech-balloon/tags/1.2.4/readme.txt
r3070426 r3209259 4 4 Tags: gutenberg, blocks, speech, speak, conversation 5 5 Requires at least: 5.0.0 6 Tested up to: 6. 5.17 Stable tag: 1.2. 46 Tested up to: 6.7.1 7 Stable tag: 1.2.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
liquid-speech-balloon/trunk/liquid-speech-balloon.php
r3070426 r3209259 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html 10 10 Text Domain: liquid-speech-balloon 11 Version: 1.2. 411 Version: 1.2.5 12 12 */ 13 13 /* Copyright 2019 LIQUID DESIGN Ltd. (email : [email protected]) … … 34 34 add_action( 'init', 'liquid_speech_balloon_init' ); 35 35 36 // api 37 if ( is_admin() ) { 38 $liquid_speech_balloon_api = require_once 'inc/api.php'; 39 $liquid_speech_balloon_json = $liquid_speech_balloon_api('https://lqd.jp/wp/data/p/liquid-speech-balloon.json', 'liquid_speech_balloon_json'); 40 } 41 42 // plugin_action_links_ 36 43 function liquid_speech_balloon_plugin_action_links( $links ) { 37 44 $mylinks = '<a href="'.admin_url( 'options-general.php?page=liquid-speech-balloon' ).'">'.__( 'Settings', 'liquid-speech-balloon' ).'</a>'; … … 144 151 // admin_page 145 152 function liquid_speech_balloon_admin_page() { 146 global $ json_liquid_speech_balloon, $liquid_speech_balloon, $liquid_speech_balloon_img, $liquid_speech_balloon_name, $liquid_speech_balloon_note;153 global $liquid_speech_balloon_json, $liquid_speech_balloon, $liquid_speech_balloon_img, $liquid_speech_balloon_name, $liquid_speech_balloon_note; 147 154 148 155 // POST … … 202 209 203 210 <!-- Recommend --> 204 <?php if( !empty($ json_liquid_speech_balloon->recommend) ){ ?>211 <?php if( !empty($liquid_speech_balloon_json) && !empty($liquid_speech_balloon_json['recommend']) ){ ?> 205 212 <div class="postbox"> 206 213 <h2 style="border-bottom: 1px solid #eee;"><?php _e( 'Recommend', 'liquid-speech-balloon' ); ?></h2> 207 <div class="inside"><?php echo $ json_liquid_speech_balloon->recommend; ?></div>214 <div class="inside"><?php echo $liquid_speech_balloon_json['recommend']; ?></div> 208 215 </div> 209 216 <?php } ?> … … 311 318 <?php } 312 319 313 // json314 if ( is_admin() ) {315 $json_liquid_speech_balloon_error = "";316 $json_liquid_speech_balloon_url = "https://lqd.jp/wp/data/p/liquid-speech-balloon.json";317 $json_liquid_speech_balloon = wp_remote_get($json_liquid_speech_balloon_url);318 if ( is_wp_error( $json_liquid_speech_balloon ) ) {319 $json_liquid_speech_balloon_error = $json_liquid_speech_balloon->get_error_message().$json_liquid_speech_balloon_url;320 }else{321 $json_liquid_speech_balloon = json_decode($json_liquid_speech_balloon['body']);322 }323 }324 325 320 // notices 326 321 function liquid_speech_balloon_admin_notices() { 327 global $json_liquid_speech_balloon, $json_liquid_speech_balloon_error; 328 if ( isset( $_GET['liquid_admin_notices_dismissed'] ) ) { 329 set_transient( 'liquid_admin_notices', 'dismissed', 60*60*24*30 ); 330 } 331 if ( isset( $_GET['liquid_admin_offer_dismissed'] ) ) { 332 set_transient( 'liquid_admin_offer', 'dismissed', 60*60*24*30 ); 333 } 334 if( !empty($json_liquid_speech_balloon->news) && get_transient( 'liquid_admin_notices' ) != 'dismissed' ){ 335 echo '<div class="notice notice-info" style="position: relative;"><p>'.$json_liquid_speech_balloon->news.'</p><a href="?liquid_admin_notices_dismissed" style="position: absolute; right: 10px; top: 10px;">×</a></div>'; 336 } 337 if( !empty($json_liquid_speech_balloon->offer) && get_transient( 'liquid_admin_offer' ) != 'dismissed' ){ 338 echo '<div class="notice notice-info" style="position: relative;"><p>'.$json_liquid_speech_balloon->offer.'</p><a href="?liquid_admin_offer_dismissed" style="position: absolute; right: 10px; top: 10px;">×</a></div>'; 339 } 340 if(!empty($json_liquid_speech_balloon_error)) { 341 echo '<script>console.log("'.$json_liquid_speech_balloon_error.'");</script>'; 322 global $liquid_speech_balloon_json; 323 if( !empty($liquid_speech_balloon_json) ) { 324 if ( isset( $_GET['liquid_admin_notices_dismissed'] ) ) { 325 set_transient( 'liquid_admin_notices', 'dismissed', 60*60*24*30 ); 326 } 327 if ( isset( $_GET['liquid_admin_offer_dismissed'] ) ) { 328 set_transient( 'liquid_admin_offer', 'dismissed', 60*60*24*30 ); 329 } 330 if( !empty($liquid_speech_balloon_json['news']) && get_transient( 'liquid_admin_notices' ) != 'dismissed' ){ 331 echo '<div class="notice notice-info" style="position: relative;"><p>'.$liquid_speech_balloon_json['news'].'</p><a href="?liquid_admin_notices_dismissed" style="position: absolute; right: 10px; top: 10px;">×</a></div>'; 332 } 333 if( !empty($liquid_speech_balloon_json['offer']) && get_transient( 'liquid_admin_offer' ) != 'dismissed' ){ 334 echo '<div class="notice notice-info" style="position: relative;"><p>'.$liquid_speech_balloon_json['offer'].'</p><a href="?liquid_admin_offer_dismissed" style="position: absolute; right: 10px; top: 10px;">×</a></div>'; 335 } 342 336 } 343 337 } -
liquid-speech-balloon/trunk/package-lock.json
r3070426 r3209259 1 1 { 2 2 "name": "liquid-speech-balloon", 3 "version": "1.2. 4",3 "version": "1.2.5", 4 4 "lockfileVersion": 1, 5 5 "requires": true, -
liquid-speech-balloon/trunk/package.json
r3070426 r3209259 1 1 { 2 2 "name": "liquid-speech-balloon", 3 "version": "1.2. 4",3 "version": "1.2.5", 4 4 "devDependencies": { 5 5 "babel-cli": "^6.9.0", -
liquid-speech-balloon/trunk/readme.txt
r3070426 r3209259 4 4 Tags: gutenberg, blocks, speech, speak, conversation 5 5 Requires at least: 5.0.0 6 Tested up to: 6. 5.17 Stable tag: 1.2. 46 Tested up to: 6.7.1 7 Stable tag: 1.2.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.