Changeset 1050029
- Timestamp:
- 12/20/2014 05:46:04 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-seo-yoast-integration-mq-translate/trunk/wp-seo-yoast-integration-mqtranslate.php
r1041853 r1050029 4 4 * Plugin URI: http://wordpress.org 5 5 * Description: This module has the aim to make compatible the wordpress SEO by Yoast and mqtranslate module. 6 * Version: 0.1. 16 * Version: 0.1.2 7 7 * Author: Koldo Gonzalez (rufein) 8 8 * Author URI: http:/funkydrop.net … … 119 119 } 120 120 121 /** 122 * 123 * @param string $text 124 * 125 * @return array with lang codes; 126 */ 127 128 function wp_seo_yoast_integ_available_languages( $text ){ 129 $content = qtrans_split($text); 130 // find available languages 131 $available_languages = array(); 132 foreach ($content as $language => &$lang_text) { 133 $lang_text = trim($lang_text); 134 if (!empty($lang_text)) 135 $available_languages[] = $language; 136 } 137 return $available_languages; 138 } 139 140 /** 141 * 142 * @param string $content 143 * @param string $lang 144 * 145 * @return String 146 */ 147 function wp_seo_yoast_integ_filter_content_by_lang($content, $lang = ''){ 148 return qtrans_use($lang, $content); 149 } 150
Note: See TracChangeset
for help on using the changeset viewer.