Ready to get started?Download WordPress


Custom Meta Widget
Using WordPress Default Localization for front-end (1 post)

  1. moreauf
    Posted 1 year ago #


    We are currently using your plugin on a French site for which there is no localization file for your plugin. We don't mind your plugin's back-end to be in English.

    For displaying the register and login links, you use the wp_register() and the wp_loginout() functions which use the main localization ".mo" file. This is great since even without a locale for your plugin, everything is translated on the front-end.

    Unfortunately the links for the entries RSS and the comments RSS don't depend on the main localization file, even though they replicate core functionality.

    Would you consider changing the $content variable's definition (around line 170 of customMeta.php) as such (I've modified 'entryrss' and 'commentrss' so that they use the main localization file):

    $content = array(
            'register' => wp_register( '<li>', '</li>', false ),
            'login' => '<li>' . wp_loginout( NULL, false ) . '</li>',
            'entryrss' =>
            '<li><a href="' . get_bloginfo( 'rss2_url' ) . '" title="' . __('Syndicate this site using RSS 2.0') . '">'.
                __('Entries <abbr title="Really Simple Syndication">RSS</abbr>') .
                '</a></li>' ,
            'commentrss' =>
               '<li><a href="' . get_bloginfo( 'comments_rss2_url' ) . '" title="'  . __('The latest comments to all posts in RSS') .  '">' .
                __('Comments <abbr title="Really Simple Syndication">RSS</abbr>') .
            'wordpress' => '<li><a href="http://wordpress.org/" title="' .
                __( 'Powered by WordPress, state-of-the-art semantic personal publishing platform.', 'customMetaWidget' ) .
            'showcustom' => ( !empty( $instance['customtext'] ) && !empty( $instance['customurl'] ) ?
                '<li><a href="' . esc_url( $instance['customurl'] ) . '">' . esc_attr( $instance['customtext'] ) . '</a></li>' :
            '<!--' . __( 'Error: "Show Custom Link" is checked, but either the text or URL for that link are not specified. The link was not displayed because it would be broken. Check the settings for your Custom Meta widget.', 'customMetaWidget' ) . '-->' ),
            'linklove' => '<li><a href="' . $this->homepage . '" title="' . __( 'WordPress Plugin Homepage', 'customMetaWidget' ) . '">' . __( 'Custom Meta', 'customMetaWidget' ) . '</a></li>' 

    Best regards,



Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.