Plugin Directory

Changeset 588957


Ignore:
Timestamp:
08/22/2012 06:36:15 PM (14 years ago)
Author:
enkrates
Message:

Fix PHP Code formatting

Shortened the long lines in the PHP code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • unpublished-warnings/trunk/unpublished_warnings.php

    r535283 r588957  
    44Plugin URI: http://wordpress.org/extend/plugins/unpublished-warnings/
    55Description: This plugin will warn you when you're looking at an unpublished post that you just happen to be able to see.
    6 Author: Bill Sullivan
     6Author: William Sullivan
    77Version: 0.3.6
    88Author URI: http://enkrates.com
     
    3030
    3131function UW_is_unpublished(){
    32     return !( isset( $_GET['preview'] ) && $_GET['preview'] == 'true' ) && get_post_status( get_the_ID() ) != 'publish';
     32    return !( isset( $_GET['preview'] ) && $_GET['preview'] == 'true' )
     33            && get_post_status( get_the_ID() ) != 'publish';
    3334}
    3435
    3536function UW_prepend_warning( $content ){   
    3637    if ( UW_is_unpublished() ){
    37         $warning_message = 'This post has not yet been published. You can see it because you are logged in with a privileged account.';
     38        $warning_message = 'This post has not yet been published. ' .
     39                            'You can see it because you are logged ' .
     40                            'in with a privileged account.';
    3841        $hide_me_message = 'Click here to hide this warning.';
    39         $content = "<div id='unpublished_warnings'><p>" . wptexturize( $warning_message ) . "</p>\n<p>"
    40          . wptexturize( $hide_me_message ) . "</p>\n</div>\n" . $content;
     42        $content = "<div id='unpublished_warnings'><p>" .
     43                    wptexturize( $warning_message ) .
     44                    "</p>\n<p>" .
     45                    wptexturize( $hide_me_message ) .
     46                    "</p>\n</div>\n" . $content;
    4147    }
    4248    return $content;
Note: See TracChangeset for help on using the changeset viewer.