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
/* Code Challenge 7, from “Refactoring Tweaks Workbook” by Tonya Mork ( 2016, LeanPub (https://leanpub.com/littlegreenbookofrefactoringtweaks-workbook) ). */ | |
/*************************************************** | |
* | |
* Original code to be refactored. | |
* | |
**************************************************/ | |
window.PluginName = (function(window, document, $, undefined){ | |
'use strict'; |
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
/* Code Challenge 6, from “Refactoring Tweaks Workbook” by Tonya Mork ( 2016, LeanPub (https://leanpub.com/littlegreenbookofrefactoringtweaks-workbook) ). */ | |
/*************************************************** | |
* | |
* Original code to be refactored. | |
* | |
**************************************************/ | |
/** |
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
/* Code Challenge 5, from “Refactoring Tweaks Workbook” by Tonya Mork ( 2016, LeanPub (https://leanpub.com/littlegreenbookofrefactoringtweaks-workbook) ). */ | |
/*************************************************** | |
* | |
* Original code to be refactored. | |
* | |
**************************************************/ | |
class Session { | |
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
/* Code Challenge 4, from “Refactoring Tweaks Workbook” by Tonya Mork ( 2016, LeanPub (https://leanpub.com/littlegreenbookofrefactoringtweaks-workbook) ). */ | |
/*************************************************** | |
* | |
* Original code to be refactored. | |
* | |
**************************************************/ | |
class Prefix_Shortcode_Course_Categories implements Prefix_Shortcode_Interface { |
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
/* Code Challenge 3, from “Refactoring Tweaks Workbook” by Tonya Mork ( 2016, LeanPub (https://leanpub.com/littlegreenbookofrefactoringtweaks-workbook) ). */ | |
/*************************************************** | |
* | |
* Original code to be refactored. | |
* | |
**************************************************/ | |
class Form { |
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
/* Code Challenge 2, from “Refactoring Tweaks Workbook” by Tonya Mork ( 2016, LeanPub (https://leanpub.com/littlegreenbookofrefactoringtweaks-workbook) ). */ | |
/*************************************************** | |
* | |
* Original code to be refactored. | |
* | |
**************************************************/ | |
/* This function grabs the custom header from the current theme so that it can be displayed. */ |
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
// # Code Challenge 1, from “Refactoring Tweaks Workbook” by Tonya Mork ( 2016, LeanPub (https://leanpub.com/littlegreenbookofrefactoringtweaks-workbook) ). | |
// ## Original code to be refactored | |
/** | |
* Check if custom post type exists, to provide data | |
*/ | |
function prefix_is_post_type( string $type, int $post_id ) { | |
global $wp_query; | |
if($type == get_post_type($wp_query->post->ID)) return true; |
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 | |
# =============================================================================== | |
# Script to install PHPUnit in the Local by Flywheel Mac app | |
# These packages are installed | |
# | |
# PHPUnit, curl wget, rsync, git, subversion and composer. | |
# | |
# WordPress is installed in the `/tmp/wordpress` directory for use by PHPUnit. | |
# The WordPress test suite is installed in the `/tmp/wordpress-tests-lib` directory. |
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
add_action( 'genesis_entry_header', __NAMESPACE__ . '\add_content_wrap_markup_open', 3 ); | |
/* | |
* Add content wrap around Event entry_header & render post thumbnail on single. | |
* | |
* @since 1.0.0 | |
* | |
* return void | |
*/ | |
function add_content_wrap_markup_open() { | |
$event_id = (int) get_the_ID(); |
NewerOlder