This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global wp */ | |
const { | |
data: { | |
dispatch, | |
}, | |
plugins: { | |
registerPlugin, | |
}, | |
} = wp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add aria-hidden="true" and focusable="false" (due to an IE bug) instead of (or in addition to) setting a negative tabindex. | |
<svg tabindex="-1" viewBox="0 0 512 512" aria-hidden="true" focusable="false"> | |
<path d=""> | |
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add custom icon to social media support. | |
* | |
* @param array $social_icons array of social icons. | |
* @return array new social icons array. | |
*/ | |
function add_social_icon( $social_icons ) { | |
$custom_icons = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Delete Career transient on post save. | |
* | |
* @since 1.0.0 | |
* @author jomurgel | |
*/ | |
function _delete_default_blog_post_transient() { | |
delete_transient( 'default_blog_posts' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//-------------------------------------------------------------- | |
//! sanitize.css v8.0.0 | |
// CC0 License | |
// github.com/csstools/sanitize.css | |
//-------------------------------------------------------------- | |
// sass-lint:disable property-sort-order, indentation, property-units, no-duplicate-properties | |
//----------------------------------------- | |
// Colors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Custom post types and/or taxonomies. | |
* | |
* @package Acorn Theme | |
*/ | |
/** | |
* Register Custom Post Types | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------- | |
// Breakpoints | |
//----------------------------------------- | |
$desktop: 1440px; | |
$tablet: 960px; | |
$mobile: 600px; | |
//----------------------------------------- | |
// Media Query Mixin | |
//----------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Redirect all HTTP and www to HTTPS | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const array1 = [1, 2, 3, 4, 5]; | |
const array2 = [1]; | |
// Return all but similariy. | |
array1.filter( item => array2.every( item2 => item2.id !== item.id ) ); // Returns [2, 3, 4, 5] | |
// Return similarity. | |
array1.filter( item => array2.every( item2 => item2.id === item.id ) ); // Returns [1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove all but similariy. | |
array1.filter( item => array2.every( item2 => item2.id !== item.id ) ); | |
// REmove similarity. | |
array1.filter( item => array2.every( item2 => item2.id === item.id ) ); |