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
/** | |
* 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
<?php | |
/** | |
* Plugin Name: Multisite User Meta | |
* Plugin URI: https://foxland.fi/user-meta-in-wordpress-multisite/ | |
* Description: Test multisite user meta with text value. | |
* Version: 1.0.0 | |
* Author: Sami Keijonen | |
* Author URI: https://foxland.fi/ | |
* Text Domain: multisite-user-meta | |
* Domain Path: /languages |
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) { |
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
/* | |
* Load contacts and filter by categories. | |
*/ | |
( function() { | |
'use strict'; | |
// Variables. | |
const filterForm = document.getElementById( 'filter-contacts' ); | |
const contactWrapper = document.getElementById( 'contact-section' ); | |
const htmlOutput = document.getElementById( 'js-contact-replace' ); |
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
<?php | |
/** | |
* Display 'attendee' post type in alphabetical order by it's category. | |
* | |
* The output looks like this: | |
* | |
* A | |
* Ace Bill | |
* Alb Nick |
NewerOlder