This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.network :private_network, ip: "192.168.11.44" |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
<url> | |
<loc>http://www.example.com/</loc> | |
<lastmod>2005-01-01</lastmod> | |
<changefreq>monthly</changefreq> | |
<priority>0.8</priority> | |
</url> | |
<url> | |
<loc>http://www.example.com/catalog?item=12&desc=vacation_hawaii</loc> |
This file contains 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
/* | |
Theme Name: Earning Stats | |
Theme URI: http://stats.tastique.net | |
Author: Daniel Pataki | |
Author URI: https://danielpataki.com/ | |
Description: The theme that governs my stats page | |
Version: 1.0 | |
License: GNU General Public License v2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
This file contains 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
/** | |
* Retrive Channel IDs | |
* | |
* This function retreives all categories which are set as channels. | |
* Channels on the website are special categories that have a mailing | |
* list attached which users can subscribe to. | |
* | |
* It returns an array of term objects if $format is set to 'objects', | |
* otherwise returns an array of term_ids. | |
* |
This file contains 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
public function widget( $args, $instance ) { | |
echo $args['before_widget']; | |
if( !empty( $instance['title'] ) ) { | |
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base ) . $args['after_title']; | |
} | |
// Main Widget Code Here |
This file contains 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
$delete_link = wp_get_shortlink( get_the_ID() ) . '&delete=true'; | |
$nonced_link = wp_nonce_url( $delete_link, 'delete-post-' . get_the_ID(), '_mynonce' ); |
This file contains 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
$args = array( | |
'post_type' => 'attachment', | |
'post_status' => 'any', | |
'posts_per_page' => -1 | |
); | |
$attachments = new WP_Query( $args ); | |
while ( $attachments->have_posts() ) { | |
$attachments->the_post(); | |
This file contains 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
add_filter( 'manage_post_posts_columns', 'efi_table_head' ); | |
/** | |
* Custom Column Headers | |
* | |
* This function adds the custom column we need. It is added to the beginning | |
* by splitting the original array. | |
* | |
* @param array $columns The columns contained in the post list | |
* | |
*/ |
This file contains 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
add_filter( 'excerpt_length', 'my_excerpt_length' ); | |
function my_excerpt_length( $length ) { | |
return 110; | |
} |