Changeset 3242754
- Timestamp:
- 02/18/2025 03:48:02 PM (12 months ago)
- Location:
- facial-recognition-authentication/trunk
- Files:
-
- 6 edited
-
facial-recognition-authentication.php (modified) (3 diffs)
-
inc/admin_menu_page.php (modified) (4 diffs)
-
inc/admin_menu_page2.php (modified) (1 diff)
-
inc/backend.php (modified) (4 diffs)
-
inc/frontend.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
facial-recognition-authentication/trunk/facial-recognition-authentication.php
r3241674 r3242754 1 1 <?php 2 2 3 if ( ! defined( 'ABSPATH' )) exit; // Exit if accessed directly3 if (!defined('ABSPATH')) exit; // Exit if accessed directly 4 4 5 5 /** … … 14 14 Description: Face ID registration and login for WordPress 15 15 Author: New-way 16 Version: 1.0. 116 Version: 1.0.2 17 17 */ 18 18 … … 28 28 29 29 // Updated code 30 function fra_faceid_activation() { 30 function fra_faceid_activation() 31 { 31 32 // Code for activation without error_log 32 33 } 33 34 34 function fra_faceid_deactivation() { 35 function fra_faceid_deactivation() 36 { 35 37 // Code for deactivation without error_log 36 38 } -
facial-recognition-authentication/trunk/inc/admin_menu_page.php
r3241674 r3242754 1 1 <?php 2 if ( ! defined( 'ABSPATH' )) exit; // Exit if accessed directly2 if (!defined('ABSPATH')) exit; // Exit if accessed directly 3 3 ?> 4 4 … … 11 11 FaceRecognition authentication plugin for WordPress websites 12 12 </h1> 13 <button class="btn btn-warning text-white" id="accesscamera" data-bs-toggle="modal" data-bs-target="#photoModal"> 13 <button class="btn btn-warning text-white" id="accesscamera" data-bs-toggle="modal" 14 data-bs-target="#photoModal"> 14 15 Capture Photo 15 16 </button> … … 35 36 </div> 36 37 <div class="modal-footer"> 37 <button type="button" class="btn btn-warning mx-auto text-white" id="takephoto" form="photoForm">Capture Photo</button> 38 <button type="button" class="btn btn-warning mx-auto text-white d-none" id="retakephoto">Retake</button> 39 <button type="submit" class="btn btn-warning mx-auto text-white d-none" id="uploadphoto" form="photoForm">Upload</button> 40 <input type="email" name="email" form="photoForm" id="email" class="d-none" value="" placeholder="Email" required /> 41 <input type="password" name="password" form="photoForm" id="password" class="d-none" value="" placeholder="Enter your password" required /> 38 <button type="button" class="btn btn-warning mx-auto text-white" id="takephoto" form="photoForm"> 39 Capture Photo 40 </button> 41 <button type="button" class="btn btn-warning mx-auto text-white d-none" id="retakephoto">Retake 42 </button> 43 <button type="submit" class="btn btn-warning mx-auto text-white d-none" id="uploadphoto" 44 form="photoForm">Upload 45 </button> 46 <input type="email" name="email" form="photoForm" id="email" class="d-none" value="" 47 placeholder="Email" required/> 48 <input type="password" name="password" form="photoForm" id="password" class="d-none" value="" 49 placeholder="Enter your password" required/> 42 50 <div id="alert"></div> 43 51 </div> … … 47 55 </div> 48 56 49 <?php wp_footer(); ?> <!-- برای بارگذاری اسکریپتهای وردپرس -->57 <?php wp_footer(); ?> -
facial-recognition-authentication/trunk/inc/admin_menu_page2.php
r3241674 r3242754 1 1 <?php 2 if ( ! defined( 'ABSPATH' )) exit; // Exit if accessed directly2 if (!defined('ABSPATH')) exit; // Exit if accessed directly 3 3 ?> 4 4 5 <div class="wrap"> 6 <div class="container-fluid"> 7 <!-- مرکز محتوا با استفاده از grid bootstrap --> 8 <div class="row text-center align-items-center justify-content-center" style="height: 100vh; background-color: #343a40;"> 9 <div class="col-sm-12 col-md-6 mx-auto"> 10 <h1 class="text-white mb-5"> 11 FaceRecognition Authentication Plugin for WordPress Websites 12 </h1> 13 <!-- دکمه Capture Photo --> 14 <button class="btn btn-warning text-white" id="accesscamera" data-bs-toggle="modal" data-bs-target="#photoModal"> 15 Capture Photo 16 </button> 5 <div class="wrap"> 6 <div class="container-fluid"> 7 <!-- grid bootstrap --> 8 <div class="row text-center align-items-center justify-content-center" 9 style="height: 100vh; background-color: #343a40;"> 10 <div class="col-sm-12 col-md-6 mx-auto"> 11 <h1 class="text-white mb-5"> 12 FaceRecognition Authentication Plugin for WordPress Websites 13 </h1> 14 <!-- Capture Photo --> 15 <button class="btn btn-warning text-white" id="accesscamera" data-bs-toggle="modal" 16 data-bs-target="#photoModal"> 17 Capture Photo 18 </button> 19 </div> 20 </div> 21 </div> 22 23 <!-- Modal Capture Photo --> 24 <div class="modal fade" id="photoModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> 25 <div class="modal-dialog"> 26 <div class="modal-content"> 27 <div class="modal-header"> 28 <h5 class="modal-title" id="exampleModalLabel">Capture Photo</h5> 29 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> 30 </div> 31 <div class="modal-body"> 32 33 <div id="my_camera" class="d-block mx-auto rounded overflow-hidden"></div> 34 35 <div id="results" class="d-none"></div> 36 <form method="post" id="photoForm"> 37 <input type="hidden" id="photoStore" name="photoStore" value=""> 38 </form> 39 </div> 40 <div class="modal-footer"> 41 42 <button type="button" class="btn btn-warning mx-auto text-white" id="takephoto" 43 form="photoForm">Capture Photo 44 </button> 45 <button type="button" class="btn btn-warning mx-auto text-white d-none" id="retakephoto"> 46 Retake 47 </button> 48 <button type="submit" class="btn btn-warning mx-auto text-white d-none" id="uploadphoto" 49 form="photoForm">Upload 50 </button> 51 52 <input type="email" name="email" form="photoForm" id="email" class="d-none" value="" 53 placeholder="Email" required/> 54 <input type="password" name="password" form="photoForm" id="password" class="d-none" value="" 55 placeholder="Enter your password" required/> 56 <div id="alert"></div> 57 </div> 58 </div> 17 59 </div> 18 60 </div> 19 61 </div> 20 62 21 <!-- Modal برای Capture Photo --> 22 <div class="modal fade" id="photoModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> 23 <div class="modal-dialog"> 24 <div class="modal-content"> 25 <div class="modal-header"> 26 <h5 class="modal-title" id="exampleModalLabel">Capture Photo</h5> 27 <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> 28 </div> 29 <div class="modal-body"> 30 <!-- نمایش وبکم --> 31 <div id="my_camera" class="d-block mx-auto rounded overflow-hidden"></div> 32 <!-- نتایج --> 33 <div id="results" class="d-none"></div> 34 <form method="post" id="photoForm"> 35 <input type="hidden" id="photoStore" name="photoStore" value=""> 36 </form> 37 </div> 38 <div class="modal-footer"> 39 <!-- دکمههای مختلف برای عکسبرداری و آپلود --> 40 <button type="button" class="btn btn-warning mx-auto text-white" id="takephoto" form="photoForm">Capture Photo</button> 41 <button type="button" class="btn btn-warning mx-auto text-white d-none" id="retakephoto">Retake</button> 42 <button type="submit" class="btn btn-warning mx-auto text-white d-none" id="uploadphoto" form="photoForm">Upload</button> 43 <!-- فیلدهای مخفی برای ارسال اطلاعات --> 44 <input type="email" name="email" form="photoForm" id="email" class="d-none" value="" placeholder="Email" required /> 45 <input type="password" name="password" form="photoForm" id="password" class="d-none" value="" placeholder="Enter your password" required /> 46 <div id="alert"></div> 47 </div> 48 </div> 49 </div> 50 </div> 51 </div> 52 53 <?php wp_footer(); ?> <!-- برای بارگذاری اسکریپتهای وردپرس --> 63 <?php wp_footer(); ?> -
facial-recognition-authentication/trunk/inc/backend.php
r3241674 r3242754 1 1 <?php 2 if ( ! defined( 'ABSPATH' )) exit; // Exit if accessed directly2 if (!defined('ABSPATH')) exit; // Exit if accessed directly 3 3 4 4 /** 5 5 * Register a custom menu page. 6 6 */ 7 function fra_faceid_admin_menu() { 7 function fra_faceid_admin_menu() 8 { 8 9 include FRA_FACEID_INC_DIR . 'admin_menu_page.php'; 9 10 } 10 11 11 function fra_faceid_load_assets() { 12 function fra_faceid_load_assets() 13 { 12 14 13 // بررسی اینکه آیا jQuery قبلاً بارگذاری شده است یا نه 14 if ( ! wp_script_is( 'jquery', 'enqueued' )) {15 16 if (!wp_script_is('jquery', 'enqueued')) { 15 17 wp_enqueue_script('jquery'); 16 18 } 17 19 18 // بارگذاری اسکریپتهای افزونه19 20 wp_enqueue_script('sweetalert.min.js', FRA_FACEID_JS . 'sweetalert.min.js', array(), '2.1.2', true); 20 21 wp_enqueue_script('bootstrap.min.js', FRA_FACEID_JS . 'bootstrap.min.js', array('jquery'), '5.3.3', true); … … 22 23 wp_enqueue_script('main.js', FRA_FACEID_JS . 'main.js', array('jquery', 'webcam.min.js'), '1.0.25', true); 23 24 24 // بارگذاری استایلها 25 25 26 wp_enqueue_style('fra-bootstrap', FRA_FACEID_CSS . 'bootstrap.min.css', array(), '5.3.3', 'all'); 26 // بررسی بارگذاری استایلهای دیگه که ممکنه توسط قالبها بارگذاری بشن 27 if ( ! wp_style_is( 'fra-bootstrap', 'enqueued' )) {27 28 if (!wp_style_is('fra-bootstrap', 'enqueued')) { 28 29 wp_enqueue_style('fra-bootstrap', FRA_FACEID_CSS . 'bootstrap.min.css', array(), '5.3.3', 'all'); 29 30 } … … 33 34 * Register custom menu in the WordPress admin panel. 34 35 */ 35 function fra_faceid_register_my_custom_menu_page() { 36 function fra_faceid_register_my_custom_menu_page() 37 { 36 38 add_menu_page( 37 39 __('Facial Recognition', 'facial-recognition-authentication'), … … 47 49 48 50 add_action('admin_menu', 'fra_faceid_register_my_custom_menu_page'); 51 52 53 function disable_admin_notices_on_plugin_page() 54 { 55 if (isset($_GET['page']) && $_GET['page'] === 'face-capture-register') { 56 remove_all_actions('admin_notices'); 57 } 58 } 59 60 add_action('admin_init', 'disable_admin_notices_on_plugin_page'); -
facial-recognition-authentication/trunk/inc/frontend.php
r3239964 r3242754 4 4 5 5 // Function to load assets for the frontend 6 function fra_faceid_load_assets() { 6 function fra_faceid_load_assets() 7 { 7 8 8 9 wp_enqueue_script('jquery'); … … 22 23 )); 23 24 } 25 24 26 add_action('login_enqueue_scripts', 'fra_faceid_load_assets'); 25 27 26 28 // Function to include custom login page 27 function fra_faceid_login() { 29 function fra_faceid_login() 30 { 28 31 status_header(200); 29 32 include FRA_FACEID_INC_DIR . 'admin_menu_page2.php'; // Ensure the file exists in the correct path … … 32 35 33 36 // Function to handle the login action 34 function fra_faceid_handle_login() { 37 function fra_faceid_handle_login() 38 { 35 39 if (!headers_sent()) { 36 40 fra_faceid_login(); -
facial-recognition-authentication/trunk/readme.txt
r3241680 r3242754 5 5 Tested up to: 6.7 6 6 Requires PHP: 7.4 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 68 68 69 69 == Changelog == 70 = 1.0.2 = 71 * Disabled admin notices on plugin page to improve user experience. 72 * Fixed minor bugs and improved performance. 70 73 71 74 = 1.0.1 =
Note: See TracChangeset
for help on using the changeset viewer.