A list of my most used commands as well as a few from Oh My Zsh!
https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet
getmaster "feature/foo-branch"
<?php | |
/** | |
* Create the hero markup based on arguments. | |
* | |
* @param array $args The hero arguments | |
* @return string The hero markup | |
* @author Greg Rickaby | |
*/ | |
function wds_client_get_hero( $args = array() ) { |
<?php | |
/** | |
* Filter the Products CPT to register more options. | |
* | |
* @param $args array The original CPT args. | |
* @param $post_type string The CPT slug. | |
* | |
* @return array | |
*/ |
<?php | |
/** | |
* Remove archive title prefixes. | |
* | |
* @param string $title The archive title from get_the_archive_title(); | |
* @return string The cleaned title. | |
*/ | |
function grd_custom_archive_title( $title ) { | |
// Remove any HTML, words, digits, and spaces before the title. |
<?php | |
// Get the "featured" category object. | |
$featured_category = get_term_by( 'slug', 'featured', 'category' ); | |
// Set the "featured" category ID. | |
$featured_category_ID = $featured_category->term_id; | |
// Get the latest three posts, ignoring the current post | |
// and any in the "featured" category. |
A list of my most used commands as well as a few from Oh My Zsh!
https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet
getmaster "feature/foo-branch"
( function( $ ) { | |
// Create a jQuery Object. | |
$.fn.myObject = function() { | |
var target = this; // Store the target element in this variable (jQuery stuff). | |
// Our stuff. | |
this.object = { | |
/** |
// Create an object in the global scope, pass in window, jQuery, and the global object into the anonymous function. | |
window.myObject = ( function( window, $, myObject ) { | |
// Create our object, properties, and functions. | |
myObject = { | |
window: $( window ), // Remove if you don't need it, makes your object smaller. | |
// Access variables using myObject.options | |
options { |
/** | |
* Back To Top. | |
*/ | |
window.Back_To_Top = {}; | |
( function( window, $, that ) { | |
// Private variables. | |
var minWidth = 768; | |
var minHeight = 200; |