Hide wordpress plugins from list

RE: Excluding plugins from update checks Yes you can exclude plugins from the update checker, there’s no pretty solution, ie. no convenient filter to just say, here exclude these for me, but it can be done, Mark Jaquith did a blog on it a while back(and it is a relatively easy solution). /** * FOR … Read more

How to make sense of the active_plugins option_value to enable and disable certain plugins from the database?

That’s a serialized array. // Serialized: a:8:{i:0;s:21:”adrotate/adrotate.php”;i:1;s:19:”akismet/akismet.php”;i:2;s:33:”better-related/better-related.php”;i:3;s:17:”clicky/clicky.php”;i:4;s:49:”custom-post-permalinks/custom-post-permalinks.php”;i:5;s:32:”disqus-comment-system/disqus.php”;i:6;s:33:”export-to-text/export-to-text.php”;i:7;s:36:”google-sitemap-generator/sitemap.php”;} // dump: var_dump( maybe_unserialize(‘a:8:{i:0;s:21:”adrotate/adrotate.php”;i:1;s:19:”akismet/akismet.php”;i:2;s:33:”better-related/better-related.php”;i:3;s:17:”clicky/clicky.php”;i:4;s:49:”custom-post-permalinks/custom-post-permalinks.php”;i:5;s:32:”disqus-comment-system/disqus.php”;i:6;s:33:”export-to-text/export-to-text.php”;i:7;s:36:”google-sitemap-generator/sitemap.php”;}’) ); // Result array(8) { [0]=> string(21) “adrotate/adrotate.php” [1]=> string(19) “akismet/akismet.php” [2]=> string(33) “better-related/better-related.php” [3]=> string(17) “clicky/clicky.php” [4]=> string(49) “custom-post-permalinks/custom-post-permalinks.php” [5]=> string(32) “disqus-comment-system/disqus.php” [6]=> string(33) “export-to-text/export-to-text.php” [7]=> string(36) “google-sitemap-generator/sitemap.php” } Use maybe_unserialize() or unserialize() to transform it back to an array.

Removing an action from an external plugin class

Maybe I got you wrong, but why don’t you just put the following line in your functions.php: remove_action(‘eazyest_gallery_thumbnails’, ‘ezg_thumbnails’); If you have a class function hooked to an action, you can use the class name instead of the class object: remove_action( ‘eazyest_gallery_thumbnails’, array(‘EazyestFrontendClassName’, ‘ezg_thumbnails’) ); Right now, I don’t see why this wouldn’t be working. … Read more

Output before and after the loop

The function the_post() (source) triggers the action loop_start when it is first used in the loop. This is used in every WP_Query loop, so you may want to check if the current query is the ‘main’ one (assuming that’s the query you wish to target) add_action( ‘loop_start’, ‘wpse107113_loop_start’ ); function wpse107113_loop_start( $query ){ if( $query->is_main_query() … Read more

Why does WordPress still not support SFTP?

WordPress does support making connections using SSH (aka SFTP) via the built in updater system. It got this support in version 2.7, approximately 6 years ago. Reference: https://core.trac.wordpress.org/ticket/7690 If you’re not seeing it in the normal “credentials” screen, then this is because your PHP installation lacks the support necessary for it to be able to … Read more

A better way to override plugin’s JS files?

Extending the above comment: Directly changing the files of the plugin or theme is not a good practice as once the plugin/theme is updated, you will loose the changes. Instead use child theme in case of themes and hook to required actions in case of plugins. In your case since you are only changing the … Read more

Overriding single plugin translation

Here’s an example where a string from a certain text domain is translated using the gettext filter: /** * Translate a certain string from a particular text domain. * * @param string $translation Translated text. * @param string $text Text to translate. * @param string $domain Text domain. Unique identifier for retrieving translated strings. * … Read more

Secure WordPress paid plugin

Option 1 – Process some data on your system I wouldn’t place all of the plug-in’s processing on your own server, but pick one or two vital functions and keep them hosted on your system. Then require an API key for each site that uses the plug-in so that they can communicate with your server. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)