PluginProbe ʕ •ᴥ•ʔ
Kirki – Freeform Page Builder, Website Builder & Customizer / 6.3.0
Kirki – Freeform Page Builder, Website Builder & Customizer v6.3.0
6.3.0 6.2.5 6.2.4 6.2.3 6.2.2 6.2.1 6.2.0 6.1.1 6.1.0 6.0.14 6.0.13 6.0.12 6.0.11 6.0.10 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.19 4.0.20 4.0.21 4.0.22 4.0.23 4.0.24 4.1 4.2.0 5.0.0 5.1.0 5.1.1 5.2.0 5.2.1 5.2.2 5.2.3 6.0.0 trunk 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.1.0 3.1.1 3.1.2
kirki / includes / Ajax / Walkthrough.php
kirki / includes / Ajax Last commit date
Collaboration 1 month ago Apps.php 3 days ago Collection.php 2 months ago Comments.php 4 months ago DynamicContent.php 1 month ago ExportImport.php 2 weeks ago Form.php 2 months ago Media.php 3 days ago Page.php 1 month ago PageSettings.php 2 months ago RBAC.php 2 months ago Symbol.php 3 days ago Taxonomy.php 4 months ago TemplateExportImport.php 2 weeks ago UserData.php 2 months ago Users.php 3 weeks ago Walkthrough.php 1 month ago WordpressData.php 4 months ago WpAdmin.php 1 month ago
Walkthrough.php
59 lines
1 <?php
2 /**
3 * Walkthrough or onboarding
4 *
5 * @package kirki
6 */
7
8 namespace Kirki\Ajax;
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit; // Exit if accessed directly.
12 }
13 use Kirki\HelperFunctions;
14
15
16 /**
17 * Walkthrough API Class
18 */
19 class Walkthrough {
20
21 /**
22 * Get walkthrough state
23 *
24 * @return void wp_send_json.
25 * @deprecated
26 * @see \Kirki\App\Http\Controllers\Api\UserController::get_walkthrough_state()
27 */
28 public static function get_walkthrough_state() {
29 $user_id = get_current_user_id();
30 $user_meta = get_user_meta( $user_id, KIRKI_USER_WALKTHROUGH_SHOWN_META_KEY, true );
31
32 if ( $user_meta ) {
33 wp_send_json( true );
34 } else {
35 wp_send_json( false );
36 }
37
38 die();
39 }
40
41 /**
42 * Set walkthrough state
43 *
44 * @return void wp_send_json.
45 * @deprecated
46 * @see \Kirki\App\Http\Controllers\Api\UserController::set_walkthrough_state()
47 */
48 public static function set_walkthrough_state() {
49 //phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
50 $walkthrough_state = HelperFunctions::sanitize_text( isset( $_POST['walkthrough-shown-state'] ) ? $_POST['walkthrough-shown-state'] : null );
51 $user_id = get_current_user_id();
52 update_user_meta( $user_id, KIRKI_USER_WALKTHROUGH_SHOWN_META_KEY, $walkthrough_state );
53
54 wp_send_json( true );
55
56 die();
57 }
58 }
59