Skip to content

Instantly share code, notes, and snippets.

Avatar

Phil Kurth mishterk

View GitHub Profile
@mishterk
mishterk / 0_reuse_code.js
Created Jul 9, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mishterk
mishterk / dabblet.css
Last active Aug 29, 2015
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@mishterk
mishterk / dabblet.css
Created Jan 13, 2015
The first commented line is your dabblet’s title
View dabblet.css
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@mishterk
mishterk / basic-custom-module-recipe.php
Last active Nov 26, 2016
Divi hacks, mods, fixes, etc
View basic-custom-module-recipe.php
<?php
add_action( 'et_builder_ready', function () {
class MyCustomModule extends ET_Builder_Module {
function init()
@mishterk
mishterk / interpolation-example.php
Last active Jan 30, 2017
A quick example of interpolation in PHP (for Ben)...
View interpolation-example.php
<?php
// Quick PHP interpolation example...
class Person {
public $name = '';
public function getName()
{
@mishterk
mishterk / class-disable-comments.php
Last active Jul 1, 2020
A static class that basically removes all (I think) comment related functionality in WordPress
View class-disable-comments.php
<?php
namespace PhilKurth\WP\Tools;
@mishterk
mishterk / implementation.php
Created Mar 7, 2017
Simple examples of static class methods and name-spaced functions
View implementation.php
<?php
include 'utility-class.php';
include 'utility-functions.php';
// using a static class method
$processed = UtilityClass::methodOne( 'some data' );
@mishterk
mishterk / generated-style.css
Last active Sep 29, 2017
BEM style example
View generated-style.css
.Post{}
.Post__title{}
.Post__content{}
.Post--is-highlighted .Post__title{} // now we are using the cascade to override styling when that block is at a particular state
@mishterk
mishterk / book-cpt-test.json
Created Jan 14, 2018
Some test data. Throw the CPT registration in functions.php
View book-cpt-test.json
{
"name": "books",
"relationship": {
"type": "post",
"post_type": "book"
},
"columns": [
{
"name": "author",
"acf_field_name": "author"
View MagnificPopupModal.vue
<template>
<div class="Modal mfp-hide" ref="modal">
<div class="Modal__inner">
<slot></slot>
</div>
</div>
</template>
You can’t perform that action at this time.