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
find . -name ".DS_Store" -print -delete |
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
find . -name '.DS_Store' -type f -delete |
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
{ | |
"settings": { | |
"color": { | |
"custom": true, | |
"customGradient": false, | |
"gradients": [], | |
"link": false, | |
"palette": [ | |
{ | |
"slug": "emphasis", |
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
function has_reusable_block( $block_name, $id = false ) { | |
$id = (!$id) ? get_the_ID() : $id; | |
if( $id ) { | |
if ( has_block( 'block', $id ) ) { | |
// Check reusable blocks | |
$content = get_post_field( 'post_content', $id ); | |
$blocks = parse_blocks( $content ); | |
if ( ! is_array( $blocks ) || empty( $blocks ) ) { | |
return false; |
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
/** | |
* External dependencies | |
*/ | |
import { unescape as unescapeString } from 'lodash'; | |
function customTaxonomyRadioSelector( OriginalComponent ) { | |
return function( props ) { | |
if ( props.slug === 'my_taxonomy') { | |
if ( ! window.HierarchicalTermRadioSelector ) { | |
window.HierarchicalTermRadioSelector = class HierarchicalTermRadioSelector extends OriginalComponent { |
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
const { | |
SelectControl, | |
} = wp.components; | |
const taxonomy = 'category'; | |
function customTaxonomySelectControlSelector( OriginalComponent ) { | |
return function(props) { | |
if ( props.slug === 'my_taxonomy' ) { | |
if ( !window.HierarchicalTermSelectSelector ) { |
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
/** | |
* Starter styling for core blocks | |
* @see https://wordpress.org/support/article/blocks/ | |
*/ | |
//colors | |
$color__primary: #0073aa; | |
//... | |
$size__site-small-content: 580px; |
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
@mixin clipped-corner($corner: bottom-right, $height: 58px, $width: 52px) { | |
@if $corner == top-left { | |
clip-path: polygon(0 #{$height}, #{$width} 0, 100% 0, 100% 100%, 0 100%); | |
} @else if $corner == top-right { | |
clip-path: polygon(0 100%, 0 0, calc(100% - #{$width}) 0, 100% #{$height}, 100% 100%); | |
} @else if $corner == bottom-right { | |
clip-path: polygon( | |
100% calc(100% - #{$height}), /*right bottom 100% - height px*/ | |
calc(100% - #{$width}) 100%, /* right bottom - 100% - width px */ |
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
<?php | |
//Change error message of AJAX submitted form. | |
add_filter( 'caldera_forms_render_notices', function( $notices ){ | |
//Will NOT be set (during AJAX return) if there is no error | |
if( isset( $notices[ 'error' ], $notices[ 'error' ][ 'note' ] ) ){ | |
$notices[ 'error' ][ 'note' ] = 'Form could not be submitted, please correct erorrs or give us a call.'; | |
} | |
return $notices; | |
}); |
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
DELETE FROM wp_posts WHERE post_type = 'post' AND DATEDIFF(NOW(), post_date) > X; |
NewerOlder