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
<?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 | |
/** | |
* 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 | |
/** | |
* 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 | |
/* | |
* Dynamically Generated Checkboxes in a WordPress Settings Page | |
* | |
* This file is fully functional and ready to be used in a plugin or theme to generate this Settings Page | |
* | |
*/ | |
Class Pizza_Shop { |
NewerOlder