Plugin Directory

Changeset 1995258


Ignore:
Timestamp:
12/15/2018 12:57:46 AM (7 years ago)
Author:
albertochoa
Message:

Version 0.3.0

Location:
listing-posts-type
Files:
4 added
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • listing-posts-type/tags/0.3.0/languages/listing-posts-type-es_ES.po

    r271722 r1995258  
    99"Language-Team: \n"
    1010"MIME-Version: 1.0\n"
    11 "X-Poedit-Language: Spanish\n"
    12 "X-Poedit-Country: SPAIN\n"
     11"Language: es_ES\n"
     12"X-Generator: Poedit 2.2\n"
    1313
    1414msgid "Recent Posts Type"
    15 msgstr "Posts Type Recientes"
     15msgstr "Tipo de publicaciones recientes"
    1616
    1717msgid "Display the most recent Custom Posts Type in the sidebar."
    18 msgstr "Muestra los más recientes Custom Post Type en la barra."
     18msgstr "Muestra las más recientes publicaciones personalizadas en la barra."
    1919
    2020msgid "Number of posts to show:"
    21 msgstr "Número de Posts Type a mostrar:"
     21msgstr "Número de publicaciones a mostrar:"
    2222
    2323msgid "Posts Type"
     
    2525
    2626msgid "Title:"
    27 msgstr "Título:"
    28 
     27msgstr "Título:"
  • listing-posts-type/tags/0.3.0/listing-posts-type.php

    r629981 r1995258  
    22/**
    33 * Plugin Name: Listing Posts Type
    4  * Plugin URI: https://github.com/niftytheme/listing-posts-type
     4 * Plugin URI: https://wordpress.org/plugins/listing-posts-type/
    55 * Description: Display the most recent Custom Posts Type in the sidebar.
    6  * Version: 0.2.1
    7  * Author: Luis Alberto Ochoa
    8  * Author URI: http://luisalberto.org
    9  *
    10  * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
    11  * General Public License version 2, as published by the Free Software Foundation. You may NOT assume
    12  * that you can use any other version of the GPL.
    13  *
    14  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
    15  * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    16  *
    17  * You should have received a copy of the GNU General Public License along with this program; if not, write
    18  * to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    19  *
    20  * @package Listing Posts Type
    21  * @version 0.2.1
    22  * @link http://snippets-tricks.org/proyectos/listing-posts-type-plugin/
    23  * @author Luis Alberto Ochoa Esparza <[email protected]>
    24  * @copyright Copyright (C) 2010-2012, Luis Alberto Ochoa Esparza
    25  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     6 * Version: 0.3.0
     7 * Author: Luis A. Ochoa
     8 * Author URI: https://gitlab.com/albertochoa
     9 *
     10 * Display the most recent Custom Posts Type in the sidebar.
     11 * Copyright (C) 2010-2018 Luis A. Ochoa
     12 *
     13 * This program is free software; you can redistribute it and/or modify
     14 * it under the terms of the GNU General Public License as published by
     15 * the Free Software Foundation; either version 2 of the License, or
     16 * (at your option) any later version.
     17 *
     18 * This program is distributed in the hope that it will be useful,
     19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     21 * GNU General Public License for more details.
     22 *
     23 * You should have received a copy of the GNU General Public License along
     24 * with this program; if not, write to the Free Software Foundation, Inc.,
     25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    2626 */
    2727
     
    5454    $r = wp_parse_args( $args, $defaults );
    5555
    56     if ( !$number = (int) $r['number'] )
     56    if ( !$number = (int) $r['number'] ) {
    5757        $number = 10;
    58 
    59     else if ( $number < 1 )
     58    } else if ( $number < 1 ) {
    6059        $number = 1;
    61 
    62     else if ( $number > 15 )
     60    } else if ( $number > 15 ) {
    6361        $number = 15;
    64 
    65     /**
    66      * TODO: Eliminar el argumento 'caller_get_posts' a favor de 'ignore_sticky_posts'
    67      * cuendo se elimine el soporte a WordPress 3.0.
    68      */
     62    }
     63
    6964    $r_query = new WP_Query( array(
    7065        'post_type'           => $r['post_type'],
     
    7267        'nopaging'            => 0,
    7368        'post_status'         => $r['status'],
    74         'caller_get_posts'    => 1, /* This line will be removed in the future. */
    75         'ignore_sticky_posts' => 1  /* WordPress 3.1+ */
     69        'ignore_sticky_posts' => 1
    7670    ) );
    7771
     
    125119        $cache = wp_cache_get( 'widget_recent_post_type', 'widget' );
    126120
    127         if ( !is_array( $cache ) )
     121        if ( !is_array( $cache ) ) {
    128122            $cache = array();
     123        }
    129124
    130125        if ( isset( $cache[$args['widget_id']] ) ) {
     
    138133        $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Recent Posts Type', 'listing-posts-type' ) : $instance['title'], $instance, $this->id_base );
    139134
    140         if ( !$number = (int) $instance['number'] )
     135        if ( !$number = (int) $instance['number'] ) {
    141136            $number = 10;
    142 
    143         else if ( $number < 1 )
     137        } else if ( $number < 1 ) {
    144138            $number = 1;
    145 
    146         else if ( $number > 15 )
     139        } else if ( $number > 15 ) {
    147140            $number = 15;
    148 
    149         /**
    150          * TODO: Eliminar el argumento 'caller_get_posts' a favor de 'ignore_sticky_posts'
    151          * cuendo se elimine el soporte a WordPress 3.0.
    152          */
     141        }
     142
    153143        $r = new WP_Query( array(
    154144            'post_type'           => $instance['recent_post_type'],
     
    156146            'nopaging'            => 0,
    157147            'post_status'         => 'publish',
    158             'caller_get_posts'    => 1, /* This line will be removed in the future. */
    159             'ignore_sticky_posts' => 1  /* WordPress 3.1+ */
     148            'ignore_sticky_posts' => 1
    160149        ) );
    161150
     
    188177        $alloptions = wp_cache_get( 'alloptions', 'options' );
    189178
    190         if ( isset( $alloptions['widget_recent_post_type'] ) )
     179        if ( isset( $alloptions['widget_recent_post_type'] ) ) {
    191180            delete_option( 'widget_recent_post_type' );
     181        }
    192182
    193183        return $instance;
     
    203193        $recent_post_type = isset( $instance['recent_post_type'] ) ? $instance['recent_post_type'] : '';
    204194
    205         if ( !isset( $instance['number'] ) || !$number = (int) $instance['number'] )
    206             $number = 5; ?>
     195        if ( !isset( $instance['number'] ) || !$number = (int) $instance['number'] ) {
     196            $number = 5;
     197        } ?>
    207198
    208199        <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'listing-posts-type' ); ?></label>
  • listing-posts-type/tags/0.3.0/readme.txt

    r629981 r1995258  
    22Contributors: albertochoa
    33Tags: recent post, post, post type, custom post types, sidebar, widget, template, recent
    4 Requires at least: 3.0
    5 Tested up to: 3.5
    6 Stable tag: 0.2.1
     4Requires at least: 3.1
     5Tested up to: 5.0
     6Stable tag: 0.3.0
    77
    88== Description ==
     
    1616* English - (en_EN)
    1717* Spanish - (es_ES)
     18* Spanish - (es_MX)
    1819
    1920== Installation ==
     
    3536== Changelog ==
    3637
     38= 0.3.0 =
     39* Tested in WordPress 5.0
     40* Code cleanup
     41
    3742= 0.2.1 =
    3843* Tested in WordPress 3.5
  • listing-posts-type/trunk/languages/listing-posts-type-es_ES.po

    r271722 r1995258  
    99"Language-Team: \n"
    1010"MIME-Version: 1.0\n"
    11 "X-Poedit-Language: Spanish\n"
    12 "X-Poedit-Country: SPAIN\n"
     11"Language: es_ES\n"
     12"X-Generator: Poedit 2.2\n"
    1313
    1414msgid "Recent Posts Type"
    15 msgstr "Posts Type Recientes"
     15msgstr "Tipo de publicaciones recientes"
    1616
    1717msgid "Display the most recent Custom Posts Type in the sidebar."
    18 msgstr "Muestra los m&aacute;s recientes Custom Post Type en la barra."
     18msgstr "Muestra las m&aacute;s recientes publicaciones personalizadas en la barra."
    1919
    2020msgid "Number of posts to show:"
    21 msgstr "N&uacute;mero de Posts Type a mostrar:"
     21msgstr "N&uacute;mero de publicaciones a mostrar:"
    2222
    2323msgid "Posts Type"
     
    2525
    2626msgid "Title:"
    27 msgstr "Título:"
    28 
     27msgstr "T&iacute;tulo:"
  • listing-posts-type/trunk/listing-posts-type.php

    r629981 r1995258  
    22/**
    33 * Plugin Name: Listing Posts Type
    4  * Plugin URI: https://github.com/niftytheme/listing-posts-type
     4 * Plugin URI: https://wordpress.org/plugins/listing-posts-type/
    55 * Description: Display the most recent Custom Posts Type in the sidebar.
    6  * Version: 0.2.1
    7  * Author: Luis Alberto Ochoa
    8  * Author URI: http://luisalberto.org
    9  *
    10  * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
    11  * General Public License version 2, as published by the Free Software Foundation. You may NOT assume
    12  * that you can use any other version of the GPL.
    13  *
    14  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
    15  * even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    16  *
    17  * You should have received a copy of the GNU General Public License along with this program; if not, write
    18  * to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    19  *
    20  * @package Listing Posts Type
    21  * @version 0.2.1
    22  * @link http://snippets-tricks.org/proyectos/listing-posts-type-plugin/
    23  * @author Luis Alberto Ochoa Esparza <[email protected]>
    24  * @copyright Copyright (C) 2010-2012, Luis Alberto Ochoa Esparza
    25  * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     6 * Version: 0.3.0
     7 * Author: Luis A. Ochoa
     8 * Author URI: https://gitlab.com/albertochoa
     9 *
     10 * Display the most recent Custom Posts Type in the sidebar.
     11 * Copyright (C) 2010-2018 Luis A. Ochoa
     12 *
     13 * This program is free software; you can redistribute it and/or modify
     14 * it under the terms of the GNU General Public License as published by
     15 * the Free Software Foundation; either version 2 of the License, or
     16 * (at your option) any later version.
     17 *
     18 * This program is distributed in the hope that it will be useful,
     19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     21 * GNU General Public License for more details.
     22 *
     23 * You should have received a copy of the GNU General Public License along
     24 * with this program; if not, write to the Free Software Foundation, Inc.,
     25 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    2626 */
    2727
     
    5454    $r = wp_parse_args( $args, $defaults );
    5555
    56     if ( !$number = (int) $r['number'] )
     56    if ( !$number = (int) $r['number'] ) {
    5757        $number = 10;
    58 
    59     else if ( $number < 1 )
     58    } else if ( $number < 1 ) {
    6059        $number = 1;
    61 
    62     else if ( $number > 15 )
     60    } else if ( $number > 15 ) {
    6361        $number = 15;
    64 
    65     /**
    66      * TODO: Eliminar el argumento 'caller_get_posts' a favor de 'ignore_sticky_posts'
    67      * cuendo se elimine el soporte a WordPress 3.0.
    68      */
     62    }
     63
    6964    $r_query = new WP_Query( array(
    7065        'post_type'           => $r['post_type'],
     
    7267        'nopaging'            => 0,
    7368        'post_status'         => $r['status'],
    74         'caller_get_posts'    => 1, /* This line will be removed in the future. */
    75         'ignore_sticky_posts' => 1  /* WordPress 3.1+ */
     69        'ignore_sticky_posts' => 1
    7670    ) );
    7771
     
    125119        $cache = wp_cache_get( 'widget_recent_post_type', 'widget' );
    126120
    127         if ( !is_array( $cache ) )
     121        if ( !is_array( $cache ) ) {
    128122            $cache = array();
     123        }
    129124
    130125        if ( isset( $cache[$args['widget_id']] ) ) {
     
    138133        $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Recent Posts Type', 'listing-posts-type' ) : $instance['title'], $instance, $this->id_base );
    139134
    140         if ( !$number = (int) $instance['number'] )
     135        if ( !$number = (int) $instance['number'] ) {
    141136            $number = 10;
    142 
    143         else if ( $number < 1 )
     137        } else if ( $number < 1 ) {
    144138            $number = 1;
    145 
    146         else if ( $number > 15 )
     139        } else if ( $number > 15 ) {
    147140            $number = 15;
    148 
    149         /**
    150          * TODO: Eliminar el argumento 'caller_get_posts' a favor de 'ignore_sticky_posts'
    151          * cuendo se elimine el soporte a WordPress 3.0.
    152          */
     141        }
     142
    153143        $r = new WP_Query( array(
    154144            'post_type'           => $instance['recent_post_type'],
     
    156146            'nopaging'            => 0,
    157147            'post_status'         => 'publish',
    158             'caller_get_posts'    => 1, /* This line will be removed in the future. */
    159             'ignore_sticky_posts' => 1  /* WordPress 3.1+ */
     148            'ignore_sticky_posts' => 1
    160149        ) );
    161150
     
    188177        $alloptions = wp_cache_get( 'alloptions', 'options' );
    189178
    190         if ( isset( $alloptions['widget_recent_post_type'] ) )
     179        if ( isset( $alloptions['widget_recent_post_type'] ) ) {
    191180            delete_option( 'widget_recent_post_type' );
     181        }
    192182
    193183        return $instance;
     
    203193        $recent_post_type = isset( $instance['recent_post_type'] ) ? $instance['recent_post_type'] : '';
    204194
    205         if ( !isset( $instance['number'] ) || !$number = (int) $instance['number'] )
    206             $number = 5; ?>
     195        if ( !isset( $instance['number'] ) || !$number = (int) $instance['number'] ) {
     196            $number = 5;
     197        } ?>
    207198
    208199        <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'listing-posts-type' ); ?></label>
  • listing-posts-type/trunk/readme.txt

    r629981 r1995258  
    22Contributors: albertochoa
    33Tags: recent post, post, post type, custom post types, sidebar, widget, template, recent
    4 Requires at least: 3.0
    5 Tested up to: 3.5
    6 Stable tag: 0.2.1
     4Requires at least: 3.1
     5Tested up to: 5.0
     6Stable tag: 0.3.0
    77
    88== Description ==
     
    1616* English - (en_EN)
    1717* Spanish - (es_ES)
     18* Spanish - (es_MX)
    1819
    1920== Installation ==
     
    3536== Changelog ==
    3637
     38= 0.3.0 =
     39* Tested in WordPress 5.0
     40* Code cleanup
     41
    3742= 0.2.1 =
    3843* Tested in WordPress 3.5
Note: See TracChangeset for help on using the changeset viewer.