PluginProbe ʕ •ᴥ•ʔ
Kirki – Freeform Page Builder, Website Builder & Customizer / 6.1.1
Kirki – Freeform Page Builder, Website Builder & Customizer v6.1.1
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 2 weeks ago Apps.php 2 weeks ago Collection.php 1 month ago Comments.php 2 months ago DynamicContent.php 1 month ago ExportImport.php 2 days ago Form.php 2 weeks ago Media.php 2 days ago Page.php 2 days ago PageSettings.php 2 weeks ago RBAC.php 2 weeks ago Symbol.php 2 weeks ago Taxonomy.php 2 months ago TemplateExportImport.php 2 months ago UserData.php 2 weeks ago Users.php 2 months ago Walkthrough.php 2 months ago WordpressData.php 2 months ago WpAdmin.php 2 days ago
Walkthrough.php
55 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 */
26 public static function get_walkthrough_state() {
27 $user_id = get_current_user_id();
28 $user_meta = get_user_meta( $user_id, KIRKI_USER_WALKTHROUGH_SHOWN_META_KEY, true );
29
30 if ( $user_meta ) {
31 wp_send_json( true );
32 } else {
33 wp_send_json( false );
34 }
35
36 die();
37 }
38
39 /**
40 * Set walkthrough state
41 *
42 * @return void wp_send_json.
43 */
44 public static function set_walkthrough_state() {
45 //phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.MissingUnslash,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
46 $walkthrough_state = HelperFunctions::sanitize_text( isset( $_POST['walkthrough-shown-state'] ) ? $_POST['walkthrough-shown-state'] : null );
47 $user_id = get_current_user_id();
48 update_user_meta( $user_id, KIRKI_USER_WALKTHROUGH_SHOWN_META_KEY, $walkthrough_state );
49
50 wp_send_json( true );
51
52 die();
53 }
54 }
55