PluginProbe
The WP Remote WordPress Plugin / 4.84
The WP Remote WordPress Plugin v4.84
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | wp_admin.php +21 -70 5.654.84 View file →
@@ -51,16 +51,14 @@
51 51 }
52 52 if ($this->bvinfo->isActivateRedirectSet()) {
53 53 $this->settings->updateOption($this->bvinfo->plug_redirect, 'no');
54 54 ##ACTIVATEREDIRECTCODE##
55 - if (!wp_doing_ajax()) {
56 - wp_redirect($this->mainUrl());
57 - }
55 + wp_redirect($this->mainUrl());
58 56 }
59 57 }
60 58
61 59 public function wprsecAdminMenu($hook) {
62 - if ($hook === 'toplevel_page_wpremote' || WPRHelper::safePregMatch("/wpr_add_account$/", $hook) || WPRHelper::safePregMatch("/wpr_account_details$/", $hook)) {
60 + if ($hook === 'toplevel_page_wpremote' || preg_match("/wpr_add_account$/", $hook) || preg_match("/wpr_account_details$/", $hook)) {
63 61 wp_enqueue_style( 'bootstrap', plugins_url('css/bootstrap.min.css', __FILE__));
64 62 wp_enqueue_style( 'bvplugin', plugins_url('css/bvplugin.min.css', __FILE__));
65 63 }
66 64 }
@@ -65,10 +63,10 @@
65 63 }
66 64 }
67 65
68 66 public function menu() {
69 - $brand = $this->bvinfo->getPluginWhitelabelInfo();
70 - if (!array_key_exists('hide', $brand) && !array_key_exists('hide_from_menu', $brand)) {
67 + $brand = $this->bvinfo->getBrandInfo();
68 + if (!is_array($brand) || (!array_key_exists('hide', $brand) && !array_key_exists('hide_from_menu', $brand))) {
71 69 $bname = $this->bvinfo->getBrandName();
72 70 $icon = $this->bvinfo->getBrandIcon();
73 71 add_menu_page($bname, $bname, 'manage_options', $this->bvinfo->plugname,
74 72 array($this, 'adminPage'), plugins_url($icon, __FILE__ ));
@@ -74,29 +72,13 @@
74 72 array($this, 'adminPage'), plugins_url($icon, __FILE__ ));
75 73 }
76 74 }
77 75
78 - public function hidePluginUpdate($plugins) {
79 - if (!$this->bvinfo->canWhiteLabel()) {
80 - return $plugins;
81 - }
82 - $whitelabel_infos = $this->bvinfo->getPluginsWhitelabelInfos();
83 - foreach ($whitelabel_infos as $slug => $brand) {
84 - if ($this->bvinfo->canWhiteLabel($slug) && isset($plugins->response[$slug]) && is_array($brand)) {
85 - if (array_key_exists('hide_from_menu', $brand) || array_key_exists('hide', $brand)) {
86 - unset($plugins->response[$slug]);
87 - }
88 - }
89 - }
90 - return $plugins;
91 - }
76 + public function hidePluginDetails($plugin_metas, $slug) {
77 + $brand = $this->bvinfo->getBrandInfo();
78 + $bvslug = $this->bvinfo->slug;
92 79
93 - public function hidePluginDetails($plugin_metas, $slug) {
94 - if (!is_array($plugin_metas) || !$this->bvinfo->canWhiteLabel($slug)) {
95 - return $plugin_metas;
96 - }
97 - $whitelabel_info = $this->bvinfo->getPluginWhitelabelInfo($slug);
98 - if (array_key_exists('hide_plugin_details', $whitelabel_info)) {
80 + if ($slug === $bvslug && is_array($brand) && array_key_exists('hide_plugin_details', $brand)){
99 81 foreach ($plugin_metas as $pluginKey => $pluginValue) {
100 82 if (strpos($pluginValue, sprintf('>%s<', translate('View details')))) {
101 83 unset($plugin_metas[$pluginKey]);
102 84 break;
@@ -105,44 +87,13 @@
105 87 }
106 88 return $plugin_metas;
107 89 }
108 90
109 - public function handlePluginHealthInfo($plugins) {
110 - if (!isset($plugins["wp-plugins-active"]) ||
111 - !isset($plugins["wp-plugins-active"]["fields"]) || !$this->bvinfo->canWhiteLabel()) {
112 - return $plugins;
113 - }
114 -
115 - $whitelabel_infos_by_title = $this->bvinfo->getPluginsWhitelabelInfoByTitle();
116 -
117 - foreach ($whitelabel_infos_by_title as $title => $brand) {
118 - if (is_array($brand) && array_key_exists('slug', $brand) && $this->bvinfo->canWhiteLabel($brand["slug"])) {
119 - if (array_key_exists('hide', $brand)) {
120 - unset($plugins["wp-plugins-active"]["fields"][$title]);
121 - } else {
122 - $plugin = $plugins["wp-plugins-active"]["fields"][$title];
123 - $author = $brand['default_author'];
124 - if (array_key_exists('name', $brand)) {
125 - $plugin["label"] = $brand['name'];
126 - }
127 - if (array_key_exists('author', $brand)) {
128 - $plugin["value"] = str_replace($author, $brand['author'], $plugin["value"]);
129 - }
130 - if (array_key_exists('description', $brand)) {
131 - $plugin["debug"] = str_replace($author, $brand['author'], $plugin["debug"]);
132 - }
133 - $plugins["wp-plugins-active"]["fields"][$title] = $plugin;
134 - }
135 - }
136 - }
137 - return $plugins;
138 - }
139 -
140 91 public function settingsLink($links, $file) {
141 92 #XNOTE: Fix this
142 93 if ( $file == plugin_basename( dirname(__FILE__).'/blogvault.php' ) ) {
143 - $brand = $this->bvinfo->getPluginWhitelabelInfo();
144 - if (!array_key_exists('hide_plugin_details', $brand)) {
94 + $brand = $this->bvinfo->getBrandInfo();
95 + if (!$brand || !array_key_exists('hide_plugin_details', $brand)) {
145 96 $links[] = '<a href="'.$this->mainUrl().'">'.__( 'Settings' ).'</a>';
146 97 }
147 98 }
148 99 return $links;
@@ -148,10 +99,10 @@
148 99 return $links;
149 100 }
150 101
151 102 public function getPluginLogo() {
152 - $brand = $this->bvinfo->getPluginWhitelabelInfo();
153 - if (array_key_exists('logo', $brand)) {
103 + $brand = $this->bvinfo->getBrandInfo();
104 + if ($brand && array_key_exists('logo', $brand)) {
154 105 return $brand['logo'];
155 106 }
156 107 return $this->bvinfo->logo;
157 108 }
@@ -156,10 +107,10 @@
156 107 return $this->bvinfo->logo;
157 108 }
158 109
159 110 public function getWebPage() {
160 - $brand = $this->bvinfo->getPluginWhitelabelInfo();
161 - if (array_key_exists('webpage', $brand)) {
111 + $brand = $this->bvinfo->getBrandInfo();
112 + if ($brand && array_key_exists('webpage', $brand)) {
162 113 return $brand['webpage'];
163 114 }
164 115 return $this->bvinfo->webpage;
165 116 }
@@ -221,17 +172,17 @@
221 172 $this->showAddAccountPage();
222 173 }
223 174 }
224 175
225 - public function initWhitelabel($plugins) {
226 - if (!is_array($plugins) || !$this->bvinfo->canWhiteLabel()) {
176 + public function initBranding($plugins) {
177 + $slug = $this->bvinfo->slug;
178 +
179 + if (!is_array($plugins) || !isset($slug, $plugins)) {
227 180 return $plugins;
228 181 }
229 - $whitelabel_infos = $this->bvinfo->getPluginsWhitelabelInfos();
230 - foreach ($whitelabel_infos as $slug => $brand) {
231 - if (!isset($slug) || !$this->bvinfo->canWhiteLabel($slug) || !array_key_exists($slug, $plugins) || !is_array($brand)) {
232 - continue;
233 - }
182 +
183 + $brand = $this->bvinfo->getBrandInfo();
184 + if (is_array($brand)) {
234 185 if (array_key_exists('hide', $brand)) {
235 186 unset($plugins[$slug]);
236 187 } else {
237 188 if (array_key_exists('name', $brand)) {