MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to: Sublime Text
Make it executable with: chmod u+x Sublime\ Text
INITIALISATION | |
============== | |
load wp-config.php | |
set up default constants | |
load wp-content/advanced-cache.php if it exists | |
load wp-content/db.php if it exists | |
connect to mysql, select db | |
load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
load wp-content/sunrise.php if it exists (multisite only) |
<?php | |
if ( ! defined( 'ABSPATH' ) ) die('-1'); | |
/* | |
* WDG-customized version of the Events Calendar Pro mini calendar widget. | |
* Changes are noted inline. | |
* Replacing class name: Tribe__Events__Pro__Mini_CalendarWidget | |
*/ | |
class MultisiteTribeEventsProMiniCalendarWidget extends WP_Widget { | |
function __construct() { |
MIT License | |
Copyright (c) 2014 Piotr Kuczynski | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWAR |
<?php | |
add_action( 'transition_post_status', 'srf_publish_post_unique_date', 10, 3 ); | |
function srf_publish_post_unique_date( $new_status, $old_status, $post ) { | |
// only perform operation when post is | |
// changing to a status of 'publish' | |
// otherwise (abort) | |
if ( 'publish' !== $new_status ) { return; } |
<?php | |
/** | |
* [list_searcheable_acf list all the custom fields we want to include in our search query] | |
* @return [array] [list of custom fields] | |
*/ | |
function list_searcheable_acf(){ | |
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
return $list_searcheable_acf; | |
} |
Work in progress, I'll write this up properly when I'm done.
Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.
Prerequisites:
/Applications/Utilities/Terminal.app
#!/bin/sh | |
available=$(free --mega -tw | grep "Total:" | awk '{print $4}') | |
ps -ylC httpd --sort:rss | awk -v avail="$available" '{ s += $8; } END { print "Average Size:", s/(NR-1)/1024, "MB,", NR-1, "Processes, Total usage:", (s/(NR-1)/1024)*(NR-1), "MB, Max Servers:", avail/(s/(NR-1)/1024) }' |