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: Ready to Publish | |
| * Description: Add a little checkbox to ensure that you are ready to publish a post. | |
| * Author: Jake Spurlock | |
| * Version: 0.5.0 | |
| */ | |
| class Ready_to_Publish { | |
| /** |
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 | |
| WP_CLI::add_command( 'podcast', 'Podcast_Importer' ); | |
| /** | |
| * Podcast Importer | |
| */ | |
| class Podcast_Importer extends WP_CLI_Command { | |
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
| <style> | |
| .time { vertical-align: top; width: 10%; } | |
| .speaker { vertical-align: top; width: 25% } | |
| .desc { vertical-align: top; } | |
| table.schedule tr { margin-bottom 20px; } | |
| table.schedule tr td { padding: 20px 10px; } | |
| table.schedule.min tr td { padding: 10px; } | |
| table.schedule tr:nth-child(odd) { | |
| background-color: #eee; | |
| } |
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
| <style> | |
| .container { | |
| width: 300px; | |
| } | |
| .window { | |
| width: 300px; | |
| float: left; | |
| } | |
| .prev { | |
| left: -300px; |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 is the ideal post, based on the current pointer. | |
| $ideal = $query->posts[ $index ]->ID; | |
| if ( in_array( $ideal, $used ) ) { | |
| // If it is in the array, update the index to the next. | |
| // What this doesn't have, is a way to go 2+... | |
| $index++ | |
| } | |
| // Grab the post. |
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 | |
| /** | |
| * Number Tower | |
| */ | |
| $rows = array( | |
| array( 21, 24, 0, 9, 0, 0, 2 ), | |
| array( 45, 30, 0, 11, 9, 0 ), | |
| array( 75, 0, 0, 20, 0 ), | |
| array( 0, 0, 0, 38 ), |
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
| <snippet> | |
| <content><![CDATA[?><script>console.log(<?php echo json_encode( \$${1:this} ); ?>);</script><?php]]></content> | |
| <tabTrigger>phpconsole</tabTrigger> | |
| <scope>source.php</scope> | |
| <description>PHP Console</description> | |
| </snippet> |
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
| <snippet> | |
| <content><![CDATA[<script>console.log(<?php echo json_encode( ${1:\$this} ); ?>);</script>]]></content> | |
| <tabTrigger>phpconsole</tabTrigger> | |
| <scope>source.php</scope> | |
| <description>PHP Console</description> | |
| </snippet> |
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 | |
| // The date to start on. | |
| $current_year = date( 'Y' ); | |
| // This doesn't matter that much, but it will | |
| // make the page load a little faster if you | |
| // know exactly what the range is. | |
| $ending_year = 2000; |