Completed
Pull Request — master (#113)
by frank
03:14
created
classes/autoptimizeConfig.php 1 patch
Braces   +15 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+    exit;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 class autoptimizeConfig {
5 8
     private $config = null;
@@ -597,8 +600,9 @@  discard block
 block discarded – undo
597 600
         //Inspired on http://wpengineer.com/meta-links-for-wordpress-plugins/
598 601
         //Do it only once - saves time
599 602
         static $plugin;
600
-        if(empty($plugin))
601
-            $plugin = plugin_basename(AUTOPTIMIZE_PLUGIN_DIR.'autoptimize.php');
603
+        if(empty($plugin)) {
604
+                    $plugin = plugin_basename(AUTOPTIMIZE_PLUGIN_DIR.'autoptimize.php');
605
+        }
602 606
         
603 607
         if($file===null) {
604 608
             //2.7
@@ -656,8 +660,9 @@  discard block
 block discarded – undo
656 660
             $this->config = apply_filters( 'autoptimize_filter_get_config', $config );
657 661
         }
658 662
 
659
-        if(isset($this->config[$key]))
660
-            return $this->config[$key];
663
+        if(isset($this->config[$key])) {
664
+                    return $this->config[$key];
665
+        }
661 666
 
662 667
         return false;
663 668
     }
@@ -675,10 +680,13 @@  discard block
 block discarded – undo
675 680
             <ul>
676 681
                 <?php if ( $maxitems == 0 ) : ?>
677 682
                     <li><?php _e( 'No items', 'autoptimize' ); ?></li>
678
-                <?php else : ?>
683
+                <?php else {
684
+    : ?>
679 685
                     <?php foreach ( $rss_items as $item ) : ?>
680 686
                         <li>
681
-                            <a href="<?php echo esc_url( $item->get_permalink() ); ?>"
687
+                            <a href="<?php echo esc_url( $item->get_permalink() );
688
+}
689
+?>"
682 690
                                 title="<?php printf( __( 'Posted %s', 'autoptimize' ), $item->get_date('j F Y | g:i a') ); ?>">
683 691
                                 <?php echo esc_html( $item->get_title() ); ?>
684 692
                             </a>
Please login to merge, or discard this patch.