Skip to content

Instantly share code, notes, and snippets.

View thejimbirch's full-sized avatar

Jim Birch thejimbirch

View GitHub Profile
@thejimbirch
thejimbirch / git_submodule_fix.md
Created January 12, 2022 17:42 — forked from claraj/git_submodule_fix.md
Fixing git submodule AKA git repo inside another git repo

Problem, and symptoms:

You experience one or more of these symptoms

  • you have code in a directory but it's not being pushed to GitHub. You just see an empty directory icon
  • you see this message when you add code to your git repository from the command prompt
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
@thejimbirch
thejimbirch / metatag_example.php
Created August 19, 2019 20:27 — forked from mortenson/metatag_example.php
OR statements in metatags...
<?php
/**
* Implements hook_metatags_attachments_alter().
*
* This function allows you to define fallback tokens in case a field is empty.
*
* If all fallback values are empty, the tag will be empty.
*
* Example: [node:field_image:medium]||[node:field_legacy_image:medium]||/fallback.png
@thejimbirch
thejimbirch / contrib
Last active June 16, 2021 20:03 — forked from sean-e-dietrich/contrib
Contrib Command For Docksal
#!/bin/bash
NAME=$1
VERSION=${2:-8.8.x}
if [[ -z "${NAME}" ]]; then
NAME=$(uuidgen)
fi
if [[ -d $NAME ]]; then
@thejimbirch
thejimbirch / pull_request_template.md
Created October 10, 2018 16:12 — forked from kwhite/pull_request_template.md
An example PR template

Description

As a developer, I need to start with a story.

A few sentences describing the overall goals of the pull request's commits. What is the current behavior of the app? What is the updated/expected behavior with this PR? Include your acceptance critiera! If your tasks were well-written, you can probably copy/paste some of this.

Affected URL

link_to_relevant_multidev_or_test_site

<?php //* do not include php tag
add_filter( 'schema_wp_types', 'schema_wp_new_add_schema_type_claim_review' );
/**
* Add ClaimReview to Schema Types options
*
* @since 1.0
*/
function schema_wp_new_add_schema_type_7623456( $options ) {