Use the js_sniffs.xml ruleset to run all these sniffs, eg phpcs -v --standard=js_sniffs.xml
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = array( |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
ariColor
is a PHP library that will hopefully help WordPress theme developers do their job easier and more effectively.
It does not provide you with methods like lighten()
, darken()
etc. Instead, what it does is give you the ability to create these yourself with extreme ease by giving you all the properties of a color at hand, and allowing you to manipulate them however you see fit.
Example:
First, let's create our color object:
$color = ariColor::newColor( '#049CBE', 'hex' );
<?php | |
/** | |
* Elementor: Force posts per page number for posts widget on Category Pages | |
* | |
* @param $query | |
*/ | |
function elementor_category_posts_per_page( $query ) { | |
$category_id_or_slug = 'myslug'; |
<?php | |
/** | |
* Load Elementor styles on all pages in the head to avoid CSS files being loaded in the footer | |
*/ | |
function elementor_css_in_head(){ | |
if(class_exists('\Elementor\Plugin')){ | |
$elementor = \Elementor\Plugin::instance(); | |
$elementor->frontend->enqueue_styles(); | |
} | |
if(class_exists('\ElementorPro\Plugin')){ |