Plugin Directory

Changeset 2753884


Ignore:
Timestamp:
07/08/2022 07:55:34 PM (4 years ago)
Author:
pratikkry
Message:

Update to version 1.1.4 from GitHub

Location:
chl-change-html-lang
Files:
2 added
2 deleted
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • chl-change-html-lang/tags/1.1.4/chl-change-html-lang.php

    r2753799 r2753884  
    1010 * Plugin Name:       CHL-Change HTML Lang
    1111 * Plugin URI:        https://wordpress.org/plugins/chl-change-html-lang/
    12  * Description:       A simple and very lightweight WordPress SEO plugin for changing HTML language attribute value in the header.
    13  * Version:           1.1.3
     12 * Description:       A simple and very lightweight WordPress SEO plugin for changing HTML language attribute value in the header. Navigate to Settings → General for changing HTML lang attributes.
     13 * Version:           1.1.4
    1414 * Requires at least: 4.0
    1515 * Requires PHP:      5.3
     
    9999// If your locale is not supported by the facebook, Yoast plugin will output the best match for your language.
    100100add_filter( 'wpseo_locale', 'chl_ystwpseo_change_og_locale' );
     101
     102add_filter( 'wpseo_schema_piece_language', 'chl_ystwpseo_change_schema_lang' );
     103// Suport for Yoast SEO Schema piece inLanguage
     104function chl_ystwpseo_change_schema_lang( $data ) {
     105   
     106    $data = get_option( 'chl_custom_lang' );
     107    if (strpos($data,'"') !== false) { // First check if the locale contains the string '"'
     108        $data = str_replace('"', '', $data); //if yes, simply remove it from the open graph og:locale tag
     109    }
     110   
     111    return $data;
     112
     113}
  • chl-change-html-lang/trunk/chl-change-html-lang.php

    r2753799 r2753884  
    1010 * Plugin Name:       CHL-Change HTML Lang
    1111 * Plugin URI:        https://wordpress.org/plugins/chl-change-html-lang/
    12  * Description:       A simple and very lightweight WordPress SEO plugin for changing HTML language attribute value in the header.
    13  * Version:           1.1.3
     12 * Description:       A simple and very lightweight WordPress SEO plugin for changing HTML language attribute value in the header. Navigate to Settings → General for changing HTML lang attributes.
     13 * Version:           1.1.4
    1414 * Requires at least: 4.0
    1515 * Requires PHP:      5.3
     
    9999// If your locale is not supported by the facebook, Yoast plugin will output the best match for your language.
    100100add_filter( 'wpseo_locale', 'chl_ystwpseo_change_og_locale' );
     101
     102add_filter( 'wpseo_schema_piece_language', 'chl_ystwpseo_change_schema_lang' );
     103// Suport for Yoast SEO Schema piece inLanguage
     104function chl_ystwpseo_change_schema_lang( $data ) {
     105   
     106    $data = get_option( 'chl_custom_lang' );
     107    if (strpos($data,'"') !== false) { // First check if the locale contains the string '"'
     108        $data = str_replace('"', '', $data); //if yes, simply remove it from the open graph og:locale tag
     109    }
     110   
     111    return $data;
     112
     113}
Note: See TracChangeset for help on using the changeset viewer.