WordPress.org

Plugin Directory

Changeset 587626


Ignore:
Timestamp:
08/20/12 03:59:46 (20 months ago)
Author:
betzster
Message:

Add notice if no short domain is specified

Location:
jb-shortener/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • jb-shortener/trunk/jb-shortener.php

    r587063 r587626  
    44Plugin URI: http://joshbetz.com/2011/11/jb-shortener/ 
    55Description: Changes the WordPress shorturl and Twitter Tools URL based on a base-36 encode of the post ID. Also includes materials to setup custom shorturl domain. 
    6 Version: 1.1 
     6Version: 1.1.1 
    77Author: Josh Betz 
    88Author URI: http://joshbetz.com 
     
    1515        add_action( 'init', array( $this, 'jb_redirect' ), 1 ); 
    1616        add_action( 'admin_init', array( $this, 'jb_shorturl_settings' ) ); 
     17        add_action( 'admin_notices', array( $this, 'admin_notices' ) ); 
    1718        if ( is_multisite() ) { 
    1819            register_activation_hook( __FILE__, array( $this, 'jb_maybe_create_db' ) ); 
     
    9293     */ 
    9394    function jb_settings_callback() { 
    94         echo '<input name="jb_shorturl" id="jb_shorturl" type="text" value="' . $this->get_jb_shorturl() . '" class="code regular-text"> <span class="description">The custom short url for your site</span>'; 
     95        echo '<input name="jb_shorturl" id="jb_shorturl" type="text" value="' . $this->get_jb_shorturl() . '" class="code regular-text"><p class="description">The custom short url for your site</p>'; 
    9596    } 
    9697 
     
    176177    } 
    177178 
     179    function admin_notices(){ 
     180        if ( get_option( 'jb_shorturl' ) == '' ) 
     181            echo '<div class="updated"> 
     182                <p>No short domain has been specified.</p> 
     183            </div>'; 
     184    } 
     185 
    178186    /** 
    179187     * Converts a base 10 number to base36 
  • jb-shortener/trunk/readme.txt

    r587063 r587626  
    44Requires at least: 3.3 
    55Tested up to: 3.4.1 
    6 Stable tag: 1.1 
     6Stable tag: 1.1.1 
    77 
    88Changes the Short URL and the Twitter Tools URL for each post on your site using a custom, shortened domain and a base-36 encode of the post ID. 
     
    3333== Changelog == 
    3434 
     35= 1.1.1 = 
     36* Fix formatting on options page 
     37* Display warning if no short domain is set 
     38 
    3539= 1.1 = 
    3640* Now works with multisite installs with subdirectories 
Note: See TracChangeset for help on using the changeset viewer.