This file contains hidden or 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
// original from:https://codepen.io/mdd/pen/wGRqbw | |
// Reducer | |
const counter = (state = 0, actions) => { | |
switch (actions.type) { | |
case 'INCREMENT': return state + 1; | |
case 'DECREMENT': return state - 1; | |
default: return state | |
} | |
} |
This file contains hidden or 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
<!-- save to ~/Library/Application Support/Sublime Text 3/Packages/User --> | |
<snippet> | |
<content><![CDATA[console.log({ $1 })]]></content> | |
<tabTrigger>con</tabTrigger> | |
<description>console.log</description> | |
</snippet> |
This file contains hidden or 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_action( 'save_post', 'custom_featured_image_size', 10, 2 ); | |
function custom_featured_image_size( $post_id, $post ) { | |
$image_size_name = 'my-custom-image-size'; | |
$cpt = 'my-cpt'; | |
$width = 1600; | |
$height = 1600; | |
$crop = false; | |
// Only for my CPT. |
OlderNewer