Completed
Branch dev (69a0d4)
by
unknown
33:44
created
_view/script/AdminPageFramework_Form_View___Script_CollapsibleSection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         
43 43
         $_aParams               = func_get_args() + array( null );
44 44
         $_oMsg                  = $_aParams[ 0 ];        
45
-        $_sToggleAllButtonHTML  = '"' . self::_getToggleAllButtonHTML( $_oMsg ) . '"';                
45
+        $_sToggleAllButtonHTML  = '"'.self::_getToggleAllButtonHTML( $_oMsg ).'"';                
46 46
            
47 47
         return <<<JAVASCRIPTS
48 48
 ( function( $ ) {
@@ -192,18 +192,18 @@  discard block
 block discarded – undo
192 192
             $_sLabelToggleAll           = $oMsg->get( 'toggle_all' );
193 193
             $_sLabelToggleAllSections   = $oMsg->get( 'toggle_all_collapsible_sections' );
194 194
             $_sDashIconSort             = self::getAOrB( 
195
-                version_compare( $GLOBALS['wp_version'], '3.8', '<' ),  // evaluate
195
+                version_compare( $GLOBALS[ 'wp_version' ], '3.8', '<' ), // evaluate
196 196
                 '', // true
197 197
                 'dashicons dashicons-sort' // false
198 198
             );         
199
-            $_sText                     = self::getAOrB( 
199
+            $_sText = self::getAOrB( 
200 200
                 $_sDashIconSort, // evaluate
201 201
                 '', // true
202 202
                 $_sLabelToggleAll // false
203 203
             );
204 204
             return "<div class='admin-page-framework-collapsible-toggle-all-button-container'>"
205
-                    . "<span class='admin-page-framework-collapsible-toggle-all-button button " . $_sDashIconSort . "'"
206
-                        . " title='" . esc_attr( $_sLabelToggleAllSections ) 
205
+                    . "<span class='admin-page-framework-collapsible-toggle-all-button button ".$_sDashIconSort."'"
206
+                        . " title='".esc_attr( $_sLabelToggleAllSections ) 
207 207
                     . "'>"
208 208
                         . $_sText
209 209
                     . "</span>"
Please login to merge, or discard this patch.
form/_view/script/AdminPageFramework_Form_View___Script_MediaUploader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $_oMsg      = $_aParams[ 0 ];                
58 58
         
59 59
         // means the WordPress version is 3.4.x or below
60
-        if ( ! function_exists( 'wp_enqueue_media' ) ) { 
60
+        if ( !function_exists( 'wp_enqueue_media' ) ) { 
61 61
             return ""; 
62 62
         } 
63 63
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $_oMsg      = $_aParams[ 0 ];                
58 58
         
59 59
         // means the WordPress version is 3.4.x or below
60
-        if ( ! function_exists( 'wp_enqueue_media' ) ) { 
60
+        if ( ! function_exists( 'wp_enqueue_media' ) ) {
61 61
             return ""; 
62 62
         } 
63 63
 
Please login to merge, or discard this patch.
_view/script/AdminPageFramework_Form_View___Script_RepeatableSection.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -399,12 +399,12 @@
 block discarded – undo
399 399
     
400 400
     
401 401
         /**
402
-     * Stores the set container IDs to prevent multiple calls.
403
-     * 
404
-     * Collapsible and tabbed sections can call this method multiple times with the same container ID.
405
-     * 
406
-     * @since       3.4.0
407
-     */
402
+         * Stores the set container IDs to prevent multiple calls.
403
+         * 
404
+         * Collapsible and tabbed sections can call this method multiple times with the same container ID.
405
+         * 
406
+         * @since       3.4.0
407
+         */
408 408
     static private $_aSetContainerIDsForRepeatableSections = array();
409 409
     /**
410 410
      * Returns the enabler script of repeatable sections.
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -415,10 +415,10 @@
 block discarded – undo
415 415
      */
416 416
     static public function getEnabler( $sContainerTagID, $iSectionCount, $aSettings, $oMsg ) {
417 417
         
418
-        if ( empty( $aSettings ) ) { 
418
+        if ( empty( $aSettings ) ) {
419 419
             return ''; 
420 420
         }
421
-        if ( in_array( $sContainerTagID, self::$_aSetContainerIDsForRepeatableSections ) ) { 
421
+        if ( in_array( $sContainerTagID, self::$_aSetContainerIDsForRepeatableSections ) ) {
422 422
             return ''; 
423 423
         }
424 424
         self::$_aSetContainerIDsForRepeatableSections[ $sContainerTagID ] = $sContainerTagID;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -442,7 +442,7 @@
 block discarded – undo
442 442
                 . "<a class='repeatable-section-remove-button button-secondary repeatable-section-button button button-large' href='#' title='{$_sRemove}' {$_sVisibility} data-id='{$sContainerTagID}'>-</a>"
443 443
                 . "<a class='repeatable-section-add-button button-secondary repeatable-section-button button button-large' href='#' title='{$_sAdd}' data-id='{$sContainerTagID}'>+</a>"
444 444
             . "</div>";
445
-        $_sButtonsHTML  = '"' . $_sButtons . '"';
445
+        $_sButtonsHTML  = '"'.$_sButtons.'"';
446 446
         $_aJSArray      = json_encode( $aSettings );
447 447
         $_sScript       = <<<JAVASCRIPTS
448 448
 jQuery( document ).ready( function() {
Please login to merge, or discard this patch.
form/_view/script/AdminPageFramework_Form_View___Script_SectionTab.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
      */
130 130
     static public function getEnabler() {
131 131
         
132
-        if ( self::$_bLoadedTabEnablerScript ) { 
132
+        if ( self::$_bLoadedTabEnablerScript ) {
133 133
             return ''; 
134 134
         }
135 135
         self::$_bLoadedTabEnablerScript = true;
Please login to merge, or discard this patch.
form/_view/script/AdminPageFramework_Form_View___Script_SortableSection.php 3 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,10 +94,10 @@
 block discarded – undo
94 94
      */
95 95
     static public function getEnabler( $sContainerTagID, $aSettings, $oMsg ) {
96 96
         
97
-        if ( empty( $aSettings ) ) { 
97
+        if ( empty( $aSettings ) ) {
98 98
             return ''; 
99 99
         }
100
-        if ( in_array( $sContainerTagID, self::$_aSetContainerIDsForSortableSections ) ) { 
100
+        if ( in_array( $sContainerTagID, self::$_aSetContainerIDsForSortableSections ) ) {
101 101
             return ''; 
102 102
         }
103 103
         self::$_aSetContainerIDsForSortableSections[ $sContainerTagID ] = $sContainerTagID;        
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Admin Page Framework
4
- * 
5
- * http://en.michaeluno.jp/admin-page-framework/
6
- * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
- * 
8
- */
3
+     * Admin Page Framework
4
+     * 
5
+     * http://en.michaeluno.jp/admin-page-framework/
6
+     * Copyright (c) 2013-2015 Michael Uno; Licensed MIT
7
+     * 
8
+     */
9 9
 
10 10
 /**
11 11
  * Provides methods for creating fields in the taxonomy page (edit-tags.php).
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
         new self( $oMsg ); 
106 106
         
107 107
         // $aSettings              = $this->getAsArray( $aSettings );        
108
-        $_sScript       = <<<JAVASCRIPTS
108
+        $_sScript = <<<JAVASCRIPTS
109 109
 jQuery( document ).ready( function() {    
110 110
     jQuery( '#{$sContainerTagID}' ).enableAdminPageFrameworkSortableSections( '{$sContainerTagID}' ); 
111 111
 });            
Please login to merge, or discard this patch.
_view/sectionset/AdminPageFramework_Form_View___CollapsibleSectionTitle.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
          */
62 62
         private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer='sections', $iSectionIndex=null ) {
63 63
 
64
-            if ( $sContainer !== $aCollapsible[ 'container' ] ) { 
64
+            if ( $sContainer !== $aCollapsible[ 'container' ] ) {
65 65
                 return ''; 
66 66
             }
67 67
               
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class AdminPageFramework_Form_View___CollapsibleSectionTitle extends AdminPageFramework_Form_View___SectionTitle {
20 20
             
21
-    public $aArguments      = array(
21
+    public $aArguments = array(
22 22
         'title'             => null,
23 23
         'tag'               => null,
24 24
         'section_index'     => null,
25 25
         'collapsible'       => array(),
26 26
         'container_type'    => 'section', // section or sections
27 27
         
28
-        'sectionset'        => array(),  // DEVVER+ sectionset definition array
28
+        'sectionset'        => array(), // DEVVER+ sectionset definition array
29 29
         
30 30
     );
31
-    public $aFieldsets               = array();
31
+    public $aFieldsets = array();
32 32
     public $aSavedData              = array();
33 33
     public $aFieldErrors            = array();
34 34
     public $aFieldTypeDefinitions   = array();
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
          * @param       array|boolean   $aCollapsible       The collapsible argument.
63 63
          * @param       string          $sContainer          The position context. Accepts either 'sections' or 'section'. If the set position in the argument array does not match this value, the method will return an empty string.
64 64
          */
65
-        private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer='sections', $iSectionIndex=null ) {
65
+        private function _getCollapsibleSectionTitleBlock( array $aCollapsible, $sContainer = 'sections', $iSectionIndex = null ) {
66 66
 
67 67
             if ( $sContainer !== $aCollapsible[ 'container' ] ) { 
68 68
                 return ''; 
@@ -77,17 +77,17 @@  discard block
 block discarded – undo
77 77
             );
78 78
             
79 79
             $_aSectionset        = $this->aArguments[ 'sectionset' ];
80
-            $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ]  ) . '_' . $iSectionIndex;
80
+            $_sSectionTitleTagID = str_replace( '|', '_', $_aSectionset[ '_section_path' ] ).'_'.$iSectionIndex;
81 81
 
82 82
             return $this->_getCollapsibleSectionsEnablerScript()
83
-                . "<div " . $this->getAttributes(
83
+                . "<div ".$this->getAttributes(
84 84
                     array(
85 85
                         'id'    => $_sSectionTitleTagID,
86 86
                         'class' => $this->getClassAttribute( 
87 87
                             'admin-page-framework-section-title',
88 88
                             'accordion-section-title',
89 89
                             'admin-page-framework-collapsible-title',
90
-                            'sections' === $aCollapsible['container']
90
+                            'sections' === $aCollapsible[ 'container' ]
91 91
                                 ? 'admin-page-framework-collapsible-sections-title'
92 92
                                 : 'admin-page-framework-collapsible-section-title',
93 93
                             $aCollapsible[ 'is_collapsed' ] 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                         ),
97 97
                     ) 
98 98
                     + $this->getDataAttributeArray( $aCollapsible )
99
-                ) . ">"  
99
+                ).">"  
100 100
                         . $_sSectionTitle
101 101
                     . "</div>";
102 102
             
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRow.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
         $_aParameters = func_get_args() + array( 
34 34
             $this->aFieldset, 
35
-            $this->aSavedData,    // passed by reference. @todo: examine why it needs to be passed by reference.
35
+            $this->aSavedData, // passed by reference. @todo: examine why it needs to be passed by reference.
36 36
             $this->aFieldErrors, 
37 37
             $this->aFieldTypeDefinitions, 
38 38
             $this->aCallbacks, // field output element callables.        
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         return $this->_getFieldByContainer( 
72 72
             $aFieldset, 
73 73
             array(
74
-                'open_main'     => "<div " . $_oFieldrowAttribute->get() . ">",
74
+                'open_main'     => "<div ".$_oFieldrowAttribute->get().">",
75 75
                 'close_main'    => "</div>",
76 76
             )
77 77
         ); 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         
62 62
         $aFieldset = $this->aFieldset;
63 63
 
64
-        if ( 'section_title' === $aFieldset[ 'type' ] ) { 
64
+        if ( 'section_title' === $aFieldset[ 'type' ] ) {
65 65
             return ''; 
66 66
         }
67 67
         
Please login to merge, or discard this patch.
form/_view/sectionset/AdminPageFramework_Form_View___FieldsetRows.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @return      string
58 58
      * @since       DEVVER
59 59
      */
60
-    public function get( $bTableRow=true ) {
60
+    public function get( $bTableRow = true ) {
61 61
         
62 62
         $_sMethodName = $this->getAOrB(
63 63
             $bTableRow,
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         );
67 67
         
68 68
         $_aOutput = array();
69
-        foreach( $this->aFieldsetsPerSection as $_aFieldset ) {
69
+        foreach ( $this->aFieldsetsPerSection as $_aFieldset ) {
70 70
 
71 71
             $_oFieldsetOutputFormatter = new AdminPageFramework_Form_Model___Format_FieldsetOutput(
72 72
                 $_aFieldset, 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 $this->aFieldTypeDefinitions
75 75
             );        
76 76
             
77
-            $_aOutput[] = call_user_func_array(
77
+            $_aOutput[ ] = call_user_func_array(
78 78
                 array( $this, $_sMethodName ),
79 79
                 array( $_oFieldsetOutputFormatter->get() )
80 80
             );
Please login to merge, or discard this patch.
_abstract/form/_view/sectionset/AdminPageFramework_Form_View___Section.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
         $_oSectionTableBodyAttributes = new AdminPageFramework_Form_View___Attribute_SectionTableBody( $this->aSectionset );
77 77
         
78 78
         $_aOutput       = array();
79
-        $_aOutput[]     = "<table " . $_oSectionTableAttributes->get() . ">"
79
+        $_aOutput[ ]     = "<table ".$_oSectionTableAttributes->get().">"
80 80
                 . $_oTableCaption->get()
81
-                . "<tbody " . $_oSectionTableBodyAttributes->get() . ">"
81
+                . "<tbody ".$_oSectionTableBodyAttributes->get().">"
82 82
                     . $this->_getSectionContent( $_iSectionIndex )
83 83
                 . "</tbody>"
84 84
             . "</table>";
85 85
 
86
-        $_oSectionTableContainerAttributes  = new AdminPageFramework_Form_View___Attribute_SectionTableContainer( $this->aSectionset );
87
-        return "<div " . $_oSectionTableContainerAttributes->get() . ">"
86
+        $_oSectionTableContainerAttributes = new AdminPageFramework_Form_View___Attribute_SectionTableContainer( $this->aSectionset );
87
+        return "<div ".$_oSectionTableContainerAttributes->get().">"
88 88
                 . implode( PHP_EOL, $_aOutput )
89 89
             . "</div>";    
90 90
         
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                 // Retrieve the formatted sectionsets of the content.
145 145
                 $_sSectionPath = $this->aSectionset[ '_section_path' ];
146 146
                 $_aSectionsets = $this->aStructure[ 'sectionsets' ];
147
-                if ( ! isset( $_aSectionsets[ $_sSectionPath ] ) ) {    // @todo    not sure what this check is for
147
+                if ( !isset( $_aSectionsets[ $_sSectionPath ] ) ) {    // @todo    not sure what this check is for
148 148
                     return '';
149 149
                 }          
150 150
                 
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
                     $_aNestedSectionPaths = array();
196 196
                     
197 197
                     // List the section paths of the direct children
198
-                    foreach( $aNestedSctionsets as $_aNestedSectionset ) {
199
-                        $_sThisSectionPath = $sSubjectSectionPath . '|' . $_aNestedSectionset[ 'section_id' ];
198
+                    foreach ( $aNestedSctionsets as $_aNestedSectionset ) {
199
+                        $_sThisSectionPath = $sSubjectSectionPath.'|'.$_aNestedSectionset[ 'section_id' ];
200 200
                         $_aNestedSectionPaths[ $_sThisSectionPath ] = $_sThisSectionPath;
201 201
                     }                    
202 202
                     
203 203
                     // Now we need children's children.
204 204
                     $_aChildSectionPaths = array();
205
-                    foreach( $_aNestedSectionPaths as $_sNestedSectionPath ) {
205
+                    foreach ( $_aNestedSectionPaths as $_sNestedSectionPath ) {
206 206
                         $_aNestedSectionsets = $this->getElementAsArray( 
207 207
                             $aSectionsets, 
208 208
                             array( $_sNestedSectionPath, 'content' )
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,8 @@
 block discarded – undo
144 144
                 // Retrieve the formatted sectionsets of the content.
145 145
                 $_sSectionPath = $this->aSectionset[ '_section_path' ];
146 146
                 $_aSectionsets = $this->aStructure[ 'sectionsets' ];
147
-                if ( ! isset( $_aSectionsets[ $_sSectionPath ] ) ) {    // @todo    not sure what this check is for
147
+                if ( ! isset( $_aSectionsets[ $_sSectionPath ] ) ) {
148
+// @todo    not sure what this check is for
148 149
                     return '';
149 150
                 }          
150 151
                 
Please login to merge, or discard this patch.