PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 2.0.3
Adminify – White Label, Admin Menu Editor, Login Customizer v2.0.3
4.3.2 4.3.1 4.3.0 4.2.26 4.2.25 4.2.24 4.2.23 4.2.22 4.2.21 4.2.20 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 All 165 releases
adminify / Inc / Modules / ActivityLogs / Hooks / WP_Adminify_Logs_Options.php

WP_Adminify_Logs_Options.php in Adminify – White Label, Admin Menu Editor, Login Customizer 2.0.3, at Inc/Modules/ActivityLogs/Hooks/WP_Adminify_Logs_Options.php

109 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPAdminify\Inc\Modules\ActivityLogs\Hooks;
4
5 use WPAdminify\Inc\Modules\ActivityLogs\Inc\Hooks_Base;
6
7 // no direct access allowed
8 if (!defined('ABSPATH')) exit;
9
10 class WP_Adminify_Logs_Options extends Hooks_Base
11 {
12 public function __construct()
13 {
14 parent::__construct();
15 add_action('updated_option', [$this, 'hooks_updated_option'], 10, 3);
16 }
17
18 public function hooks_updated_option($option, $oldvalue, $_newvalue)
19 {
20 $whitelist_options = apply_filters('wp_adminify_whitelist_options', array(
21 // General
22 'blogname',
23 'blogdescription',
24 'siteurl',
25 'home',
26 'admin_email',
27 'users_can_register',
28 'default_role',
29 'timezone_string',
30 'date_format',
31 'time_format',
32 'start_of_week',
33
34 // Writing
35 'use_smilies',
36 'use_balanceTags',
37 'default_category',
38 'default_post_format',
39 'mailserver_url',
40 'mailserver_login',
41 'mailserver_pass',
42 'default_email_category',
43 'ping_sites',
44
45 // Reading
46 'show_on_front',
47 'page_on_front',
48 'page_for_posts',
49 'posts_per_page',
50 'posts_per_rss',
51 'rss_use_excerpt',
52 'blog_public',
53
54 // Discussion
55 'default_pingback_flag',
56 'default_ping_status',
57 'default_comment_status',
58 'require_name_email',
59 'comment_registration',
60 'close_comments_for_old_posts',
61 'close_comments_days_old',
62 'thread_comments',
63 'thread_comments_depth',
64 'page_comments',
65 'comments_per_page',
66 'default_comments_page',
67 'comment_order',
68 'comments_notify',
69 'moderation_notify',
70 'comment_moderation',
71 'comment_whitelist',
72 'comment_max_links',
73 'moderation_keys',
74 'blacklist_keys',
75 'show_avatars',
76 'avatar_rating',
77 'avatar_default',
78
79 // Media
80 'thumbnail_size_w',
81 'thumbnail_size_h',
82 'thumbnail_crop',
83 'medium_size_w',
84 'medium_size_h',
85 'large_size_w',
86 'large_size_h',
87 'uploads_use_yearmonth_folders',
88
89 // Permalinks
90 'permalink_structure',
91 'category_base',
92 'tag_base',
93
94 // Widgets
95 'sidebars_widgets',
96 ));
97
98 if (!in_array($option, $whitelist_options))
99 return;
100
101 // TODO: need to think about save old & new values.
102 adminify_activity_logs(array(
103 'action' => 'updated',
104 'object_type' => 'Options',
105 'object_name' => $option,
106 ));
107 }
108 }
109