Plugin Directory

Changeset 2750141


Ignore:
Timestamp:
06/30/2022 09:56:40 AM (4 years ago)
Author:
hellowoofy10
Message:

Adding 1.1.0 version of plugin

Location:
hellowoofy-com/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • hellowoofy-com/trunk/endpoints/class-mws-custom-endpoints.php

    r2747043 r2750141  
    1919    /** Register all the routes */
    2020    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 */
    2233        register_rest_route(
    2334            'wp/v2',
     
    123134    }
    124135
     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
    125156    /** HelloWoofy.com rest route function */
    126157    public function mws_woofy_set_cat_func() {
  • hellowoofy-com/trunk/hellowoofy-com.php

    r2747043 r2750141  
    44 * Plugin URI: https://hellowoofy.com/hellowoofy-wordpress-plugin/
    55 * Description: Create marketing content automatically using data science.
    6  * Version: 1.0.10
     6 * Version: 1.1.0
    77 * Author: HelloWoofy.com
    88 * Author URI: https://hellowoofy.com
     
    3939}
    4040if ( ! defined( 'MWS_PLUGIN_VERSION' ) ) {
    41     define( 'MWS_PLUGIN_VERSION', '1.0.10' );
     41    define( 'MWS_PLUGIN_VERSION', '1.1.0' );
    4242}
    4343
  • hellowoofy-com/trunk/readme.txt

    r2747043 r2750141  
    55Requires at least: 3.5
    66Tested up to: 6.0
    7 Stable tag: 1.0.10
     7Stable tag: 1.1.0
    88Requires PHP: 5.6.20
    99License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.