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: Stream User Generator | |
* Description: Generates X-Team users for testing | |
* Version: 0.1 | |
* Author: johnregan3 | |
* Author URI: http://johnregan3.me | |
* | |
* USE: | |
* Upload this into your Plugins 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
<?php | |
/** | |
* Plugin Name: Hello Samuel L Jackson | |
* Description: Inserts random movie quotes by Samuel L. Jackson into your Admin header. | |
* Version: 1.0 | |
* Author: John Regan | |
* Author URI: http://johnregan3.me | |
* License: GPLv2+ | |
*/ |
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
### Keybase proof | |
I hereby claim: | |
* I am johnregan3 on github. | |
* I am johnxwp (https://keybase.io/johnxwp) on keybase. | |
* I have a public key whose fingerprint is 2D1B 7A65 8C07 4C6D C7F9 96B9 9204 900E DDA2 50A4 | |
To claim this, I am signing this object: |
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 | |
/** | |
* Tests if get_post_time() and get_post_modified_time() return GMT(UTC) times correctly. | |
* | |
* get_post_time() and get_post_modified_time() have a parameter for GMT(UTC) time. | |
* However, they use mysqldate(), which does not take such a parameter. | |
* mysql2date() expects the default timezone to be set to GMT(UTC), but when it is not, | |
* get_post_time() and get_post_modified_time() do not correctly return GMT(UTC) time. | |
* To prove this, test_get_post_time() and test_get_post_modified_time() should return two |
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 has been tested using the diff for save_post_{$post_type} | |
* https://core.trac.wordpress.org/changeset/25050 | |
* | |
* @todo Try different post type names | |
* @todo Create two posts and try to update them both at the same time | |
*/ |
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 | |
// Untested Code! | |
//Generate New Page from Video | |
function copy_videos_to_pages( $post_id ) { | |
// Only if we're saving a flowplayer5 video | |
if ( 'flowplayer5' !== get_post_type( $post_id ) ) | |
return $post_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
$playlist = array( | |
[0] => WP Post Object | |
[ID] => 1; | |
[_brightcove_id] = 1 | |
[1] => WP Post Object | |
[ID] => 2; | |
[_brightcove_id] = 2 | |
[2] => WP Post Object | |
[ID] => 3; | |
[_brightcove_id] = 1 |
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: Schedule Event Tutorial | |
* Description: Schedules single event to uncheck a checkbox on a custom Menu page | |
* Version: 0.1 | |
* Author: John Regan | |
* Author URI: http://johnregan3.me | |
* Text Domain: setjr3 | |
* License: GPLv2+ |
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 | |
/** | |
* Add support for Vertical Featured Images | |
*/ | |
if ( ! function_exists( 'mytheme_vertical_check' ) ) : | |
function mytheme_vertical_check( $html, $post_id, $post_thumbnail_id, $size, $attr ) { | |
$image_data = wp_get_attachment_image_src( $post_thumbnail_id , 'large' ); | |
//Get the image width and height from the data provided by wp_get_attachment_image_src() |
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: John Regan's Improved AWP Rules | |
* Plugin URI: https://gist.github.com/johnregan3/4a145185d97dd33806ad | |
* Version: 1.0 | |
* | |
* @see http://www.advancedwp.org/awp-contribution-rules/ | |
* | |
* Description: Yes, I get it -- this document was never intended to be technical, it's intended to be fun and readable. | |
* This is not intended to be a criticism of the original in any way; it's just a way for me to introduce myself to the group, |
OlderNewer