Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.github.io | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
*/ |
#!/bin/bash | |
########## | |
## Setup: hardcode your mysql user/pass. Yeah, yeah, I know...it's frowned upon. | |
## but for local development, I have no problem with it. | |
## Find and replace: MYSQLUSER / MYSQLPASS | |
## | |
## Usage: This script accepts only one variable, the site name. | |
## | |
######### |
// ==UserScript== | |
// @name Grooveshark for Fluid | |
// @namespace [email protected] | |
// @description Adds Growl notifications and iTunes-style track info to the dock menu. Also adds the controls: Play/Pause, Next, and Previous. | |
// @include http://*grooveshark.com/* | |
// @author Clint Strong | |
// ==/UserScript== | |
(function () { | |
if (window.fluid) { |
<?php | |
class DocBlock { | |
public $docblock, | |
$description = null, | |
$all_params = array(); | |
/** | |
* Parses a docblock; |
(function($){ | |
var media = wp.media, | |
jeditor = { | |
oldMainMenu : media.view.MediaFrame.Post.prototype.mainMenu, | |
init : function(){ | |
media.view.MediaFrame.Post.prototype.mainMenu = function(view){ | |
jeditor.oldMainMenu(view); | |
var jState = new media.controller.Library({ | |
id: 'test', | |
library: media.query({uploadedTo: media.view.settings.post.id}), |
<?php | |
$date = new DateTime('now'); | |
echo $date->format('d/m/Y').PHP_EOL; // format: day/month/year | |
echo $date->format('m-d-Y').PHP_EOL; // format: month-day-year | |
echo $date->format('Y-m-d').PHP_EOL; // format: year-month-day | |
// add 3 days to current date and output using format year-day-month | |
echo $date->setTimestamp( strtotime('+3 days', $date->getTimestamp()) )->format('Y-d-m'); |
define( 'CHILD_THEME_VERSION', filemtime( get_stylesheet_directory() . '/style.css' ) ); |
$is-included : () !default; | |
@mixin once( $name ) { | |
@if include-once( $name ) { | |
@content; | |
} | |
} | |
@function include-once( $name ) { | |
@if index( $is-included, $name ) { |
This is an adaptation of the Sass/Less comparison document.
Not a comprehensive overview of features of either library but a comparison of commonalities.
Sass | Crush