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
#!/usr/bin/env bash | |
# To the network id: | |
# - https://cms-devl.bu.edu/wp-admin/network/admin.php?page=networks&action=domains | |
# - Search for your sandbox name | |
# - Hover over the sandbox name, or click on it. | |
# - The end of the url will show your sandbox id. | |
SBNETWORK=### | |
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
hi |
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
#!/bin/bash | |
# place this after nvm initialization! | |
autoload -U add-zsh-hook | |
load-nvmrc() { | |
local node_version="$(nvm version)" | |
local nvmrc_path="$(nvm_find_nvmrc)" | |
if [ -n "$nvmrc_path" ]; then | |
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") |
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 query = ` | |
{ | |
user(username: "hashnodeUser") { | |
publication { | |
posts(page: 0) { | |
slug | |
title | |
coverImage | |
} | |
} |
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
<!-- | |
To add or reduce the amount of markup that is repeated, | |
Change the number "10" in `$i >= 10` | |
--> | |
<div> | |
<?php for ( $i = 1; $i >= 10; $i ++ ) : ?> | |
<p>Here is where you can add your markup...</p> | |
<?php endfor; ?> | |
</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 | |
$cmb2->add_field( | |
array( | |
'id' => '_[id]', | |
'name' => '', | |
'type' => '', | |
'options_cb' => __NAMESPACE__ . '\\get_term_options', | |
'get_term_args' => array( | |
'taxonomy' => '', | |
'hide_empty' => 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 | |
/** | |
* [Comonent Name] | |
* | |
* @package [changeme] | |
*/ | |
namespace BU\Responsive\Theme\[theme_name]\[component name]; | |
use function BU\Responsive\Theme\Diversity\trim_words; |
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 | |
$cmb->add_field( | |
array( | |
'name' => __( '[CHANGEME-name]', '[CHANGEME-localization]' ), | |
'id' => '[CHANGEME-id]', | |
'desc' => __( '[CHANGEME-description]', '[CHANGEME-localization]' ), | |
'type' => 'file', | |
'options' => array( | |
'url' => 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 | |
/** | |
* CLI commands | |
* https://make.wordpress.org/cli/handbook/guides/commands-cookbook/ | |
*/ | |
WP_CLI::add_command( '[command]', '[CLASS_NAME]' ); | |
/** | |
* WP_CLI class |
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 | |
/** | |
* Data and call to register the taxonomy. | |
* | |
* @param array $tax Data for the taxonomy. | |
*/ | |
function build_taxonomy( $tax ) { | |
$labels = array( | |
'name' => $tax['plural'], |
NewerOlder