PATH:
home
/
letacommog
/
laindinois
/
OLD
/
wp-content
/
plugins
/
dwt-listing-rest-api
/
classes
<?php /* ---- Register Starts Here ----*/ add_action( 'rest_api_init', 'dwt_listing_profile_forgotpass_hooks_post', 0 ); function dwt_listing_profile_forgotpass_hooks_post() { register_rest_route( 'downtown/app', '/forgot/', array( 'methods' => WP_REST_Server::EDITABLE, 'callback' => 'dwt_listing_profile_forgotpass_post', //'permission_callback' => function () { return dwt_listing_basic_auth(); }, ) ); } if (!function_exists('dwt_listing_profile_forgotpass_post')) { function dwt_listing_profile_forgotpass_post( $request ) { $response = ''; $json_data = $request->get_json_params(); $email = (isset($json_data['email'])) ? trim($json_data['email']) : ''; if ( !is_email($email) ) { $response = array( 'success' => false, 'data' => '' , 'message' => __("Email address is not valid.", "dwt-listing-api") ); return $response; } if( email_exists( $email ) == true ) { $response = dwt_listing_forgot_password_app($email); } else { $success = false; $message = __( 'Email is not resgistered with us.', 'dwt-listing-api' ); $response = array( 'success' => $success, 'data' => '' , 'message' => $message ); } return $response; } } /*Forgot*/ add_action( 'rest_api_init', 'dwt_listing_forgot_api_hooks_get', 0 ); function dwt_listing_forgot_api_hooks_get() { register_rest_route( 'downtown/app', '/forgot/', array( 'methods' => WP_REST_Server::READABLE, 'callback' => 'dwt_listing_forgot_me_get', ) ); } if( !function_exists('dwt_listing_forgot_me_get' ) ) { function dwt_listing_forgot_me_get() { $data['bg_color'] = '#000'; $data['logo'] = dwt_listing_appLogo(); $data['heading'] = __("Forgot Password?", "dwt-listing-api"); $data['text'] = __("Please enter your email address below.", "dwt-listing-api"); $data['email_placeholder'] = __("Email Address", "dwt-listing-api"); $data['submit_text'] = __("Submit", "dwt-listing-api"); $data['back_text'] = __("Back", "dwt-listing-api"); return $response = array( 'success' => true, 'data' => $data, 'message' => '' ); } }
[+]
..
[-] events.php
[edit]
[-] author-listings.php
[edit]
[-] fetch_data.php
[edit]
[-] forget.php
[edit]
[-] categories.php
[edit]
[-] listing-detail.php
[edit]
[-] packages.php
[edit]
[-] home.php
[edit]
[+]
packages
[-] reviews.php
[edit]
[+]
submit-listing
[-] profile.php
[edit]
[-] register.php
[edit]
[-] settings.php
[edit]
[-] events-search.php
[edit]
[-] listing-search.php
[edit]
[+]
profile
[-] event-detail.php
[edit]
[-] login.php
[edit]
[+]
payments
[-] blog.php
[edit]