Plugin Directory

Changeset 1050029


Ignore:
Timestamp:
12/20/2014 05:46:04 AM (11 years ago)
Author:
rufein
Message:

version updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-seo-yoast-integration-mq-translate/trunk/wp-seo-yoast-integration-mqtranslate.php

    r1041853 r1050029  
    44 * Plugin URI: http://wordpress.org
    55 * Description: This module has the aim to make compatible the wordpress SEO by Yoast and mqtranslate module.
    6  * Version: 0.1.1
     6 * Version: 0.1.2
    77 * Author: Koldo Gonzalez (rufein)
    88 * Author URI: http:/funkydrop.net
     
    119119}
    120120
     121/**
     122 *
     123 * @param string $text
     124 *
     125 * @return array with lang codes;
     126 */
     127
     128function 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 */
     147function 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.