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) {
return $output . ' manifest="manifest.appcache"';
}
Related Posts:
- When to use Exceptions vs Error Objects vs just plain false/null
- Uninstalling a plugin: delete all options with specific prefix
- Detect a focus on wp_editor
- Display a text message if the shortcode is not found?
- How to use a frontend URL with a Plugin
- Utilize WP-CLI from inside WordPress, not SSH
- Why is PHP Cookie via plugin only set when logged in as Admin and not regular users? and other questions
- Disable External Pingacks on WordPress Posts and Only Allow ‘Self Pings’
- Loading page template into shortcode
- Using wp_get_image_editor in a standalone script
- Continue execution after WP REST API response
- WordPress Ajax Custom Query – High CPU LOAD
- allow users to publish without admin approval
- action hook wp_head higher priority as all other plugins/hooks
- How to call function at the bottom of post using plugin?
- Do my defines need to be unique?
- What does $wpdb->get_row return?
- WP add_action factory
- woocommerce subscriptions – get expiration date [closed]
- Delete a WordPress transient from a shortcode on Page/Post update
- Plugin CSS not enqueing
- Swapping wp_dropdown_categories function with wp_category_checklist
- How to show phpinfo() only in a new tab?
- How can I remove a function that has been added to wordpress with add_filter?
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- How to use $_GET function WordPress backend
- How to call plugin function per site in a multisite?
- How wp-cron can run in background if PHP is single threaded?
- Options API get_option() and update_option() Not Correctly Updating or Returning
- wp_head function not outputting
- How to make own crop image function for WordPress plugin
- How can I hide that I Use WordPress (with W3 Total Cache)
- Saving plugin settings – ERROR: options page not found
- class_exists returns different values [closed]
- Custom array from a query only write the last row of the query
- wp_insert_post: array only. wp_update_post: array|object (?)
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Building a REST API for your web app exposes primary keys of DB records?
- Custom meta box values are not getting saved for my custom post type
- Can’t upload CSV file to plugin directory using custom upload form in admin panel
- Validate and Sanitize WP REST API Request using WP JSON Schema?
- Custom Registration username_exists / email_exists
- How can I search all plugins for composer’s vendor/autoload.php?
- Action Hook Inside WordPress Plugin Shortcode
- Can I remove or edit an include() from a function with a filter?
- Call to undefined function error in plugin
- How do I make this Metabox show current DB value?
- Submit form to db
- Get category id when SEO URL is turned on
- Add a custom WooCommerce settings tab with sections
- PHP using external anonymous function inside class
- How to extend SelectControl with data from my theme
- Add Pre-Defined Value to Click Counter in WordPress
- How can i avoid duplicate same post in wp?
- Drop down question
- How do I disable cache for a certain page?
- code that I can run, or a plug in to show what sql tables something pulls information from
- Automatic email message after manual user approval
- How to check if plugin update process completed in wordpress?
- custom mailchimp form using HTTP API
- How to override theme’s public static function inside of a trait?
- pass datetime using wp_localize_script to frontend from settings page
- add custom metabox to media library custom widget
- using filter and hook inside class
- Display attached images of a page or post that are insetred using gallery
- overwrite wordpress gallery with custom gallery shortcode
- Enqueue sripts and styles only if function is called
- Add widget area from visual editor
- Register/enqueue scripts only on certain admin pages
- Looping through custom data in a custom table to display all items in a post
- Priority call methods – PHPMailer->addAddress(NULL)
- not able to access $_POST on backend profile update
- Add Admin Option w/ Anonymous Function
- Custom Plugin Develoment, Form Action
- WordPress Query Crashes Browser
- How to send logs to plugin owner for a plugin?
- How to Request a User to Register on Landing at a Site, Then Automatically Delete the Users Password on Logout?
- Plugin Modification Change Functionality For Logged User Only
- How to use foreach and if statement within array of arrays?
- INCOMING: Wall of code for form and $_POST, not updating custom field’s value
- add shortcode heading showing multiple time
- WP multisite network plugin fails to see classes loaded with spl autoload
- AJAX & PHP | Call a specific PHP function from a PHP file via AJAX?
- What is this mark for “? function()” [closed]
- How to edit the default database of WordPress [closed]
- Cookie not created in AJAX request
- using a shortcode in a hyperlink
- How to automatically convert images to WebP on WordPress?
- Check user last login date
- Transate plugin with js & wp_localize_script
- WP Custom tables query
- Import js variables loaded via wp_localize_script() into js module without global scope connection
- Custom taxonomy with page post type – WordPress
- Query posts by custom taxonomy slug in WP REST API?
- oneOf JSON Schema validation not properly working for custom post meta value?
- Too few arguments at registering new templates in my plugin
- I want to lists posts in wordpress to nearest location entered by the user
- Displaying custom meta box value in a custom post page
- how to check elementor is widget is active or loaded
- Create a custom plugin with dynamic child pages listing database records