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
function cc_mime_types( $mimes ){ | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter( 'upload_mimes', 'cc_mime_types' ); |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^(wp-admin/.*)$ /wp/$1 [L] | |
RewriteRule ^(wp-[^/]+\.php)$ /wp/$1 [L] | |
RewriteRule ^xmlrpc\.php$ /wp/xmlrpc.php [L] | |
RewriteRule ^(wp-includes/.*)$ /wp/$1 [L] | |
</IfModule> | |
# BEGIN WordPress |
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
<?php | |
/* | |
Plugin Name: Plugin Last Updated | |
Version: 1.0 | |
License: GPL | |
Author: Pete Mall, Range | |
Author URI: http://petemall.com/ | |
Description: Display the last updated date for all plugins from the <a href="http://wordpress.org/extend/plugins/">WordPress.org plugins repo</a>. | |
*/ |
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
<?php | |
add_action( 'init', 'wp_honeybadger_it' ); | |
function wp_honeybadger_it() { | |
remove_filter( 'the_content', 'capital_P_dangit', 11 ); | |
remove_filter( 'the_title', 'capital_P_dangit', 11 ); | |
remove_filter( 'comment_text', 'capital_P_dangit', 31 ); | |
// more to come... |
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
<?php | |
function pm_right_now_svn_revision() { | |
if ( ! $svn = File( '.svn/entries' ) ) | |
return; | |
echo "<p>SVN Revision: {$svn[3]}</p>"; | |
} | |
add_action( 'rightnow_end', 'pm_right_now_svn_revision' ); | |
?> |
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
<?php | |
function pm_svn_revision( $msg = '' ) { | |
if ( $svn = File( '.svn/entries' ) ) | |
$msg .= ' SVN Revision: ' . $svn[3]; | |
return $msg; | |
} | |
add_action( 'update_footer', 'pm_svn_revision', 99 ); | |
?> |
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
<?php | |
add_filter( 'manage_post_posts_columns', 'pm_add_col' ); | |
function pm_add_col( $cols ) { | |
$cols['post_id'] = 'ID'; | |
return $cols; | |
} | |
add_filter( 'manage_posts_custom_column', 'pm_display_col', 10, 2 ); | |
function pm_display_col( $col, $post_id ) { | |
if ( 'post_id' == $col ) |
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
--- wp-includes/script-loader.php (revision 16232) | |
+++ wp-includes/script-loader.php (working copy) | |
@@ -368,7 +368,7 @@ | |
$scripts->add_data( 'list-table', 'group', 1 ); | |
$scripts->localize( 'list-table', 'listTableL10n', array( | |
'loading' => __('Loading...'), | |
- 'error' => __('An error has occured while loading the items.'), | |
+ 'error' => __('An error has occurred while loading the items.'), | |
'search' => __('Search results for “%s”') | |
) ); |
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
<?php | |
foreach ( array( 'the_content', 'the_title', 'comment_text' ) as $filter ) | |
add_filter( $filter, 'you_to_u_dangit', 11 ); | |
function you_to_u_dangit( $content ) { | |
static $dblq = false; | |
$style = '<span style="color: red">'; | |
if ( false === $dblq ) | |
$dblq = _x('“', 'opening curly quote'); |
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
<?php | |
/* | |
Plugin Name: Linkify URLs | |
*/ | |
add_filter( 'the_content', 'linkify_urls' ); | |
function linkify_urls( $content ){ | |
return preg_replace( '/\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i', '<a href="$0">$0</a>', $content ); | |
} |
NewerOlder