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
# #!/bin/bash | |
# # | |
# # provision.sh | |
# # | |
# # This file is specified in Vagrantfile and is loaded by Vagrant as the primary | |
# # provisioning script whenever the commands `vagrant up`, `vagrant provision`, | |
# # or `vagrant reload` are used. It provides all of the default packages and | |
# # configurations included with Varying Vagrant Vagrants. | |
# # By storing the date now, we can calculate the duration of provisioning at the |
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
<?php | |
/** | |
* | |
* This script will copy your wordpress from public_html (or wherever) | |
* and place it in a staging folder. | |
* It will then clone the database, reconfigure the config file | |
* and replace URL's from the original URL to your staging URL. | |
* It will then make sure to NOT allow search engines to index the page. | |
* | |
* Use this script to clone your main wp in order to test maintenance work |
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
register_extended_post_type( | |
'newsletter', | |
array( | |
'capability_type' => 'post', | |
'hierarchical' => false, | |
'menu_position' => 45, | |
'quick_edit' => false, | |
'supports' => array( 'title', 'editor', 'thumbnail' ), | |
'admin_cols' => array( | |
'newsletter-image' => array( |
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
<?php | |
/* | |
Plugin Name: Allow Update Notifications | |
Plugin URI: https://gist.github.com/jaydansand/2e41490a8b040a199db4 | |
Description: WordPress plugin to allow module/theme/core update notifications even when DISALLOW_FILE_MODS is TRUE. | |
Version: 1.0 | |
Author: Jay Dansand, Technology Services, Lawrence University | |
Author URI: https://gist.github.com/jaydansand | |
*/ | |
/* Copyright 2014 Lawrence University |
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
<?php | |
/** | |
* Get attachment file type extension | |
* | |
* Requires that you have the attachment id | |
* See this post http://jeremyjaymes.com/display-attach…ordpress-theme/ for more explanation | |
*/ | |
//* Assumes we're in a loop and have our attachment id already | |
$file_url = wp_get_attachment_url( $file_id ); |
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
<?php | |
/** | |
* Plugin Name: My Amdin Pointers | |
* Plugin URI: https://gist.github.com/brasofilo/6947539 | |
* Version: 0.1 | |
* Author: Rodolfo Buaiz | |
* Author URI: http://brasofilo.com | |
* Licence: GPLv3 | |
* |
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
<?php | |
/* | |
* Since PHP5 there is no need to pass an reference of $this | |
* | |
* @see http://php.net/manual/en/language.oop5.references.php | |
* [...] As of PHP 5, an object variable doesn't contain the object itself as value anymore [...] | |
*/ | |
add_action( 'load-upload.php', array( $this, 'custom_bulk_action' ) ); | |
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
<?php | |
// Function to get a blog/site's domain mapped url. | |
// | |
// You need to call it with a blog ID | |
// | |
// Example: | |
// $custom_blog_id = '14'; | |
// echo get_domain_mapped_url( $custom_blog_id ); | |
// |
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
<?php | |
/* | |
Plugin Name: R Debug | |
Description: Set of dump helpers for debug. | |
Author: Andrey "Rarst" Savchenko | |
Author URI: https://www.rarst.net/ | |
License: MIT | |
*/ |
NewerOlder