Plugin Directory

Changeset 1093149


Ignore:
Timestamp:
02/18/2015 08:40:21 AM (11 years ago)
Author:
rufein
Message:

fix format of example code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • language-code-selector-mqtranslate/trunk/readme.txt

    r1093141 r1093149  
    3535For example:
    3636
    37 `add_filter( 'lang-code-selector-content', 'test_lang_code_selector_content' ); '
    38 ''
    39 ' function test_lang_code_selector_content( $lang_code ){ '
    40 '   global $q_config;'
    41 '   $link_flag_url =  dirname(plugins_url()) . '/' . $q_config['flag_location'] . $q_config['flag'][$lang_code];'
    42 '   $link_flag = "<img widht=\"18\" height=\"12\" src=\"$link_flag_url\" alt=\"$lang_code\" />";'
    43 '   return $lang_code . $link_flag ;'
    44 '}'
     37add_filter( 'lang-code-selector-content', 'test_lang_code_selector_content' );
     38
     39function test_lang_code_selector_content( $lang_code ){
     40    global $q_config;
     41    $link_flag_url =  dirname(plugins_url()) . '/' . $q_config['flag_location'] . $q_config['flag'][$lang_code];
     42    $link_flag = "<img widht=\"18\" height=\"12\" src=\"$link_flag_url\" alt=\"$lang_code\" />";
     43    return $lang_code . $link_flag ;
     44}
    4545
    4646
Note: See TracChangeset for help on using the changeset viewer.