WordPress.org

Plugin Directory

Changeset 1589171


Ignore:
Timestamp:
02/05/17 03:47:11 (10 months ago)
Author:
desrosj
Message:

Add support for translate.wordpress.org.

Location:
post-type-spotlight/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • post-type-spotlight/trunk/post-type-spotlight.php

    r1392110 r1589171  
    44Plugin URI: https://wordpress.org/plugins/post-type-spotlight/ 
    55Description: Allows admin chosen post types to have a featured post check box on the edit screen. Also adds appropriate classes to front end post display, and allows featured posts to be queried via a taxonomy query. 
    6 Version: 2.1.4 
     6Version: 2.1.5 
    77Author: Linchpin 
    88Author URI: http://linchpin.agency/?utm_source=post-type-spotlight&utm_medium=plugin-admin-page&utm_campaign=wp-plugin 
    99License: GPLv2 
     10Text Domain: post-type-spotlight 
     11Domain Path: /languages 
    1012*/ 
    1113 
     
    2628         */ 
    2729        function __construct() { 
     30            add_action( 'plugins_loaded',  array( $this, 'plugins_loaded' ) ); 
    2831            add_action( 'init',            array( $this, 'init' ) ); 
    2932            add_action( 'widgets_init',    array( $this, 'widgets_init' ) ); 
     
    3740 
    3841            $this->doing_upgrades = false; 
     42        } 
     43 
     44        function plugins_loaded() { 
     45            load_plugin_textdomain( 'post-type-spotlight', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' ); 
    3946        } 
    4047 
     
    8693 
    8794            //add a section for the plugin's settings on the writing page 
    88             add_settings_section( 'pts_featured_posts_settings_section', 'Featured Post Types', array( $this, 'settings_section_text' ), 'writing' ); 
     95            add_settings_section( 'pts_featured_posts_settings_section', __( 'Featured Post Types', 'post-type-spotlight' ), array( $this, 'settings_section_text' ), 'writing' ); 
    8996 
    9097            //For each post type add a settings field, excluding revisions and nav menu items 
     
    167174            global $new_whitelist_options; 
    168175 
    169             echo "<p>Select which post types can be featured.</p>"; 
     176            echo '<p>' . __( 'Select which post types can be featured.', 'post-type-spotlight' ) . '</p>'; 
    170177        } 
    171178 
     
    252259 
    253260            return array_merge( $columns, array( 
    254                 'lp-featured' => __( 'Featured' ), 
    255                 'date' => __( 'Date' ), 
     261                'lp-featured' => __( 'Featured', 'post-type-spotlight' ), 
     262                'date' => __( 'Date', 'post-type-spotlight' ), 
    256263            ) ); 
    257264        } 
  • post-type-spotlight/trunk/pts-featured-posts-widget.php

    r1346786 r1589171  
    1919        $this->featured_post_types = (array) get_option( 'pts_featured_post_types_settings' ); 
    2020 
    21         parent::__construct( 'pts_featured_posts_widget', 'Featured Posts Widget', array( 'description' => 'Featured Posts Widget' ) ); 
     21        parent::__construct( 'pts_featured_posts_widget', __( 'Featured Posts Widget', 'post-type-spotlight' ), array( 'description' => __( 'Featured Posts Widget', 'post-type-spotlight' ) ) ); 
    2222    } 
    2323 
     
    114114 
    115115        if ( empty( $this->featured_post_types ) ) { ?> 
    116             <p>You need to select a featured post type on the <a href="<?php echo admin_url( 'options-writing.php' ); ?>">Settings->Writing screen</a> before you can use this widget.</p><?php 
     116            <p><?php printf( __( 'You need to select a featured post type on the <a href="%s">Settings->Writing screen</a> before you can use this widget.', 'post-type-spotlight' ), esc_url( admin_url( 'options-writing.php' ) ) ); ?></p><?php 
    117117 
    118118        } else { ?> 
    119119 
    120120            <p> 
    121                 <label for="<?php echo $this->get_field_id( 'title' ); ?>">Title:</label> 
     121                <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title', 'post-type-spotlight' ); ?>:</label> 
    122122                <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /> 
    123123            </p> 
    124124 
    125125            <p> 
    126                 <label for="<?php echo $this->get_field_id( 'post_type' ); ?>">Post type to feature:</label> 
     126                <label for="<?php echo $this->get_field_id( 'post_type' ); ?>"><?php _e( 'Post type to feature', 'post-type-spotlight' ); ?>:</label> 
    127127                <select id="<?php echo $this->get_field_id( 'post_type' ); ?>" name="<?php echo $this->get_field_name( 'post_type' ); ?>" class="widefat"> 
    128                     <option value="">Select post type...</option> 
     128                    <option value=""><?php _e( 'Select post type', 'post-type-spotlight' ); ?>...</option> 
    129129                    <?php 
    130130                        foreach ( $this->featured_post_types as $pt ) { 
     
    138138 
    139139            <p> 
    140                 <label for="<?php echo $this->get_field_id( 'number' ); ?>">Number of Posts:</label> 
     140                <label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of Posts', 'post-type-spotlight' ); ?>:</label> 
    141141                <input size="2" id="<?php echo $this->get_field_id( 'number' ); ?>" name="<?php echo $this->get_field_name( 'number' ); ?>" type="text" value="<?php echo esc_attr( $number ); ?>" /> 
    142142            </p> 
  • post-type-spotlight/trunk/readme.txt

    r1392110 r1589171  
    6565 
    6666== Changelog == 
     67= 2.1.5 = 
     68* Add support for translate.wordpress.org. 
     69 
    6770= 2.1.4 = 
    6871* Don’t show the featured taxonomy on nav menu edit areas. 
Note: See TracChangeset for help on using the changeset viewer.