- In the editor I see inline styles when changing custom size.
- Also editor styles should use
is-small-text
,is-larger-text
classes so that they would match what theme wants.
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
/** | |
* Set dataLayer for Piwik Pro. | |
*/ | |
function dataLayer() { | |
window.dataLayer = window.dataLayer || []; | |
// Form field have been added as hidden field in the Gravity Form. | |
// It has class `js-datalayer-name`. | |
const formNameField = document.querySelector('.js-datalayer-name input'); | |
if (formNameField) { |
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
pipelines: | |
default: | |
- parallel: | |
- step: | |
image: composer:2.0 | |
name: 'PHPCS' | |
script: | |
# Install Dependencies | |
- composer install | |
# Run PHPCS |
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
{ | |
"$schema": "https://schemas.wp.org/trunk/theme.json", | |
"version": 2, | |
"settings": { | |
"custom": { | |
"color": { | |
"primary": { | |
"100": "hsl(360, 100%, 97%)", | |
"200": "hsl(360, 82%, 89%)", | |
"300": "hsl(360, 77%, 78%)", |
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
// WordPress dependencies. | |
const { __ } = wp.i18n; | |
const { Path, SVG } = wp.components; | |
/** | |
* Block variants. | |
*/ | |
wp.domReady(() => { | |
wp.blocks.unregisterBlockVariation('core/columns', 'two-columns-equal'); |
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 debounce from 'lodash.debounce'; | |
const { subscribe, dispatch, select, withSelect } = wp.data; | |
const { getEditedPostAttribute, isCurrentPostPublished, getCurrentPostType } = select( 'core/editor' ); | |
const { isTyping } = select( 'core/block-editor' ); | |
const { getMedia } = select( 'core' ); | |
const { lockPostSaving, unlockPostSaving } = dispatch( 'core/editor' ); | |
const { createNotice, removeNotice } = dispatch( 'core/notices' ); | |
const { __ } = wp.i18n; |
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
{ | |
"phpcs.executablePath": "/absolute-path-to/vendor/bin/phpcs", | |
"phpcs.standard": "10up-Default", | |
"phpcs.autoConfigSearch": false | |
} |
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_filter( 'navigation_markup_template', function( $template, $class ) { | |
// Set custom modifier classes. | |
$class = 'pagination' === $class ? 'posts' : 'comments'; | |
// Modified template with custom classes. | |
$template = ' | |
<nav class="pagination pagination--' . $class . '" role="navigation"> | |
<h2 class="screen-reader-text">%2$s</h2> | |
<div class="pagination__items">%3$s</div> |
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 | |
use function Hybrid\register_object_template; | |
add_action( 'hybrid/register_object_templates', function() { | |
register_object_template( 'example', [ | |
'label' => __( 'Example' ), | |
'filename' => 'example.php' | |
] ); |
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
// Align full and wide. | |
.alignfull { | |
margin-left: calc(50% - 50vw); | |
margin-right: calc(50% - 50vw); | |
max-width: 1000%; | |
width: auto; | |
} | |
@media (min-width: $breakpoint-1) { |
NewerOlder