Changeset 2675133
- Timestamp:
- 02/08/2022 03:56:22 PM (4 years ago)
- Location:
- stionic-core/trunk
- Files:
-
- 6 edited
-
admin/class-stionic-admin.php (modified) (1 diff)
-
admin/js/categories.js (modified) (1 diff)
-
admin/templates/general.php (modified) (1 diff)
-
endpoints/class-stionic-tools.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
-
stionic-core.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
stionic-core/trunk/admin/class-stionic-admin.php
r2591532 r2675133 216 216 function save_taxonomy_order(){ 217 217 global $wpdb; 218 $taxonomy = stripslashes($_POST['taxonomy']); 219 $unserialised_data = json_decode(stripslashes($_POST['order']), true); 220 $hideInApp = json_decode(stripslashes($_POST['hide']), true); 221 $nonce = stripcslashes($_POST['nonce']); 218 $unserialised_data = !empty($_POST['order']) && is_string($_POST['order']) ? explode(',', $_POST['order']) : array(); 219 $hideInApp = !empty($_POST['hide']) && is_string($_POST['hide']) ? explode(',', $_POST['hide']) : array(); 222 220 // check to see if the submitted nonce matches 223 if ( ! wp_verify_nonce( $ nonce, 'stionic-order-category-nonce' ) ) die ( __('Invalid nonce', 'stionic-core') );221 if ( ! wp_verify_nonce( $_POST['nonce'], 'stionic-order-category-nonce' ) ) die ( __('Invalid nonce', 'stionic-core') ); 224 222 if(!empty($unserialised_data) && is_array($unserialised_data)) foreach($unserialised_data as $key => $values ) { 225 223 $wpdb->update($wpdb->terms, array('term_group' => ($key + 1)), array('term_id' => trim(str_replace("item_", "", $values)))); -
stionic-core/trunk/admin/js/categories.js
r2518381 r2675133 15 15 jQuery.post(ajaxurl, { 16 16 action: 'update_taxonomy_order', 17 order: JSON.stringify(sortable()),18 hide: JSON.stringify(hideInApp()),17 order: sortable().join(','), 18 hide: hideInApp().join(','), 19 19 show_all: show_all.is(":checked"), 20 20 check_show: check_show.is(":checked"), -
stionic-core/trunk/admin/templates/general.php
r2591532 r2675133 26 26 if($data['request_timeout'] < 15000) $data['request_timeout'] = 15000; 27 27 $data['root_endpoint'] = sanitize_text_field($_POST['root_endpoint']); 28 if(isset($_POST['share_android'])) $data['share_android'] = $_POST['share_android'];29 if(isset($_POST['share_ios'])) $data['share_ios'] = $_POST['share_ios'];28 if(isset($_POST['share_android'])) $data['share_android'] = sanitize_textarea_field($_POST['share_android']); 29 if(isset($_POST['share_ios'])) $data['share_ios'] = sanitize_textarea_field($_POST['share_ios']); 30 30 $data['version'] = sanitize_text_field($_POST['version']); 31 31 $data['version_ios'] = sanitize_text_field($_POST['version_ios']); -
stionic-core/trunk/endpoints/class-stionic-tools.php
r2670363 r2675133 37 37 function final_url( $request ){ 38 38 $params = $request->get_params(); 39 // $params['url'] = esc_url($params['url']); 40 $ch = curl_init(); 41 curl_setopt($ch, CURLOPT_URL, $params['url']); 42 curl_setopt($ch, CURLOPT_HEADER, true); 43 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); 44 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 45 $exec = curl_exec($ch); 46 $data = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); 47 return apply_filters( 'stionic_endpoint_final_url', $data, $request ); 39 $url = $params['url']; 40 while(true) { 41 $head = wp_remote_head($url); 42 if (wp_remote_retrieve_header($head, 'Location') == '') break; 43 $url = wp_remote_retrieve_header($head, 'Location'); 44 } 45 return apply_filters( 'stionic_endpoint_final_url', $url, $request ); 48 46 } 49 47 function deeplinks($request){ -
stionic-core/trunk/readme.txt
r2670363 r2675133 5 5 Requires at least: 4.7 6 6 Tested up to: 5.9 7 Stable tag: 1.0.2 47 Stable tag: 1.0.25 8 8 Requires PHP: 5.2.4 9 9 License: GPLv2 or later … … 74 74 == Changelog == 75 75 76 = 1.0.25 = 77 * API final_url use HTTP API Instead of cURL, Validate data 78 76 79 = 1.0.24 = 77 80 * Fix deeplinks tool esc_url … … 177 180 == Upgrade Notice == 178 181 182 = 1.0.25 = 183 API final_url use HTTP API Instead of cURL, Validate data 184 179 185 = 1.0.24 = 180 186 Fix deeplinks tool esc_url -
stionic-core/trunk/stionic-core.php
r2670363 r2675133 4 4 * Plugin URI: https://noncheat.com/category/plugins/stionic-core/ 5 5 * Description: Extending the REST API for Wordpress application 6 * Version: 1.0.2 46 * Version: 1.0.25 7 7 * Author: Noncheat 8 8 * Author URI: https://noncheat.com … … 19 19 if(!defined('STIONIC_HOME')) define('STIONIC_HOME', plugin_dir_path(__FILE__)); 20 20 if(!defined('STIONIC_ASSETS')) define('STIONIC_ASSETS', plugins_url('', __FILE__)); 21 if(!defined('STIONIC_ASSETS_VERSION')) define('STIONIC_ASSETS_VERSION', '1.0. 9');21 if(!defined('STIONIC_ASSETS_VERSION')) define('STIONIC_ASSETS_VERSION', '1.0.10'); 22 22 // require admin 23 23 require_once('admin/class-stionic-admin.php');
Note: See TracChangeset
for help on using the changeset viewer.