WordPress.org

Plugin Directory

Changeset 1660709


Ignore:
Timestamp:
05/19/17 08:26:48 (5 weeks ago)
Author:
ThemeZee
Message:

Added settings to change titles of yearly and daily archives

Location:
custom-archive-titles/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • custom-archive-titles/trunk/custom-archive-titles.php

    r1553521 r1660709  
    66Author: ThemeZee 
    77Author URI: https://themezee.com/ 
    8 Version: 1.0.1 
     8Version: 1.1 
    99Text Domain: custom-archive-titles 
    1010Domain Path: /languages/ 
     
    1313 
    1414ThemeZee Custom Archive Titles 
    15 Copyright(C) 2016, ThemeZee.com - support@themezee.com 
     15Copyright(C) 2017, ThemeZee.com - support@themezee.com 
    1616 
    1717*/ 
     
    6565 
    6666        // Define Version Number. 
    67         define( 'TZCAT_VERSION', '1.0.1' ); 
     67        define( 'TZCAT_VERSION', '1.1' ); 
    6868 
    6969        // Plugin Folder Path. 
     
    149149            $title = sprintf( esc_html( $options['author_title'] ), '<span class="vcard">' . get_the_author() . '</span>' ); 
    150150 
     151        } elseif ( is_year() && $default_settings['year_title'] !== $options['year_title'] ) { 
     152 
     153            // Change Yearly Archive Title. 
     154            $title = sprintf( esc_html( $options['year_title'] ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) ); 
     155 
    151156        } elseif ( is_month() && $default_settings['month_title'] !== $options['month_title'] ) { 
    152157 
    153158            // Change Monthly Archive Title. 
    154159            $title = sprintf( esc_html( $options['month_title'] ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) ); 
     160 
     161        } elseif ( is_day() && $default_settings['day_title'] !== $options['day_title'] ) { 
     162 
     163            // Change Daily Archive Title. 
     164            $title = sprintf( esc_html( $options['day_title'] ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) ); 
    155165 
    156166        } 
  • custom-archive-titles/trunk/includes/class-tzcat-settings.php

    r1553521 r1660709  
    8888            'tag_title'      => __( 'Tag: %s' ), 
    8989            'author_title'   => __( 'Author: %s' ), 
     90            'year_title'     => __( 'Year: %s' ), 
    9091            'month_title'    => __( 'Month: %s' ), 
     92            'day_title'      => __( 'Day: %s' ), 
    9193        ); 
    9294 
     
    245247                'default' => $default_settings['author_title'], 
    246248            ), 
     249            'year_title' => array( 
     250                'name' => esc_html__( 'Yearly Archives', 'custom-archive-titles' ), 
     251                'desc' => esc_html__( 'Enter the title which is displayed on yearly archives. %s will be replaced with the year.', 'custom-archive-titles' ), 
     252                'section' => 'general', 
     253                'type' => 'text', 
     254                'size' => 'regular', 
     255                'default' => $default_settings['year_title'], 
     256            ), 
    247257            'month_title' => array( 
    248258                'name' => esc_html__( 'Monthly Archives', 'custom-archive-titles' ), 
     
    252262                'size' => 'regular', 
    253263                'default' => $default_settings['month_title'], 
     264            ), 
     265            'day_title' => array( 
     266                'name' => esc_html__( 'Daily Archives', 'custom-archive-titles' ), 
     267                'desc' => esc_html__( 'Enter the title which is displayed on daily archives. %s will be replaced with the date.', 'custom-archive-titles' ), 
     268                'section' => 'general', 
     269                'type' => 'text', 
     270                'size' => 'regular', 
     271                'default' => $default_settings['day_title'], 
    254272            ), 
    255273            'reset' => array( 
  • custom-archive-titles/trunk/languages/custom-archive-titles.pot

    r1553521 r1660709  
    44"Project-Id-Version: Custom Archive Titles\n" 
    55"Report-Msgid-Bugs-To: https://themezee.com/\n" 
    6 "POT-Creation-Date: 2016-12-13 11:15+0100\n" 
     6"POT-Creation-Date: 2017-05-19 10:25+0200\n" 
    77"PO-Revision-Date: 2015-12-29 14:54+0100\n" 
    88"Last-Translator: \n" 
     
    1212"Content-Type: text/plain; charset=UTF-8\n" 
    1313"Content-Transfer-Encoding: 8bit\n" 
    14 "X-Generator: Poedit 1.8.11\n" 
     14"X-Generator: Poedit 1.8.12\n" 
    1515"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;" 
    1616"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;" 
     
    2323 
    2424#: custom-archive-titles.php:154 
     25msgctxt "yearly archives date format" 
     26msgid "Y" 
     27msgstr "" 
     28 
     29#: custom-archive-titles.php:159 
    2530msgctxt "monthly archives date format" 
    2631msgid "F Y" 
    2732msgstr "" 
    2833 
    29 #: custom-archive-titles.php:168 
     34#: custom-archive-titles.php:164 
     35msgctxt "daily archives date format" 
     36msgid "F j, Y" 
     37msgstr "" 
     38 
     39#: custom-archive-titles.php:178 
    3040msgid "Settings" 
    3141msgstr "" 
     
    5464#: includes/class-tzcat-settings.php:90 
    5565#, php-format 
     66msgid "Year: %s" 
     67msgstr "" 
     68 
     69#: includes/class-tzcat-settings.php:91 
     70#, php-format 
    5671msgid "Month: %s" 
    5772msgstr "" 
    5873 
    59 #: includes/class-tzcat-settings.php:109 
     74#: includes/class-tzcat-settings.php:92 
     75#, php-format 
     76msgid "Day: %s" 
     77msgstr "" 
     78 
     79#: includes/class-tzcat-settings.php:111 
    6080msgid "Archive Titles" 
    6181msgstr "" 
    6282 
    63 #: includes/class-tzcat-settings.php:224 
     83#: includes/class-tzcat-settings.php:226 
    6484msgid "Category Archives" 
    6585msgstr "" 
    6686 
    67 #: includes/class-tzcat-settings.php:225 
     87#: includes/class-tzcat-settings.php:227 
    6888#, php-format 
    6989msgid "" 
     
    7292msgstr "" 
    7393 
    74 #: includes/class-tzcat-settings.php:232 
     94#: includes/class-tzcat-settings.php:234 
    7595msgid "Tag Archives" 
    7696msgstr "" 
    7797 
    78 #: includes/class-tzcat-settings.php:233 
     98#: includes/class-tzcat-settings.php:235 
    7999#, php-format 
    80100msgid "" 
     
    83103msgstr "" 
    84104 
    85 #: includes/class-tzcat-settings.php:240 
     105#: includes/class-tzcat-settings.php:242 
    86106msgid "Author Archives" 
    87107msgstr "" 
    88108 
    89 #: includes/class-tzcat-settings.php:241 
     109#: includes/class-tzcat-settings.php:243 
    90110#, php-format 
    91111msgid "" 
     
    94114msgstr "" 
    95115 
    96 #: includes/class-tzcat-settings.php:248 
     116#: includes/class-tzcat-settings.php:250 
     117msgid "Yearly Archives" 
     118msgstr "" 
     119 
     120#: includes/class-tzcat-settings.php:251 
     121#, php-format 
     122msgid "" 
     123"Enter the title which is displayed on yearly archives. %s will be replaced " 
     124"with the year." 
     125msgstr "" 
     126 
     127#: includes/class-tzcat-settings.php:258 
    97128msgid "Monthly Archives" 
    98129msgstr "" 
    99130 
    100 #: includes/class-tzcat-settings.php:249 
     131#: includes/class-tzcat-settings.php:259 
    101132#, php-format 
    102133msgid "" 
     
    105136msgstr "" 
    106137 
    107 #: includes/class-tzcat-settings.php:256 
     138#: includes/class-tzcat-settings.php:266 
     139msgid "Daily Archives" 
     140msgstr "" 
     141 
     142#: includes/class-tzcat-settings.php:267 
     143#, php-format 
     144msgid "" 
     145"Enter the title which is displayed on daily archives. %s will be replaced " 
     146"with the date." 
     147msgstr "" 
     148 
     149#: includes/class-tzcat-settings.php:274 
    108150msgid "Reset to default values" 
    109151msgstr "" 
    110152 
    111 #: includes/class-tzcat-settings.php:378 
     153#: includes/class-tzcat-settings.php:396 
    112154msgid "Reset" 
    113155msgstr "" 
    114156 
    115 #: includes/class-tzcat-settings.php:393 
     157#: includes/class-tzcat-settings.php:411 
    116158#, php-format 
    117159msgid "" 
  • custom-archive-titles/trunk/readme.txt

    r1553521 r1660709  
    55Tags: archive, title, heading, custom, category, tag, author 
    66Requires at least: 4.4 
    7 Tested up to: 4.7 
    8 Stable tag: 1.0.1 
     7Tested up to: 4.8 
     8Stable tag: 1.1 
    99License: GPLv2 or later 
    1010 
     
    2020* Tag Archives (Tag: %s) 
    2121* Author Archives (Author: %s) 
     22* Yearly Archives (Year: %s) 
    2223* Monthly Archives (Month: %s) 
     24* Daily Archives (Day: %s) 
    2325 
    2426= Examples = 
     
    4345== Changelog == 
    4446 
     47= 1.1 = 
     48 
     49* Added settings to change titles of yearly and daily archives 
     50 
    4551= 1.0.1 = 
    4652 
Note: See TracChangeset for help on using the changeset viewer.