PluginProbe ʕ •ᴥ•ʔ
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF / trunk
Robin Image Optimizer – Unlimited Image Optimization, WebP & AVIF vtrunk
2.0.6 2.0.5 trunk 1.3.7 1.4.0 1.4.1 1.4.2 1.4.6 1.5.0 1.5.3 1.5.6 1.5.8 1.6.5 1.6.6 1.6.9 1.7.0 1.7.4 1.8.1 1.8.2 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4
robin-image-optimizer / admin / pages / class-rio-log.php
robin-image-optimizer / admin / pages Last commit date
class-rio-license.php 3 months ago class-rio-log.php 7 months ago class-rio-page.php 7 months ago class-rio-settings.php 7 months ago class-rio-statistic.php 7 months ago index.php 3 years ago
class-rio-log.php
132 lines
1 <?php
2 // Exit if accessed directly
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 /**
8 * Класс отвечает за работу страницы логов.
9 *
10 * @version 1.0
11 */
12 class WRIO_LogPage extends Wbcr_FactoryLogger359_PageBase {
13
14 /**
15 * {@inheritdoc}
16 */
17 public $id = 'rio_logs'; // Уникальный идентификатор страницы
18
19 /**
20 * Hide bottom sidebar - only show on Settings page
21 *
22 * @var bool
23 */
24 public $show_bottom_sidebar = false;
25
26 /**
27 * {@inheritdoc}
28 *
29 * @var string
30 */
31 public $page_parent_page = 'rio_general';
32
33 /**
34 * {@inheritdoc}
35 */
36 public $available_for_multisite = false;
37
38 /**
39 * {@inheritdoc}
40 */
41 public $clearfy_collaboration = false;
42
43 /**
44 *
45 * Whether to show the right sidebar in options.
46 *
47 * @var bool
48 */
49 public $show_right_sidebar_in_options = true;
50
51 /**
52 * Menu target for WordPress admin submenu.
53 *
54 * @var string
55 */
56 public $menu_target = 'rio_general-robin-image-optimizer';
57
58 /**
59 * Use admin.php as base URL instead of menu_target.
60 *
61 * @var bool
62 */
63 public $custom_target = true;
64
65 /**
66 * The page is internal and should not be displayed in the menu.
67 *
68 * @var bool
69 */
70 public $internal = false;
71
72 /**
73 * View instance for rendering templates.
74 *
75 * @since 1.3.0
76 * @var WRIO_Views
77 */
78 protected $view;
79
80 /**
81 * Подменяем пространство имен для меню плагина, если активирован плагин
82 * Меню текущего плагина будет добавлено в общее меню
83 *
84 * @return string
85 */
86 public function getMenuScope() {
87 if ( $this->clearfy_collaboration ) {
88 $this->page_parent_page = 'rio_general';
89
90 return 'wbcr_clearfy';
91 }
92
93 return 'robin-image-optimizer';
94 }
95
96 /**
97 * @param WRIO_Plugin $plugin
98 */
99 public function __construct( WRIO_Plugin $plugin ) {
100 $this->menu_title = __( 'Error Log', 'robin-image-optimizer' );
101 $this->page_menu_short_description = __( 'Plugin debug report', 'robin-image-optimizer' );
102
103 $this->view = WRIO_Views::get_instance( WRIO_PLUGIN_DIR );
104 if ( is_multisite() && defined( 'WCL_PLUGIN_ACTIVE' ) ) {
105 if ( WRIO_Plugin::app()->isNetworkActive() && WCL_Plugin::app()->isNetworkActive() ) {
106 $this->clearfy_collaboration = true;
107 }
108 } elseif ( defined( 'WCL_PLUGIN_ACTIVE' ) ) {
109 $this->clearfy_collaboration = true;
110 }
111
112 parent::__construct( $plugin );
113 }
114
115 /**
116 * {@inheritdoc}
117 *
118 * @return void
119 * @since 1.0.0
120 */
121 public function assets( $scripts, $styles ) {
122 parent::assets( $scripts, $styles );
123 }
124
125 /**
126 * {@inheritdoc}
127 */
128 public function getMenuTitle() {
129 return defined( 'LOADING_ROBIN_IMAGE_OPTIMIZER_AS_ADDON' ) ? __( 'Image optimizer', 'robin-image-optimizer' ) : __( 'Error Log', 'robin-image-optimizer' );
130 }
131 }
132