Plugin Directory

Changeset 3461849


Ignore:
Timestamp:
02/15/2026 02:05:54 PM (6 weeks ago)
Author:
Alphawolf
Message:

Version 2.2.4 update:

  • Split german translation into informal and formal
  • WordPress 6.9 compatibility
  • Code improvements
Location:
simple-yearly-archive/trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • simple-yearly-archive/trunk/languages/simple-yearly-archive-de_DE.po

    r1567410 r3461849  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2017-01-03 20:30+0000\n"
    6 "PO-Revision-Date: 2017-01-03 20:30+0000\n"
     6"PO-Revision-Date: 2025-10-07 15:51+0200\n"
    77"Last-Translator: Alphawolf <scripts@schloebe.de>\n"
    88"Language-Team: German\n"
     9"Language: de_DE\n"
    910"MIME-Version: 1.0\n"
    1011"Content-Type: text/plain; charset=UTF-8\n"
    1112"Content-Transfer-Encoding: 8bit\n"
    12 "Plural-Forms: nplurals=2; plural=n != 1\n"
    13 "X-Generator: Loco - https://localise.biz/\n"
    14 "X-Poedit-Language: German\n"
    15 "X-Poedit-Country: GERMANY\n"
     13"Plural-Forms: nplurals=2; plural=n != 1;\n"
     14"X-Generator: Poedit 3.6\n"
    1615"X-Poedit-SourceCharset: utf-8\n"
    17 "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
    18 "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
     16"X-Poedit-KeywordsList: "
     17"__;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
    1918"X-Poedit-Basepath: .\n"
    2019"X-Poedit-Bookmarks: \n"
    21 "X-Poedit-SearchPath-0: D:"
    22 "/schloebeweb/xampp/htdocs/wordpresssource/plugins/simple-yearly-archive\n"
    2320"X-Textdomain-Support: yes\n"
    24 "Language: de-DE"
     21"X-Poedit-SearchPath-0: D:/schloebeweb/xampp/htdocs/wordpresssource/plugins/"
     22"simple-yearly-archive\n"
    2523
    2624#: admin/views/admin.php:138
     
    146144#: admin/views/admin.php:240
    147145msgid "You may also be interested in some of my other plugins:"
    148 msgstr "Es könnten Sie ebenfalls einige meiner weiteren Plugins interessieren:"
     146msgstr ""
     147"Es könnten Dich ebenfalls einige meiner weiteren Plugins interessieren:"
    149148
    150149#: admin/views/admin.php:241
     
    154153#: admin/views/admin.php:254
    155154msgid ""
    156 "More plugins at: <a class=\"button rbutton\" href=\"http://www.schloebe."
    157 "de/portfolio/\" target=\"_blank\">www.schloebe.de</a>"
     155"More plugins at: <a class=\"button rbutton\" href=\"http://www.schloebe.de/"
     156"portfolio/\" target=\"_blank\">www.schloebe.de</a>"
    158157msgstr ""
    159 "Mehr Plugins auf: <a class=\"button rbutton\" href=\"http://www.schloebe."
    160 "de/portfolio/\" target=\"_blank\">www.schloebe.de</a>"
     158"Mehr Plugins auf: <a class=\"button rbutton\" href=\"http://www.schloebe.de/"
     159"portfolio/\" target=\"_blank\">www.schloebe.de</a>"
    161160
    162161#: admin/views/admin.php:263
     
    167166msgid ""
    168167"If you are new to using this plugin or cant understand what all these "
    169 "settings do, please read the documentation at <a href=\"http://www.schloebe."
    170 "de/wordpress/simple-yearly-archive-plugin/\" target=\"_blank\">http://www."
    171 "schloebe.de/wordpress/simple-yearly-archive-plugin/</a>"
     168"settings do, please read the documentation at <a href=\"http://"
     169"www.schloebe.de/wordpress/simple-yearly-archive-plugin/\" "
     170"target=\"_blank\">http://www.schloebe.de/wordpress/simple-yearly-archive-"
     171"plugin/</a>"
    172172msgstr ""
    173 "Falls Sie dieses Plugin zum ersten Mal benutzen und nicht wissen, was all "
    174 "diese Optionen machen, schauen Sie bitte in die Dokumentation auf <a "
    175 "href=\"http://www.schloebe.de/wordpress/simple-yearly-archive-plugin/\" "
     173"Falls Du dieses Plugin zum ersten Mal benutzt und nicht weißt, was all diese "
     174"Optionen machen, schaue bitte in die Dokumentation auf <a href=\"http://"
     175"www.schloebe.de/wordpress/simple-yearly-archive-plugin/\" "
    176176"target=\"_blank\">http://www.schloebe.de/wordpress/simple-yearly-archive-"
    177177"plugin/</a>"
  • simple-yearly-archive/trunk/readme.txt

    r3271921 r3461849  
    44Tags: gettext, archive, archives, wpml, wp_query
    55Requires at least: 3.7
    6 Tested up to: 6.8.99
     6Tested up to: 6.9.99
    77Stable tag: trunk
    88License: GPLv2 or later
     
    2121* English
    2222* German (de_DE) (Thanks to me ;-))
     23* German (de_DE_formal) (Thanks for contributing formal german language goes to [Paul Vogel](https://github.com/pavog))
    2324* Italian (it_IT) (Thanks for contributing italian language goes to [Gianni Diurno](https://gidibao.net))
    2425* Russian (ru_RU) (Thanks for contributing russian language goes to [Dimitry German](https://grugl.me))
     
    3435[Click here for a demo](https://www.schloebe.de/archiv/ "Click here for a demo")
    3536
    36 [Developer on Twitter](https://twitter.com/wpseek "Developer on Twitter")
     37[Developer on X](https://x.com/wpseek "Developer on X") [Developer on Bluesky](https://bsky.app/profile/cyberblitzbirne.bsky.social "Developer on Bluesky")
    3738
    3839**Looking for more WordPress plugins? Visit [www.schloebe.de/portfolio/](https://www.schloebe.de/portfolio/)**
     
    259260== Changelog ==
    260261
     262= 2.2.4 =
     263* Split german translation into informal and formal
     264* WordPress 6.9 compatibility
     265* Code improvements
     266
    261267= 2.2.3 =
    262268* WordPress 6.7 compatibility
  • simple-yearly-archive/trunk/simple-yearly-archive.php

    r3215712 r3461849  
    22/*
    33 * Plugin Name: Simple Yearly Archive
    4  * Version: 2.2.3
     4 * Version: 2.2.4
    55 * Plugin URI: https://www.schloebe.de/wordpress/simple-yearly-archive-plugin/
    66 * Description: A simple, clean yearly list of your archives.
     
    1010 * Domain Path: /languages
    1111 *
    12  * Copyright 2009-2025 Oliver Schlöbe (email : wordpress@schloebe.de)
     12 * Copyright 2009-2026 Oliver Schlöbe (email : wordpress@schloebe.de)
    1313 *
    1414 * This program is free software; you can redistribute it and/or modify
     
    4646    private $slug = 'simple-yearly-archive';
    4747    private $shortcode = 'SimpleYearlyArchive';
    48     private $plugin_version = '2.2.3';
     48    private $plugin_version = '2.2.4';
    4949
    5050    /**
     
    7373        load_plugin_textdomain('simple-yearly-archive', false, dirname(plugin_basename(__FILE__)) . '/languages');
    7474       
    75         add_action('admin_enqueue_scripts', array(
     75        add_action('admin_enqueue_scripts', [
    7676            $this,
    7777            'register_scripts'
    78         ));
    79         add_action('admin_enqueue_scripts', array(
     78        ]);
     79        add_action('admin_enqueue_scripts', [
    8080            $this,
    8181            'register_styles'
    82         ));
    83        
    84         add_action('the_content', array(
     82        ]);
     83       
     84        add_action('the_content', [
     85
    8586            $this,
    8687            'parse_inline'
    87         ), 1);
    88        
    89         add_shortcode($this->shortcode, array(
     88        ], 1);
     89       
     90        add_shortcode($this->shortcode, [
    9091            $this,
    9192            'register_shortcode'
    92         ));
    93        
    94         register_activation_hook(__FILE__, array(
     93        ]);
     94       
     95        register_activation_hook(__FILE__, [
    9596            $this,
    9697            'activation'
    97         ));
    98         register_deactivation_hook(__FILE__, array(
     98        ]);
     99        register_deactivation_hook(__FILE__, [
    99100            $this,
    100101            'deactivation'
    101         ));
     102        ]);
    102103       
    103104        $this->run();
     
    124125        $this->post_type_array = array_map('trim', explode(',', $posttype));
    125126       
    126         $allcatids = get_terms('category', array(
     127        $allcatids = get_terms('category', [
    127128            'fields' => 'ids'
    128         ));
     129        ]);
    129130        $sya_post_types = array_keys(get_post_types());
    130131        $output = '';
     
    155156        (in_array('attachment', $this->post_type_array) ? array_push($this->post_status, 'inherit') : '');
    156157       
    157         $syaargs = array(
     158        $syaargs = [
    158159            'no_found_rows' => 1,
    159160            'post_type' => $this->post_type_array,
     
    163164            'order' => $this->sort_order,
    164165            'suppress_filters' => false
    165         );
    166        
    167         $syaargs_filter = array();
     166        ];
     167       
     168        $syaargs_filter = [];
    168169        $syaargs_filter = apply_filters("sya_get_posts", $syaargs_filter);
    169170       
     
    176177        $syaposts = get_posts($syaargs);
    177178       
    178         $jmb = array();
     179        $jmb = [];
    179180        foreach ($syaposts as $jahrMitBeitrag) {
    180181            $jmb[] = date('Y', strtotime($jahrMitBeitrag->post_date));
     
    216217                        }
    217218                       
    218                         $entryclass = array();
     219                        $entryclass = [];
    219220                       
    220221                        $entryclass[] = '';
     
    238239                        }
    239240                        if (get_option('sya_show_categories') == true) {
    240                             $sya_categories = array();
     241                            $sya_categories = [];
    241242                            foreach (wp_get_post_categories($syapost->ID) as $cat_id) {
    242243                                $sya_categories[$cat_id] = get_cat_name($cat_id);
     
    248249                        }
    249250                        if (get_option('sya_show_tags') == true) {
    250                             $sya_tags = array();
     251                            $sya_tags = [];
    251252                            foreach (wp_get_post_tags($syapost->ID) as $tag) {
    252253                                $sya_tags[$tag->term_id] = get_tag($tag)->name;
     
    342343        global $wpdb;
    343344       
    344         $allposts = array();
     345        $allposts = [];
    345346        $_post_status = "'" . join("','", $this->post_status) . "'";
    346347       
     
    351352            $_year = date('Y', strtotime($syapost->post_date));
    352353           
    353             $_query = array();
     354            $_query = [];
    354355            $_query[] = 'SELECT post.ID, post.post_title, post.post_date, YEAR(post.post_date) as post_year, post.post_status, post.comment_count, post.comment_status, post.post_author, post.post_excerpt, term_rel.term_taxonomy_id';
    355356            if (defined('ICL_LANGUAGE_CODE') && ! defined('POLYLANG_VERSION')) {
     
    390391    public function get_archive_post_statuses()
    391392    {
    392         return (current_user_can('read_private_posts')) ? array(
     393        return (current_user_can('read_private_posts')) ? [
    393394            'private',
    394395            'publish'
    395         ) : array(
     396        ] : [
    396397            'publish'
    397         );
     398        ];
    398399    }
    399400
     
    425426            $syaargs['year'] = date('Y');
    426427        } elseif ($format == 'yearly_past') {
    427             $syaargs['date_query']['before'] = array(
     428            $syaargs['date_query']['before'] = [
    428429                'year' => date('Y') - 1,
    429430                'month' => 12,
    430431                'day' => 31
    431             );
     432            ];
    432433            $syaargs['date_query']['inclusive'] = true;
    433434        } elseif (preg_match("/^([0-9]{1,})-([0-9]{1,})/", $format)) {
     
    436437            $date_to = $from_to_arr[2] + $this->gmt_offset;
    437438           
    438             $syaargs['date_query']['after'] = array(
     439            $syaargs['date_query']['after'] = [
    439440                'year' => date('Y', $date_from),
    440441                'month' => date('m', $date_from),
    441442                'day' => date('d', $date_from)
    442             );
    443             $syaargs['date_query']['before'] = array(
     443            ];
     444            $syaargs['date_query']['before'] = [
    444445                'year' => date('Y', $date_to),
    445446                'month' => date('m', $date_to),
    446447                'day' => date('d', $date_to)
    447             );
     448            ];
    448449            $syaargs['date_query']['inclusive'] = true;
    449450        } elseif (preg_match("/^[0-9]{4}$/", $format)) {
     
    463464    public function get_overview($yeararray)
    464465    {
    465         $years = array();
     466        $years = [];
    466467        foreach ($yeararray as $year) {
    467468            $years[] = '<a href="#year' . $year . '">' . $year . '</a>';
     
    501502    public function register_shortcode($atts)
    502503    {
    503         extract(shortcode_atts(array(
     504        extract(shortcode_atts([
    504505            'type' => 'yearly',
    505506            'exclude' => '',
     
    507508            'posttype' => 'post',
    508509            'dateformat' => ''
    509         ), $atts, $this->shortcode));
     510        ], $atts, $this->shortcode));
    510511       
    511512        return $this->get($type, $exclude, $include, $posttype, $dateformat);
     
    657658}
    658659
    659 add_action('plugins_loaded', array(
     660add_action('plugins_loaded', [
    660661    'SimpleYearlyArchive',
    661662    'get_instance'
    662 ));
     663]);
    663664
    664665if (is_admin() && (! defined('DOING_AJAX') || ! DOING_AJAX)) {
    665666    require_once(plugin_dir_path(__FILE__) . 'admin/simple-yearly-archive-admin.php');
    666     add_action('plugins_loaded', array(
     667    add_action('plugins_loaded', [
    667668        'SimpleYearlyArchive_Admin',
    668669        'get_instance'
    669     ));
     670    ]);
    670671    require_once(plugin_dir_path(__FILE__) . 'admin/authorplugins.inc.php');
    671672}
Note: See TracChangeset for help on using the changeset viewer.