Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Three code snippets from my talk at the Portland WordPress User Group meetup on 3/25/2013
<?php
/**
* Custom Hacks for PDXWP Meetup
*/
/**
* Clean up the output of the <head> block
*/
function pdxwp_clean_header() {
remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds
remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed
remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file.
remove_action( 'wp_head', 'index_rel_link' ); // index link
remove_action( 'wp_head', 'wp_generator' ); // Display the XHTML generator that is generated on the wp_head hook, WP version
}
add_action( 'init', 'pdxwp_clean_header' );
/**
* Rename 'posts' to 'articles'
*/
function pdxwp_posts_to_articles( $translated ) {
$words = array(
// 'word to translate' = > 'translation'
'Posts' => 'Articles',
'Post' => 'Article',
);
$translated = str_ireplace( array_keys( $words ), $words, $translated );
return $translated;
}
add_filter( 'gettext', 'pdxwp_posts_to_articles' );
add_filter( 'ngettext', 'pdxwp_posts_to_articles' );
add_filter( 'gettext_with_context', 'pdxwp_posts_to_articles' );
/**
* Add Pinterest to contact information
*/
function pdxwp_add_pinterest( $contact_methods ) {
if ( ! isset( $contact_methods['pinterest'] ) ) {
$contact_methods['pinterest'] = 'Pinterest';
}
return $contact_methods;
}
add_filter( 'user_contactmethods', 'pdxwp_add_pinterest' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.