PluginProbe
Extendify / 3.2.2
Extendify v3.2.2
3.2.2 3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 All 128 releases
← All changes | app/Assist/AdminPage.php +7 -29 0.11.0 → 3.2.2 View file →
@@ -1,5 +1,6 @@
1 1 <?php
2 +
2 3 /**
3 4 * Assist admin page.
4 5 */
5 6
@@ -4,16 +5,16 @@
4 5 */
5 6
6 7 namespace Extendify\Assist;
7 8
8 -use Extendify\Config;
9 +defined('ABSPATH') || die('No direct access.');
9 10
10 11 /**
11 12 * This class handles the Assist admin page.
12 13 */
14 +
13 15 class AdminPage
14 16 {
15 -
16 17 /**
17 18 * The admin page slug
18 19 *
19 20 * @var $string
@@ -37,28 +38,10 @@
37 38 }
38 39 },
39 40 1000
40 41 );
41 -
42 - \add_action(
43 - 'admin_enqueue_scripts',
44 - function () {
45 - // phpcs:ignore WordPress.Security.NonceVerification
46 - if (isset($_GET['page']) && $_GET['page'] === 'extendify-assist') {
47 - // TODO: Remove this dependency.
48 - \wp_enqueue_style(
49 - 'extendify-assist',
50 - EXTENDIFY_URL . 'public/admin-page/welcome.css',
51 - [],
52 - Config::$environment === 'PRODUCTION' ? Config::$version : uniqid()
53 - );
54 - }
55 - }
56 - );
57 42 }
58 43
59 -
60 -
61 44 /**
62 45 * Settings page output
63 46 *
64 47 * @since 1.0.0
@@ -67,17 +50,12 @@
67 50 */
68 51 public function pageContent()
69 52 {
70 53 ?>
71 - <div class="extendify-outer-container">
72 - <div class="wrap" style="max-width:1000px;margin:-16px auto 24px;">
73 - <ul class="extendify-welcome-tabs">
74 - <li class="active"><a href="<?php echo \esc_url(\admin_url('admin.php?page=extendify-assist')); ?>">Assist</a></li>
75 - <li><a href="<?php echo \esc_url(\admin_url('admin.php?page=extendify-welcome')); ?>">Library</a></li>
76 - <li class="cta-button"><a href="<?php echo \esc_url_raw(\get_home_url()); ?>" target="_blank"><?php echo \esc_html(__('View Site', 'extendify')); ?></a></li>
77 - </ul>
78 - <div id="extendify-assist-landing-page" class="extendify-assist"></div>
79 - </div>
54 + <div
55 + id="extendify-assist-landing-page"
56 + class="extendify-assist"
57 + data-test="assist-landing">
80 58 </div>
81 59 <?php
82 60 }
83 61 }