PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.2.4
Adminify – White Label, Admin Menu Editor, Login Customizer v4.2.4
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 4.1.17 All 164 releases
← All changes | Inc/Admin/Frames/Init.php +3 -21 4.3.04.2.4 View file →
@@ -32,38 +32,20 @@
32 32
33 33 public function __construct()
34 34 {
35 35
36 - if ( ! Utils::is_admin_page_request() ) {
37 - return;
38 - }
39 -
40 36 if ( ! $this->is_allowed() ) {
41 - if ( Utils::is_iframe() || ! Utils::has_fetch_metadata() ) {
37 + if ( Utils::is_iframe() ) {
42 38 $http_host = isset($_SERVER['HTTP_HOST']) ? sanitize_text_field(wp_unslash($_SERVER['HTTP_HOST'])) : '';
43 39 $request_uri = isset($_SERVER['REQUEST_URI']) ? esc_url_raw(wp_unslash($_SERVER['REQUEST_URI'])) : '';
44 40 $scheme = empty($_SERVER['HTTPS']) ? 'http' : 'https';
45 41 $actual_link = $scheme . '://' . $http_host . $request_uri;
46 -
47 - if ( Utils::is_iframe() ) {
48 - Frames::custom_plugin_change_reload($actual_link);
49 - } else {
50 - // No Fetch Metadata to go by - let the browser decide
51 - // whether this really is the Adminify iframe.
52 - Frames::maybe_break_out_of_frame($actual_link);
53 - }
42 + Frames::custom_plugin_change_reload($actual_link);
54 43 }
55 44 return;
56 45 }
57 46
58 - // Without Fetch Metadata a POST is treated as coming from the frame:
59 - // the shell template prints during `admin_init`, so rendering it for a
60 - // form submission sends output before WordPress can redirect and the
61 - // request dead-ends on a blank page. Submissions in a running Adminify
62 - // UI always originate inside the iframe anyway.
63 - $is_frame = Utils::is_iframe() || ( ! Utils::has_fetch_metadata() && ! Utils::is_get_request() );
64 -
65 - if ( $is_frame ) {
47 + if ( Utils::is_iframe() ) {
66 48 $this->frame = new Frames();
67 49 } else {
68 50 $this->admin = new Admin();
69 51 }