WordPress.org

Plugin Directory

Changeset 1546730


Ignore:
Timestamp:
12/06/16 20:55:07 (10 months ago)
Author:
ChrisWiegman
Message:

Version 2.1.6

Location:
better-yourls/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • better-yourls/trunk/better-yourls.php

    r1479650 r1546730  
    44 * Plugin URI: https://wordpress.org/plugins/better-yourls/ 
    55 * Description: Replace WordPress shortlinks with custom YOURLS domain. 
    6  * Version: 2.1.5 
     6 * Version: 2.1.6 
    77 * Text Domain: better-yourls 
    88 * Domain Path: /lang 
     
    1313 */ 
    1414 
    15 define( 'BYOURLS_VERSION', '2.1.5' ); 
     15define( 'BYOURLS_VERSION', '2.1.6' ); 
    1616define( 'BYOURLS_URL', plugin_dir_url( __FILE__ ) ); 
    1717 
  • better-yourls/trunk/includes/class-better-yourls-actions.php

    r1479650 r1546730  
    99 * @since   0.0.1 
    1010 * 
    11  * @author  Chris Wiegman <chris@chriswiegman.com> 
     11 * @author  Chris Wiegman <chris@wiegman.us> 
    1212 */ 
    1313 
     
    3232     * 
    3333     * @since 0.0.1 
    34      * 
    35      * @return Better_Yourls_Actions 
    3634     */ 
    3735    public function __construct() { 
     
    126124    protected function _generate_post_on_save( $post_id ) { 
    127125 
     126        // Make sure we are originating from the right place. 
     127        if ( 
     128            ! isset( $_POST['better_yourls_nonce'] ) || // WPCS: input var ok. 
     129            ! wp_verify_nonce( $_POST['better_yourls_nonce'], 'better_yourls_save_post' ) // WPCS: input var ok. Sanitization ok. 
     130        ) { 
     131            wp_die( esc_html__( 'Security Error', 'better-yourls' ) ); 
     132        } 
     133 
    128134        $keyword = ''; 
    129135 
    130136        // Store custom keyword (if set). 
    131137        if ( isset( $_POST['better-yourls-keyword'] ) ) { // WPCS: input var ok. 
    132             $keyword = sanitize_title( trim( $_POST['better-yourls-keyword'] ) ); // WPCS: input var ok. 
     138            $keyword = sanitize_title( trim( $_POST['better-yourls-keyword'] ) ); // WPCS: input var ok. Sanitization ok. 
    133139        } 
    134140 
     
    191197 
    192198        } 
    193  
    194199    } 
    195200 
     
    561566        } 
    562567 
     568        wp_nonce_field( 'better_yourls_save_post', 'better_yourls_nonce' ); 
    563569        echo '<input type="text" id="better-yourls-keyword" name="better-yourls-keyword" style="width: 100%;" value="' . esc_url( $link ) . '" ' . esc_html( $readonly ) . '/>'; 
    564570        echo '<p><em>' . esc_html__( 'If a short-url doesn\'t yet exist for this post you can enter a keyword above. If it already exists it will be displayed.', 'better-yourls' ) . '</em></p>'; 
  • better-yourls/trunk/includes/class-better-yourls-admin.php

    r1479650 r1546730  
    99 * @since 0.0.1 
    1010 * 
    11  * @author  Chris Wiegman <chris@chriswiegman.com> 
     11 * @author  Chris Wiegman <chris@wiegman.us> 
    1212 */ 
    1313 
     
    3030     * 
    3131     * @since 0.0.1 
    32      * 
    33      * @return Better_Yourls_Admin 
    3432     */ 
    3533    public function __construct() { 
     
    5957 
    6058                wp_register_script( 'better_yourls_footer', BYOURLS_URL . 'assets/js/admin-footer.js', array( 'jquery' ), BYOURLS_VERSION, true ); 
    61                 wp_register_style( 'better_yourls_admin', BYOURLS_URL .  'assets/css/better-yourls.css', array(), BYOURLS_VERSION ); // Add multi-select css. 
     59                wp_register_style( 'better_yourls_admin', BYOURLS_URL . 'assets/css/better-yourls.css', array(), BYOURLS_VERSION ); // Add multi-select css. 
    6260 
    6361            } else { 
    6462 
    6563                wp_register_script( 'better_yourls_footer', BYOURLS_URL . 'assets/js/admin-footer.min.js', array( 'jquery' ), BYOURLS_VERSION, true ); 
    66                 wp_register_style( 'better_yourls_admin', BYOURLS_URL .  'assets/css/better-yourls.min.css', array(), BYOURLS_VERSION ); // Add multi-select css. 
     64                wp_register_style( 'better_yourls_admin', BYOURLS_URL . 'assets/css/better-yourls.min.css', array(), BYOURLS_VERSION ); // Add multi-select css. 
    6765 
    6866            } 
     
    228226 
    229227        printf( 
    230             esc_html__( 'If you need help getting this plugin or have found a bug please visit the %ssupport forums%s.', 'better-yourls' ), 
     228            esc_html__( 'If you need help getting this plugin or have found a bug please visit the %1$ssupport forums%2$s.', 'better-yourls' ), 
    231229            '<a href="' . esc_url( $support_page ) . '" target="_blank">', 
    232230            '</a>' 
     
    244242    public function metabox_settings() { 
    245243 
    246         echo '<p>', esc_html__( 'Use the settings below to configure Better Yourls for your site.', 'better-yourls' ), '</p>'; 
     244        echo '<p>', esc_html__( 'Use the settings below to configure Better YOURLs for your site.', 'better-yourls' ), '</p>'; 
    247245 
    248246        ?> 
     
    290288        echo '<li>' . esc_html__( 'Talk about it on your site and link back to the ', 'better-yourls' ) . '<a href="' . esc_url( $homepage ) . '" target="_blank">' . esc_html__( 'plugin page.', 'better-yourls' ) . '</a></li>'; 
    291289 
    292         echo '<li><a href="http://twitter.com/home?status=' . urlencode( 'I use Better YOURLS for WordPress by @ChrisWiegman and you should too - ' . esc_url( $homepage ) ) . '" target="_blank">' . esc_html__( 'Tweet about it. ', 'better-yourls' ) . '</a></li>'; 
     290        echo '<li><a href="http://twitter.com/home?status=' . rawurldecode( 'I use Better YOURLS for WordPress by @ChrisWiegman and you should too - ' . esc_url( $homepage ) ) . '" target="_blank">' . esc_html__( 'Tweet about it. ', 'better-yourls' ) . '</a></li>'; 
    293291 
    294292        echo '</ul>'; 
     
    511509 
    512510        echo '<p class="description"> ' . esc_html__( 'Put a check mark next to any post type for which you do NOT want to generate a short link.', 'better-yourls' ) . '</p>'; 
     511 
    513512    } 
    514513} 
  • better-yourls/trunk/readme.txt

    r1479650 r1546730  
    44Tags: yourls, shortlink, custom shortlink 
    55Requires at least: 4.2 
    6 Tested up to: 4.6 
    7 Stable tag: 2.1.5 
     6Tested up to: 4.7 
     7Stable tag: 2.1.6 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    5353 
    5454== Changelog == 
     55 
     56= 2.1.6 = 
     57* Minor code sniffer fixes. 
     58* Added nonce to keyword form. 
    5559 
    5660= 2.1.5 = 
  • better-yourls/trunk/uninstall.php

    r1241981 r1546730  
    11<?php 
    2  
    32/** 
    43 * Better YOURLs uninstaller 
     
    109 * @since   2.0.0 
    1110 * 
    12  * @author  Chris Wiegman <chris@chriswiegman.com> 
     11 * @author  Chris Wiegman <chris@wiegman.us> 
     12 */ 
     13 
     14/** 
     15 * Class Better_YOURLs_Uninstaller 
    1316 */ 
    1417class Better_YOURLs_Uninstaller { 
     
    2023     * 
    2124     * @since 2.0.0 
    22      * 
    23      * @return Better_YOURLs_Uninstaller 
    2425     */ 
    2526    public function __construct() { 
    2627 
    27         // Exit if accessed directly 
     28        // Exit if accessed directly. 
    2829        if ( ! defined( 'ABSPATH' ) ) { 
    2930            $this->exit_uninstaller(); 
    3031        } 
    3132 
    32         // Not uninstalling 
     33        // Not uninstalling. 
    3334        if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { 
    3435            $this->exit_uninstaller(); 
    3536        } 
    3637 
    37         // Not uninstalling 
     38        // Not uninstalling. 
    3839        if ( ! WP_UNINSTALL_PLUGIN ) { 
    3940            $this->exit_uninstaller(); 
    4041        } 
    4142 
    42         // Not uninstalling this plugin 
     43        // Not uninstalling this plugin. 
    4344        if ( dirname( WP_UNINSTALL_PLUGIN ) !== dirname( plugin_basename( __FILE__ ) ) ) { 
    4445            $this->exit_uninstaller(); 
    4546        } 
    4647 
    47         // Uninstall Better YOURLs 
     48        // Uninstall Better YOURLs. 
    4849        self::clean_data(); 
    4950    } 
Note: See TracChangeset for help on using the changeset viewer.