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 | |
function __construct() { | |
$this->short_options .= 'o:v:'; | |
$this->usage .= ' [-o <format (default=po)>] [-v <variant>]'; | |
$this->add_filters_to_options_and_usage(); | |
parent::__construct(); | |
} | |
function action_on_translation_set( $translation_set ) { |
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 | |
function md_filter_curly_double_quotes( $translations, $text, $context, $domain ) { | |
if ( 'opening curly double quote' == $context && '“' == $text ) { | |
$translations = '«'; | |
} else if ( 'closing curly double quote' == $context && '”' == $text ) { | |
$translations = '»'; | |
} | |
return $translations; |
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 | |
/** | |
* Replace <ul> from blogroll widget with <div>. | |
*/ | |
function md_replace_ul_blogroll( $output ) { | |
$output = str_replace( "<ul class='xoxo blogroll'>", "<div>", $output ); | |
$output = str_replace( "</ul>", "</div>", $output ); | |
return $output; | |
} |
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 | |
if ( class_exists( 'Simple_Colorbox' ) ) : | |
/** | |
* Conditional Simple Colorbox loader. | |
* | |
* Enqueue Colorbox files only when needed on page to improve | |
* performance by avoiding unnecessary external requests and | |
* inline content. | |
* | |
* If Colorbox is needed only when galleries are used, |
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
/** | |
* Filter admin bar strings. | |
*/ | |
function md_filter_admin_bar_strings( $translation, $original_text, $domain ) { | |
if ( 'About WordPress' == $original_text ) | |
$translation = 'About this site'; | |
return $translation; | |
} |
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
/** | |
* Set en_US lang code if not in admin. | |
*/ | |
function md_set_en_us_locale( $locale ) { | |
if ( ! is_admin() ) { | |
if ( ! defined( 'MD_REAL_LANG' ) ) | |
define( 'MD_REAL_LANG', $locale ); | |
$locale = 'en_US'; | |
} |