PluginProbe
The WP Remote WordPress Plugin / 4.74
The WP Remote WordPress Plugin v4.74
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 +37 -85 5.724.74 View file →
@@ -37,9 +37,9 @@
37 37
38 38 if (array_key_exists('bvnonce', $_REQUEST) &&
39 39 wp_verify_nonce($_REQUEST['bvnonce'], "bvnonce") &&
40 40 array_key_exists('blogvaultkey', $_REQUEST) &&
41 - (strlen(WPRAccount::sanitizeKey($_REQUEST['blogvaultkey'])) == 64) &&
41 + (strlen($_REQUEST['blogvaultkey']) == 64) &&
42 42 (array_key_exists('page', $_REQUEST) &&
43 43 $_REQUEST['page'] == $this->bvinfo->plugname)) {
44 44 $keys = str_split($_REQUEST['blogvaultkey'], 32);
45 45 WPRAccount::addAccount($this->settings, $keys[0], $keys[1]);
@@ -51,16 +51,15 @@
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)) {
61 + wp_enqueue_style( 'bvsurface', plugins_url('css/bvmui.min.css', __FILE__));
63 62 wp_enqueue_style( 'bootstrap', plugins_url('css/bootstrap.min.css', __FILE__));
64 63 wp_enqueue_style( 'bvplugin', plugins_url('css/bvplugin.min.css', __FILE__));
65 64 }
66 65 }
@@ -65,10 +64,10 @@
65 64 }
66 65 }
67 66
68 67 public function menu() {
69 - $brand = $this->bvinfo->getPluginWhitelabelInfo();
70 - if (!array_key_exists('hide', $brand) && !array_key_exists('hide_from_menu', $brand)) {
68 + $brand = $this->bvinfo->getBrandInfo();
69 + if (!$brand || (!array_key_exists('hide', $brand) && !array_key_exists('hide_from_menu', $brand))) {
71 70 $bname = $this->bvinfo->getBrandName();
72 71 $icon = $this->bvinfo->getBrandIcon();
73 72 add_menu_page($bname, $bname, 'manage_options', $this->bvinfo->plugname,
74 73 array($this, 'adminPage'), plugins_url($icon, __FILE__ ));
@@ -74,29 +73,13 @@
74 73 array($this, 'adminPage'), plugins_url($icon, __FILE__ ));
75 74 }
76 75 }
77 76
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 - }
77 + public function hidePluginDetails($plugin_metas, $slug) {
78 + $brand = $this->bvinfo->getBrandInfo();
79 + $bvslug = $this->bvinfo->slug;
92 80
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)) {
81 + if ($slug === $bvslug && $brand && array_key_exists('hide_plugin_details', $brand)){
99 82 foreach ($plugin_metas as $pluginKey => $pluginValue) {
100 83 if (strpos($pluginValue, sprintf('>%s<', translate('View details')))) {
101 84 unset($plugin_metas[$pluginKey]);
102 85 break;
@@ -105,44 +88,13 @@
105 88 }
106 89 return $plugin_metas;
107 90 }
108 91
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 92 public function settingsLink($links, $file) {
141 93 #XNOTE: Fix this
142 - if ( $file == plugin_basename( dirname(__FILE__).'/plugin.php' ) ) {
143 - $brand = $this->bvinfo->getPluginWhitelabelInfo();
144 - if (!array_key_exists('hide_plugin_details', $brand)) {
94 + if ( $file == plugin_basename( dirname(__FILE__).'/blogvault.php' ) ) {
95 + $brand = $this->bvinfo->getBrandInfo();
96 + if (!$brand || !array_key_exists('hide_plugin_details', $brand)) {
145 97 $links[] = '<a href="'.$this->mainUrl().'">'.__( 'Settings' ).'</a>';
146 98 }
147 99 }
148 100 return $links;
@@ -148,10 +100,10 @@
148 100 return $links;
149 101 }
150 102
151 103 public function getPluginLogo() {
152 - $brand = $this->bvinfo->getPluginWhitelabelInfo();
153 - if (array_key_exists('logo', $brand)) {
104 + $brand = $this->bvinfo->getBrandInfo();
105 + if ($brand && array_key_exists('logo', $brand)) {
154 106 return $brand['logo'];
155 107 }
156 108 return $this->bvinfo->logo;
157 109 }
@@ -156,10 +108,10 @@
156 108 return $this->bvinfo->logo;
157 109 }
158 110
159 111 public function getWebPage() {
160 - $brand = $this->bvinfo->getPluginWhitelabelInfo();
161 - if (array_key_exists('webpage', $brand)) {
112 + $brand = $this->bvinfo->getBrandInfo();
113 + if ($brand && array_key_exists('webpage', $brand)) {
162 114 return $brand['webpage'];
163 115 }
164 116 return $this->bvinfo->webpage;
165 117 }
@@ -168,20 +120,20 @@
168 120 require_once dirname( __FILE__ ) . '/recover.php';
169 121 $bvnonce = wp_create_nonce("bvnonce");
170 122 $public = WPRAccount::getApiPublicKey($this->settings);
171 123 $secret = WPRRecover::defaultSecret($this->settings);
172 - $tags = "<input type='hidden' name='url' value='".esc_attr($this->siteinfo->wpurl())."'/>\n".
173 - "<input type='hidden' name='homeurl' value='".esc_attr($this->siteinfo->homeurl())."'/>\n".
174 - "<input type='hidden' name='siteurl' value='".esc_attr($this->siteinfo->siteurl())."'/>\n".
175 - "<input type='hidden' name='dbsig' value='".esc_attr($this->siteinfo->dbsig(false))."'/>\n".
176 - "<input type='hidden' name='plug' value='".esc_attr($this->bvinfo->plugname)."'/>\n".
177 - "<input type='hidden' name='adminurl' value='".esc_attr($this->mainUrl())."'/>\n".
178 - "<input type='hidden' name='bvversion' value='".esc_attr($this->bvinfo->version)."'/>\n".
179 - "<input type='hidden' name='serverip' value='".esc_attr($_SERVER["SERVER_ADDR"])."'/>\n".
180 - "<input type='hidden' name='abspath' value='".esc_attr(ABSPATH)."'/>\n".
181 - "<input type='hidden' name='secret' value='".esc_attr($secret)."'/>\n".
182 - "<input type='hidden' name='public' value='".esc_attr($public)."'/>\n".
183 - "<input type='hidden' name='bvnonce' value='".esc_attr($bvnonce)."'/>\n";
124 + $tags = "<input type='hidden' name='url' value='".$this->siteinfo->wpurl()."'/>\n".
125 + "<input type='hidden' name='homeurl' value='".$this->siteinfo->homeurl()."'/>\n".
126 + "<input type='hidden' name='siteurl' value='".$this->siteinfo->siteurl()."'/>\n".
127 + "<input type='hidden' name='dbsig' value='".$this->siteinfo->dbsig(false)."'/>\n".
128 + "<input type='hidden' name='plug' value='".$this->bvinfo->plugname."'/>\n".
129 + "<input type='hidden' name='adminurl' value='".$this->mainUrl()."'/>\n".
130 + "<input type='hidden' name='bvversion' value='".$this->bvinfo->version."'/>\n".
131 + "<input type='hidden' name='serverip' value='".$_SERVER["SERVER_ADDR"]."'/>\n".
132 + "<input type='hidden' name='abspath' value='".ABSPATH."'/>\n".
133 + "<input type='hidden' name='secret' value='".$secret."'/>\n".
134 + "<input type='hidden' name='public' value='".$public."'/>\n".
135 + "<input type='hidden' name='bvnonce' value='".$bvnonce."'/>\n";
184 136 return $tags;
185 137 }
186 138
187 139 public function activateWarning() {
@@ -188,9 +140,9 @@
188 140 global $hook_suffix;
189 141 if (!WPRAccount::isConfigured($this->settings) && $hook_suffix == 'index.php' ) {
190 142 ?>
191 143 <div id="message" class="updated" style="padding: 8px; font-size: 16px; background-color: #dff0d8">
192 - <a class="button-primary" href="<?php echo esc_url($this->mainUrl()); ?>">Activate WPRemote</a>
144 + <a class="button-primary" href="<?php echo $this->mainUrl(); ?>">Activate WPRemote</a>
193 145 &nbsp;&nbsp;&nbsp;<b>Almost Done:</b> Activate your WPRemote account to backup & secure your site.
194 146 </div>
195 147 <?php
196 148 }
@@ -221,17 +173,17 @@
221 173 $this->showAddAccountPage();
222 174 }
223 175 }
224 176
225 - public function initWhitelabel($plugins) {
226 - if (!is_array($plugins) || !$this->bvinfo->canWhiteLabel()) {
177 + public function initBranding($plugins) {
178 + $slug = $this->bvinfo->slug;
179 +
180 + if (!is_array($plugins) || !isset($slug, $plugins)) {
227 181 return $plugins;
228 182 }
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 - }
183 +
184 + $brand = $this->bvinfo->getBrandInfo();
185 + if ($brand) {
234 186 if (array_key_exists('hide', $brand)) {
235 187 unset($plugins[$slug]);
236 188 } else {
237 189 if (array_key_exists('name', $brand)) {