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
| #!/bin/bash | |
| # Requirements: | |
| # - homebrew: https://brew.sh/ | |
| # - homebrew tap: buo/cask-upgrade - https://github.com/buo/homebrew-cask-upgrade | |
| # - homebrew mas (Mac App Store command-line interface - https://github.com/mas-cli/mas) | |
| # | |
| # Install the requirements by running: | |
| # brew tap buo/cask-upgrade && brew install mas | |
| # CONFIG: |
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
| name: 'Bundle Size Comparison' | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest |
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
| /* Break out of a container in a WP site. */ | |
| /* Exclude blocks in the editor. */ | |
| .alignfull:not(.wp-block) { | |
| margin-left: calc( 50% - 50vw ); | |
| margin-right: calc( 50% - 50vw ); | |
| max-width: 100vw; | |
| } | |
| .alignwide { |
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 | |
| function register_custom_taxonomy() { | |
| $taxonomy_labels = [ | |
| 'name' => esc_html__( 'Custom Terms', 'text-domain' ), | |
| 'singular_name' => esc_html__( 'Custom Term', 'text-domain' ), | |
| 'menu_name' => esc_html__( 'Terms', 'text-domain' ), | |
| ]; | |
| $taxonomy_args = [ |
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
| /** | |
| * Custom WordPress block boilerplate. | |
| * | |
| * @package My_Block_Package | |
| * @author Alexis J. Villegas | |
| * @link http://www.alexisvillegas.com | |
| * @license GPL-2.0+ | |
| */ | |
| ( function( blocks, editor, element ) { |
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 | |
| /** | |
| * Add featured image column to WP admin panel - posts AND pages | |
| * See: https://bloggerpilot.com/featured-image-admin/ | |
| */ | |
| // Set thumbnail size | |
| add_image_size( 'j0e_admin-featured-image', 60, 60, 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
| #!/usr/bin/env bash | |
| # -*- coding: utf-8 -*- | |
| # vim: set ft=sh et ts=4 sw=4 sts=4: | |
| # INFO | |
| # -------------------------------------------------------------------------------------- | |
| # Free up disk space on Debian, Ubuntu - clean log, cache, archive packages/apt archives, | |
| # orphaned packages, old kernel and remove the trash | |
| # | |
| # Gist repo: |
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 | |
| $key_file_path = __DIR__ . '/service-account-credentials.json'; | |
| $google_client = new \Google_Client(); | |
| $google_client->setAuthConfig( $key_file_path ); | |
| // Set the scopes of whatever you need access to | |
| // See https://developers.google.com/identity/protocols/oauth2/scopes | |
| $google_client->setScopes( array( 'https://www.googleapis.com/auth/analytics.readonly' ) ); | |
| $http_client = $client->authorize(); |
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 | |
| function rh_filter_the_content( $the_content = '' ) { | |
| $blocks = parse_blocks( $the_content ); | |
| $new_block = array( | |
| 'blockName' => 'core/paragraph', | |
| 'attrs' => array(), | |
| 'innerBlocks' => array(), | |
| 'innerHTML' => '<p>Hello World</p>', | |
| 'innerContent' => array( | |
| '<p>Hello World</p>', |
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 | |
| /** | |
| * A function that takes an array of HTML attribute | |
| * key/value pairs and returns a string of HTML attributes. | |
| **/ | |
| function unwrap_html_attrs($attrs) | |
| { | |
| $attributes = ''; |
NewerOlder