Changeset 2750141
- Timestamp:
- 06/30/2022 09:56:40 AM (4 years ago)
- Location:
- hellowoofy-com/trunk
- Files:
-
- 3 edited
-
endpoints/class-mws-custom-endpoints.php (modified) (2 diffs)
-
hellowoofy-com.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hellowoofy-com/trunk/endpoints/class-mws-custom-endpoints.php
r2747043 r2750141 19 19 /** Register all the routes */ 20 20 public function __construct() { 21 21 22 /** Verify token */ 23 register_rest_route( 24 'wp/v2', 25 '/validate/token', 26 array( 27 'methods' => 'POST', 28 'callback' => array( $this, 'mws_verify_token' ), 29 ) 30 ); 31 32 /** Create Story */ 22 33 register_rest_route( 23 34 'wp/v2', … … 123 134 } 124 135 136 /** HelloWoofy.com verify token callback */ 137 public function mws_verify_token( WP_REST_Request $request ) { 138 $encode_key = $request->get_header( 'token' ); 139 $decode_unique_key = base64_decode( $encode_key ); 140 $decode_unique_key = substr( stristr( $decode_unique_key, '=' ), 1 ); 141 if ( AUTH_SALT . parse_url( home_url() )['host'] === $decode_unique_key ) { 142 $response = array( 143 'status' => 'success', 144 'message' => 'Token is valid.', 145 ); 146 echo json_encode($response); 147 }else{ 148 $response = array( 149 'status' => 'error', 150 'message' => 'Invalid token.', 151 ); 152 echo json_encode($response); 153 } 154 } 155 125 156 /** HelloWoofy.com rest route function */ 126 157 public function mws_woofy_set_cat_func() { -
hellowoofy-com/trunk/hellowoofy-com.php
r2747043 r2750141 4 4 * Plugin URI: https://hellowoofy.com/hellowoofy-wordpress-plugin/ 5 5 * Description: Create marketing content automatically using data science. 6 * Version: 1. 0.106 * Version: 1.1.0 7 7 * Author: HelloWoofy.com 8 8 * Author URI: https://hellowoofy.com … … 39 39 } 40 40 if ( ! defined( 'MWS_PLUGIN_VERSION' ) ) { 41 define( 'MWS_PLUGIN_VERSION', '1. 0.10' );41 define( 'MWS_PLUGIN_VERSION', '1.1.0' ); 42 42 } 43 43 -
hellowoofy-com/trunk/readme.txt
r2747043 r2750141 5 5 Requires at least: 3.5 6 6 Tested up to: 6.0 7 Stable tag: 1. 0.107 Stable tag: 1.1.0 8 8 Requires PHP: 5.6.20 9 9 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.