Forked from Secret Sam's Pen Jotfe.
A Pen by Jake Spurlock on CodePen.
| <?php | |
| WP_CLI::add_command( 'podcast', 'Podcast_Importer' ); | |
| /** | |
| * Podcast Importer | |
| */ | |
| class Podcast_Importer extends WP_CLI_Command { |
| <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; | |
| } |
| <style> | |
| .container { | |
| width: 300px; | |
| } | |
| .window { | |
| width: 300px; | |
| float: left; | |
| } | |
| .prev { | |
| left: -300px; |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| <?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. |
| <?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 ), |
| <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> |
| <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> |
| <?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; |
Forked from Secret Sam's Pen Jotfe.
A Pen by Jake Spurlock on CodePen.