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 { MediaPlaceholder, InspectorControls } = wp.blockEditor; | |
const { Spinner, FocalPointPicker, PanelBody } = wp.components; | |
const { __ } = wp.i18n; | |
import { useMedia } from '../hooks/use-media'; | |
/** | |
* Image Component with Placeholder | |
* | |
* @param {object} props Component Props |
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
0 verbose cli [ | |
0 verbose cli '/Users/peter.sorensen/.nvm/versions/node/v16.9.1/bin/node', | |
0 verbose cli '/Users/peter.sorensen/.nvm/versions/node/v16.9.1/bin/npm', | |
0 verbose cli 'install' | |
0 verbose cli ] | |
1 info using [email protected] | |
2 info using [email protected] | |
3 timing npm:load:whichnode Completed in 0ms | |
4 timing config:load:defaults Completed in 1ms | |
5 timing config:load:file:/Users/peter.sorensen/.nvm/versions/node/v16.9.1/lib/node_modules/npm/npmrc Completed in 1ms |
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
## .circleci/config.yml | |
version: 2.1 | |
executors: | |
node-executor: | |
docker: | |
- image: cimg/node:14.19.0-browsers | |
user: root | |
jobs: | |
release: |
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
> [email protected] build-release /home/circleci/project | |
> npm install && composer install --no-dev -o && lerna run build-release | |
> [email protected] preinstall /home/circleci/project | |
> node -e "if(process.env.npm_execpath.indexOf('yarn') !== -1) throw new Error('Please use NPM for consistency.')" | |
> [email protected] install /home/circleci/project/node_modules/husky |
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
wp post update --post_excerpt='A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring' $(wp post list --post_type=page --format=ids) |
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
{ | |
"post_type": ["post", "sf_press_release", "sf_linked_content"], | |
"tax_query": [{ | |
"taxonomy": "sf_collection", | |
"field": "slug", | |
"terms": "dreamforce-ny-21" | |
}] | |
} |
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
import { TopicPicker } from './topic-picker'; | |
const { createHigherOrderComponent } = wp.compose; | |
const { InspectorControls } = wp.blockEditor; | |
const { PanelBody, PanelRow } = wp.components; | |
const { addFilter } = wp.hooks; | |
const { __ } = wp.i18n; | |
const enableOnBlocks = ['core/query']; |
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
wp.blocks.getBlockTypes().filter((block) => { return block.name.indexOf('jetpack') !== -1 }).map(o => o['name']) | |
// credit https://stackoverflow.com/a/37092497 |
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 | |
/** | |
* Caching a remote response | |
* | |
* Related Tutorial: https://pippinsplugins.com/using-wp_remote_get-to-parse-json-from-remote-apis/ | |
*/ | |
// Psuedo Code to demonstrate overall approach | |
function cached_function() { | |
if ( has_cached_value() ) { |
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
import Select from 'react-select'; | |
const { useSelect } = wp.data; | |
const { __ } = wp.i18n; | |
const TermPicker = (props) => { | |
const { taxonomy, onChange, label, attributes, attribute } = props; | |
const categories = useSelect((select) => select('core').getEntityRecords('taxonomy', taxonomy)); | |
if (categories && categories.length) { |
NewerOlder