Plugin Directory

Changeset 854244


Ignore:
Timestamp:
02/09/2014 02:58:29 PM (12 years ago)
Author:
tzavdesign
Message:

Updating 1.1

Location:
post-author
Files:
18 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • post-author/trunk/post_author.php

    r630645 r854244  
    55Description: Adds the name of author at the top or bottom of the content or excerpts (post / page / archive), plus optional publishing and last editing date, complete with surrounding text and a per-post hide option for exceptions.
    66Author: David Shabtai
    7 Version: 1.0
    8 Author URI: http://www.tzav.fr
    9 Copyright (C) 2010 David Shabtai
     7Version: 1.1
     8Author URI: http://www.glanum.com
     9Copyright (C) 2014 David Shabtai
    1010david@glanum.com
    1111http://www.glanum.com
     
    2525function ad_post_author_option($name, $value, $type)
    2626{
     27        $value = 'off';
    2728    if( ($type == 'bool') && (strlen($value) == 0) )
    28         $value = 'off';
    2929    if( get_option($name) == FALSE )
    3030        add_option($name, $value);
     
    3636function post_author_init()
    3737{
     38    /* === OBSOLETE since version 1.1
    3839    $locale = get_locale();
    3940    if( empty($locale) )
    4041        $locale = 'en_US';
    41     $mofile = dirname(__FILE__) . "/locale/$locale.mo";
     42    $mofile = dirname(__FILE__) . "/languages/$locale.mo";
    4243    load_textdomain('post_author', $mofile);
    43 
     44    */
     45   
     46    /**
     47     * Load the plugin translation files
     48     *
     49     * Used instead of load_textdomain() function.
     50     * The .mo and .po files are now prefixed by plugin name
     51     *
     52     * @since version 1.1
     53     */
     54    load_plugin_textdomain('post_author',false, dirname( plugin_basename( __FILE__ ) ). '/languages/' );
     55   
    4456    if( !get_option('Post_Author_Options') )
    4557    {
     
    501513            if( is_page() && $options['post_author_author_avatar'] == 'on' )
    502514            {
    503                 $content .='<div id="post_author_avatar">';
     515                $content .='<div class="post_author_avatar">';
    504516                $content .= $author_link_start;
    505517                $content .= get_avatar(get_the_author_meta('user_email'), $options['post_author_author_avatar_size'], '', $moreabout, $options['post_author_author_avatar_float']);
     
    507519                $content .= '</div>';
    508520            }else if( !is_page() && $options['post_author_author_avatar_on_post'] == 'on'){
    509                 $content .='<div id="post_author_avatar">';
     521                $content .='<div class="post_author_avatar">';
    510522                $content .= $author_link_start;
    511523                $content .= get_avatar(get_the_author_meta('user_email'), $options['post_author_author_avatar_size_on_post'], '', $moreabout, $options['post_author_author_avatar_float_on_post']);
     
    517529           
    518530           
    519             $content .='<span id="post_author_author">' . $options['post_author_txt_before'] . ' ';
     531            $content .='<span class="post_author_author">' . $options['post_author_txt_before'] . ' ';
    520532            $content .= $author_link_start;
    521533            $content .= $author;
     
    525537            if( $options['post_author_create_dat'] == 'on' )
    526538            {
    527                 $content .= '<span id="post_author_create">' . $options['post_author_dat_before'] . $post_date . $options['post_author_dat_after'] . '</span>';
    528             }
    529 
     539                $content .= '<span class="post_author_create">' . $options['post_author_dat_before'] . $post_date . $options['post_author_dat_after'] . '</span>';
     540            }
     541               
     542           
    530543            // NOW ADD REVISION
    531             if( $options['post_author_modify_author'] == 'on' )
    532             {
    533                 if( $modified_author <> $author)
    534                 {
    535                     $content .= '<span id="post_author_modify">' . $options['post_author_modified_before'];
    536                     $content .= $author_modify_link_start;
    537                     $content .= $modified_author;
    538                     $content .= $author_link_end;
    539                     if( $post_date != $modified_date && $options['post_author_modify_dat'] == 'on')
    540                     {
    541                         $content .= $options['post_author_modified_after_follow'] ;
    542                     }else{
    543                         $content .= $options['post_author_modified_after'] ;
    544                     }
    545                     $content .= '</span>';
    546                 }
     544            if( $options['post_author_modify_author'] == 'on' AND $modified_author != $author)
     545            {
     546                $content .= '<span class="post_author_modify">' . $options['post_author_modified_before'];
     547                $content .= $author_modify_link_start;
     548                $content .= $modified_author;
     549                $content .= $author_link_end;
     550                if( $post_date != $modified_date AND $options['post_author_modify_dat'] == 'on')
     551                {
     552                    $content .= $options['post_author_modified_after_follow'] ;
     553                }else{
     554                    $content .= $options['post_author_modified_after'] ;
     555                }
     556                $content .= '</span>';
    547557            }
    548558           
     
    553563                if( $post_date != $modified_date )
    554564                {
    555                     $content .= '<span id="post_author_modify_dat">';
     565                    $content .= '<span class="post_author_modify_dat">';
    556566                    if( $modified_author == $author OR $options['post_author_modify_author'] != 'on')
    557567                    {
     
    602612    $modified_author = get_the_modified_author();
    603613
    604    
    605614
    606615    if( ((is_home() && !($options['post_author_cat_home'] == 'on')) || is_category()) && ($options['post_author_type_cat'] == 'on') )
     
    10711080            </p>
    10721081            <p class="submit">
    1073                 <input name="Submit" type="submit" class="button-primary" value="Save changes" />
     1082                <input name="Submit" type="submit" class="button-primary" value="<?php _e('Save changes', 'post_author') ?>" />
    10741083            </p>
    10751084           
  • post-author/trunk/readme.txt

    r630645 r854244  
    44Tags: author, post author, page author, content, date, publication date, update, editing date, revision date
    55Requires at least: 3.2
    6 Tested up to: 3.4.2
    7 Stable tag: 1.0
     6Tested up to: 3.8.1
     7Stable tag: 1.1
    88License: GPLv2 or later
    99
    10 Add name of author - good if you have multiple authors - at the beginning or end of content / excerpt / home / archive category, with lots of options.
     10Display author, writing and editing date - fully customizable for content, excerpt, home, archive... with exceptions. Great for multi-author websites.
    1111
    1212== Description ==
     
    3737* Lastly, information is displayed in nested `div` and `span` so it is CSS ready, just up to you to do the styling to your taste. See the screenshots.
    3838* Integrates great with qTranslate for multilingual or international blogs, using [Quicktags](http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=3&p=15#p15)
    39 * Available in English, French, Belarusian (credit [Marcis Gasuns](http://pc.de/)), German (credit [Rian Kremer](http://diensten.kiwa.nl/mvo)), Hebrew (credit [Sagive](http://www.sagive.co.il)) and Romanian (credit Luke Tyler).
     39* Available in English, French, Belarusian (credit [Marcis Gasuns](http://pc.de/)), German (credit [Rian Kremer](http://diensten.kiwa.nl/mvo)), Hebrew (credit [Sagive](http://www.sagive.co.il)), Romanian (credit Luke Tyler), Slovak (credit [Branco Radenovich](http://webhostinggeeks.com/user-reviews/)) and Farsi (credit [Hamed Nourhani](http://www.itstar.ir)).
    4040
    41 *Notice*: Please, after you download the plugin, TRANSLATE it, HELP debug by reporting anything going wrong, but mostly if you like it, RATE IT!
    4241
    4342
     
    8786* Requires WP >= 3.2
    8887
     88= 1.1 =
     89* Improvement : Updated the method for loading translation files.
     90* Improvement : Some frontend CSS id/class declaration updates.
     91* Improvement : Added Slovak translation, thanks to [Branco Radenovich](http://webhostinggeeks.com/user-reviews/).
     92* Improvement : Added Farsi translation, thanks to [Hamed Nourhani](http://www.itstar.ir).
     93
    8994= 1.0 =
    9095* Improvement : Added the choice of default WP author posts list or custom author profile URL to use as the link on the author's name.
Note: See TracChangeset for help on using the changeset viewer.