Is there a way for a plugin to add an attribute to the tag of a theme?

You can probably use the language_attributes filter (from the language_attributes() function) to add it. It should receive an output like lang=”en” and you can add to it before printing to the <html> tag: add_filter( ‘language_attributes’, function( $attr ) { return “{$attr} manifest=\”manifest.appcache\””; } ); or without a anonymous function add_filter( ‘language_attributes’, ‘wpse140730_add_manifest_to_language_attributes’ ); function wpse140730_add_manifest_to_language_attributes($output) … Read more

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

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 add multiple custom URL variables?

I pretty sure this filter lets you add an array of variables. I’ve not tested this: function add_custom_query_vars( $vars ){ $vars[] = “variable1”; $vars[] = “variable2”; $vars[] = “variable3”; //… etc return $vars; } add_filter( ‘query_vars’, ‘add_custom_query_vars’ ); Or another way of doing it would be to do this: function add_custom_query_vars( $vars ){ array_push($vars, “variable1”, … Read more

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