Forums

[resolved] [Plugin: Page Links To] make page-links-to compatible with qtranslate (4 posts)

  1. donaldbaud
    Member
    Posted 2 years ago #

    Here is a small modification to make the plugin compatible with qtranslate.
    You can now enter a url like:
    http://www.example.:encom:frfr

    In the file: page-links-to.php
    change:

    if ( $page_links_to_cache[$id] )
                    $link = $page_links_to_cache[$id];
    
            return $link;

    to this:

    if ( $page_links_to_cache[$id] )
                    $link = $page_links_to_cache[$id];
    
            return __("$link");

    http://wordpress.org/extend/plugins/page-links-to/

  2. milou62
    Member
    Posted 2 years ago #

    Hi
    i need to use your hack...
    But i don't really understand it.
    I have a french and german language site.
    What do i have exactly to enter for a value in the custom field ?

    Thank's for your replay....

  3. donaldbaud
    Member
    Posted 2 years ago #

    Here is the new patch for version 2.3

    This will basically "gettext" the return value so that the qtranslate plugin can change the output depending on the selected language.
    urls can be written like:
    http://www.example.:encom:frfr
    or
    http://www.example./<!--:fr-->fr<!--:--><!--:en-->com<!--:-->

    Here is the patch:
    In the file: page-links-to.php (version 2.3)

    change:

    $link = esc_url( $page_links_to_cache[$id] );
    
             return "$link";

    to this:

    $link = $page_links_to_cache[$id];
    
             return __("$link");

    http://wordpress.org/extend/plugins/page-links-to/
    http://wordpress.org/extend/plugins/qtranslate/

  4. donaldbaud
    Member
    Posted 2 years ago #

    Here is the new patch for version 2.3

    This will basically "gettext" the return value so that the qtranslate plugin can change the output depending on the selected language.
    urls can be written like:

    http://www.example.:encom:frfr

    or

    http://www.example./<!--:fr-->fr<!--:--><!--:en-->com<!--:-->

    Here is the patch:
    In the file: page-links-to.php (version 2.3)

    change:

    $link = esc_url( $page_links_to_cache[$id] );
    
             return "$link";

    to this:

    $link = $page_links_to_cache[$id];
    
             return __("$link");

    http://wordpress.org/extend/plugins/page-links-to/
    http://wordpress.org/extend/plugins/qtranslate/

Topic Closed

This topic has been closed to new replies.

About this Topic