How to avoid plugin name conflicts from the upgrade notifier?

You can remove you plugin from the updateble list with: add_action( ‘plugins_loaded’, function(){ add_filter( ‘site_transient_update_plugins’, function ( $value ) { if( isset( $value->response[‘google-analytics/google-analytics.php’] ) ) unset( $value->response[‘google-analytics/google-analytics.php’] ); return $value; }); }); Adding this filter will eliminate our homonymous plugin altogether from update checks. And it supposes that we are doing the updates manually via … Read more

Plugin update error message

I know this is kind of a backwards way of doing it, but I suppose if you disable the possibility to upgrade the plugin, then you don’t need to worry about the plugin being overwritten. Change the plugin version number (in the plugins main file comment header) to something ridiculously high so it won’t recommend … Read more

WordPress plugin from own server

All Credit to the following post goes to Abid Omar. The full tutorial can be found on Tuts+: A Guide to the WordPress HTTP API: Automatic Plugin Updates View Plugin On Github The gist is to create a new class which will post an external file ( API ) and return plugin to download if … Read more

How to remove duplicate sub-menu name for top level menu items in a plugin?

If you dont want ‘TopLevel’ menu to represent a custom page you can use: add_menu_page( ‘TopLevel’, ‘TopLevel’, ‘MENU_CAP_LVL’, ‘MENU_SLUG’, ‘MENU_CB’ ); add_submenu_page( ‘MENU_SLUG’, ‘SubMenu’, ‘SubMenu’, ‘MENU_CAP_LVL’, ‘SUB_MENU_SLUG’, ‘SUB_MENU_CB’ ); add_submenu_page( ‘MENU_SLUG’, ‘SubMenu-A’, ‘SubMenu-A’, ‘MENU_CAP_LVL’, ‘SUB_MENU_A_SLUG’, ‘SUB_MENU_A_CB’ ); remove_submenu_page(‘MENU_SLUG’,’MENU_SLUG’); In this way click on “TopMenu” will forward to the 1st “SubMenu” and prevent “TopLevel” from being … Read more

How can I have two different urls for the same page that load two different templates?

You could accomplish this with a rewrite endpoint and a template filter. First, register a new rewrite endpoint for the page post type: function wpd_app_view_rewrite_endpoint() { add_rewrite_endpoint( ‘app-view’, EP_PAGES ); } add_action( ‘init’, ‘wpd_app_view_rewrite_endpoint’ ); Don’t forget to flush rewrite rules after adding this (or just visit the Permalinks > Settings page to do this … Read more

Self Develop or Plugin as first option?

There are several things I consider when making such choice (in no particular order): does task involve general functionality (plugin) or processing my specific content (develop) is there the plugin for the task from known developer and well-maintained (plugin) or there is fractured field of numerous plugins (develop) do I want full range of related … Read more

How to make search engine index PDF files? [closed]

The standard WordPress search is pretty basic and only search the database, there are some plugins that extend the search functionality to search even more parts of the database like: Search Everything Search Unleashed but they do not have the ability to search files. There is one plugin that i know of that claims to … Read more

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.

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