UNIX line endings (\n
) and UTF-8 are just common code standards. As far as I can see, they are not even mentioned in the Coding Standards. Most (all?) core PHP files are just plain US-ASCII. Try to follow that path to keep your files as compatible as possible.
If you use UTF-8, add a line at the start of a PHP file with an Encoding Cookie or file variable:
<?php # -*- coding: utf-8 -*-
Many editors (Emacs, Vim, Sublime, Scite) will use that to set the proper encoding automatically.
I have also seen:
<?php # -*- coding: utf-8-unix -*-
But I am not sure how compatible it is.
Related Posts:
- REQUIRED: Could not find wp_link_pages. See: wp_link_pages by Theme Checker
- Special characters showing in fallback font
- Looking for a lightweight theme using WP3 new tags and features (not 2010) [closed]
- What is the best way to customise admin files so they survive future upgrades?
- Verify nonce in REST API?
- Creating my own Admin Forms in a WordPress CMS?
- Custom taxonomy: same terms, but for different years
- Best practices for A/B testing?
- Editing the Number at the end of Page URLs / Editing Page Slugs
- Automatic image renaming based on title
- Can I use $wpdb for my custom tables in the WordPress database?
- How to get input_attrs in the sanitize function?
- Php custom query function assistance
- Integrating MailChimp newsletters as post
- How can I manage my multiple wordpress websites from main website?
- Comparing two WordPress installations
- Importing media medium setting image gallery / image attachments
- Could not create directory. /var/www/html/wp-content/plugins/PLUGIN_NAME/
- WordPress development using Docker – how to share directories? [closed]
- How can I add a button to quicktags-toolbar?
- How do I copy all “extra” data (menus, widgets, etc) from one theme to another?
- How to add more than one RSS Feed Link for wordpress
- custom session variables being lost in FF [closed]
- How to link external JavaScript files?
- How to create a list of items with fields in WordPress?
- For custom templates, is it better to use `template_include` or `type_template`?
- Create default_content layout template based on post id
- Remove ability to Permanently delete an image from the Media Library
- Filter posts by custom taxonomy terms
- shortcodes – style them or change/remove the square brackets?
- Dynamic title in WordPress homepage
- Fastest way to get the comment and ping total count for a post
- want to create a subcategory.php to manage subcats
- Updates for a private theme
- Hi, I wanted to make custom search with multiple fields
- How to add textarea field to taxonomy (tag)?
- Contact From 7 Custom Validation Issues
- How to add an extra button on woocommerce shop page and use it to send the product info with image in a mail? [closed]
- education system [closed]
- Search widget will search everything in the site, how to limit to only search gallery name
- custom post type – page template
- How to add custom control to a page?
- Navigation label for page in custom theme
- Custom comments list, right depth
- Order posts with a custom field but also without
- How to hook up search results page to a back-end page?
- A truely custom login page?
- How to define custom links in WordPress
- Widgets won’t save
- What is the best way to modify Admin Panel on WordPress?
- Change Notice of Password change email subject?
- Deleting my old WordPress site. – issues
- Add the site’s name as prefix when adding new users? Multisite
- How do I create a root link in wordpress to a PDF file?
- Upload a web module (html and JS) to wordpress
- How to remove Customizer’s Section and move Control straight to Panel using Child Theme
- Centering one product on a single page [closed]
- Remove link from page title
- Creating custom page template
- Which delete query is better with prepare or delete
- How to add page content into another page
- Localhost wordpress access remote db wordpress website
- add_action does not work when instance multiple tab-containers via template-file
- Custom RSS feed – blank page
- Display Images with More Fields yes / no
- How to query term_id of a Custom Taxonomy by name
- Remove Sidebars from page
- accessing monthly archive from dashboard
- WordPress 3.1.2 Bug: add_theme_support() and video post format registering twice
- WordPress 3.1 update has reversed my blog posts
- Different profile page by role
- WordPress menu: How to make www.link.com/#name never contain current_page_item class?
- Change default Video Player without Plugin
- Changing update message from Newspaper child theme
- Custom default settings for WP native Gallery Block
- How to show parent taxonomy using get_the_terms?
- No plugin populate user information in to form
- Best practice to generate token for email action
- how to change the url rediction of the woocommerce login page of the flatsome theme for my own in wordpress?
- My list of terms of custom taxonomy displays 7 times
- Trying to customise 2011 Child Theme Background Colour
- the temporary save folder is wrong
- Can’t do a src to node modules folder
- Can I upload my self hosted WordPress website on GitHub as a project? [closed]
- Need to replace some text string on a title
- Custom roles and capabilities media not work right
- How to customize WordPress vertical menu?
- Query Posts to display all posts with category “custom field value”
- Trouble getting started in wordpress – my experience isn’t in wordpress.
- Redirect Every Instance of The Author Template Pages to Custom Author Pages
- Custom WP deactivate an email activation link sent to user’s email.
- How to setup a taxonomy that can have only one post assigned to it?
- Page template with custom html fields inside a content
- Custom Style per Post, How to Display Custom-Styled Single post on Homepage?
- Twenty Eleven theme, how to change style to a specific “format”
- Multiple Customizers
- How to move menu next to left of the search box?
- how to manage Session in WordPress using custom login?
- Post interior margin in twenty eleven theme
- Where did I put this one line of css?