digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Website and Server Troubleshooting (https://www.digitalfaq.com/forum/web-tech/)
-   -   Secure WordPress plugin updated for WordPress 3.4.2+ [DOWNLOAD] (https://www.digitalfaq.com/forum/web-tech/4609-secure-wordpress-plugin.html)

kpmedia 09-26-2012 06:50 PM

Secure WordPress plugin updated for WordPress 3.4.2+ [DOWNLOAD]
 
1 Attachment(s)
Secure WordPress Update:

A lot of popular WordPress plugins have not been properly updated for several years now, and contain deprecated code. While the plugin may seem "fine" when its activated in wp-admin, deprecated code often means that it's not functioning properly. This tends to only be noticed when you enable debug mode in the wp-config.php file.

Admin Favicon gives the following error when activated:
Code:

Notice: add_contextual_help is deprecated since version 3.3! Use  get_current_screen()->add_help_tab() instead. in  X:\...\wp-includes\functions.php on line 2638
... and once that error is addressed, subsequent errors will follow:
Code:

Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in X:\...\wp-includes\functions.php on line 2722
Where to Download ?

You can either download our ready-to-use files...

How / Where to Download the Files?
You'll find the attached file downloads at the bottom of this top post. Files are provided for the convenience of our members. To get download access, simply join the forum as either a Free Member or Premium Member. We don't send spam or sell your email addresses. If you're not sure what to do with .zip or .rar files, see this help post.


What Was Changed ?

... or you can make the edits yourself.

Line 535 of secure-wordpress.php contains deprecated code add_contextual_help():
Code:

if ( version_compare( $wp_version, '2.7alpha', '>' ) && function_exists('add_contextual_help') ) {
It needs to be changed to add_help_tab():
Code:

if ( version_compare( $wp_version, '2.7alpha', '>' ) &&  function_exists('get_current_screen->add_help_tab') ) {
Also in secure-wordpress.php, line 540 refers to user level 9:
Code:

else { add_submenu_page( 'options-general.php', __('Secure WP', FB_SWP_TEXTDOMAIN), $menutitle, 9, basename(__FILE__), array(&$this, 'display_page') ); }
It needs to be changed to reflect an admin capability like activate_plugins():
Code:

else { add_submenu_page( 'options-general.php', __('Secure WP', FB_SWP_TEXTDOMAIN), $menutitle, "activate_plugins", basename(__FILE__), array(&$this, 'display_page') ); }
And that's it. [x2x]

______________


Need a good web host? — Read our 2018 Review of the Best Web Hosts
Quite often, problems with web sites are caused by having a rotten web host. Worse yet, many hosts try to blame you (the customer) for the problems! So dump that lousy company. Say goodbye to slow sites, unresponsive support techs, and downtime. Find yourself a new host today. Whether you need shared, reseller, VPS, semi-dedicated, cloud, or dedicated hosting, something on our list should be a good upgrade for you.



All times are GMT -5. The time now is 08:50 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.