@@ -39,7 +39,7 @@ |
||
39 | 39 | '' // default value |
40 | 40 | ); |
41 | 41 | |
42 | - if ( ! $this->canUserView( $this->sCapability ) ) { |
|
42 | + if ( !$this->canUserView( $this->sCapability ) ) { |
|
43 | 43 | return ''; |
44 | 44 | } |
45 | 45 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | /** |
37 | 37 | * Defines the field type slugs used for this field type. |
38 | 38 | */ |
39 | - public $aFieldTypeSlugs = array( 'file', ); |
|
39 | + public $aFieldTypeSlugs = array( 'file',); |
|
40 | 40 | |
41 | 41 | /** |
42 | 42 | * Defines the default key-values of this field type. |
@@ -96,15 +96,15 @@ discard block |
||
96 | 96 | array( |
97 | 97 | 'type' => 'hidden', |
98 | 98 | 'value' => '', |
99 | - 'name' => $aField[ 'attributes' ][ 'name' ] . '[_dummy_value]', |
|
99 | + 'name' => $aField[ 'attributes' ][ 'name' ].'[_dummy_value]', |
|
100 | 100 | ) |
101 | 101 | ) |
102 | 102 | . $this->getHTMLTag( |
103 | 103 | 'input', |
104 | 104 | array( |
105 | 105 | 'type' => 'hidden', |
106 | - 'name' => '__unset_' . $aField[ '_structure_type' ] . '[' . $aField[ '_input_name_flat' ] . '|_dummy_value' . ']', |
|
107 | - 'value' => $aField[ '_input_name_flat' ] . '|_dummy_value', |
|
106 | + 'name' => '__unset_'.$aField[ '_structure_type' ].'['.$aField[ '_input_name_flat' ].'|_dummy_value'.']', |
|
107 | + 'value' => $aField[ '_input_name_flat' ].'|_dummy_value', |
|
108 | 108 | 'class' => 'unset-element-names element-address', |
109 | 109 | ) |
110 | 110 | ); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | /** |
81 | 81 | * Defines the field type slugs used for this field type. |
82 | 82 | */ |
83 | - public $aFieldTypeSlugs = array( 'posttype', ); |
|
83 | + public $aFieldTypeSlugs = array( 'posttype',); |
|
84 | 84 | |
85 | 85 | /** |
86 | 86 | * Defines the default key-values of this field type. |
@@ -88,20 +88,20 @@ discard block |
||
88 | 88 | * @remark $_aDefaultKeys holds shared default key-values defined in the base class. |
89 | 89 | */ |
90 | 90 | protected $aDefaultKeys = array( |
91 | - 'slugs_to_remove' => null, // the default array will be assigned in the rendering method. |
|
91 | + 'slugs_to_remove' => null, // the default array will be assigned in the rendering method. |
|
92 | 92 | /** |
93 | 93 | * Accepts query arguments. For the argument specification, see the arg parameter of get_post_types() function. |
94 | 94 | * See: http://codex.wordpress.org/Function_Reference/get_post_types#Parameters |
95 | 95 | */ |
96 | - 'query' => array(), // 3.2.1+ |
|
97 | - 'operator' => 'and', // 3.2.1+ either 'and' or 'or' |
|
96 | + 'query' => array(), // 3.2.1+ |
|
97 | + 'operator' => 'and', // 3.2.1+ either 'and' or 'or' |
|
98 | 98 | 'attributes' => array( |
99 | 99 | 'size' => 30, |
100 | 100 | 'maxlength' => 400, |
101 | 101 | ), |
102 | - 'select_all_button' => true, // 3.3.0+ to change the label, set the label here |
|
103 | - 'select_none_button' => true, // 3.3.0+ to change the label, set the label here |
|
104 | - 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
102 | + 'select_all_button' => true, // 3.3.0+ to change the label, set the label here |
|
103 | + 'select_none_button' => true, // 3.3.0+ to change the label, set the label here |
|
104 | + 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
105 | 105 | ); |
106 | 106 | protected $aDefaultRemovingPostTypeSlugs = array( |
107 | 107 | 'revision', |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | protected function getStyles() { |
120 | 120 | $_sParentStyles = parent::getStyles(); |
121 | - return $_sParentStyles . <<<CSSRULES |
|
121 | + return $_sParentStyles.<<<CSSRULES |
|
122 | 122 | /* Posttype Field Type */ |
123 | 123 | .admin-page-framework-field input[type='checkbox'] { |
124 | 124 | margin-right: 0.5em; |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | */ |
146 | 146 | protected function getField( $aField ) { |
147 | 147 | |
148 | - $this->_sCheckboxClassSelector = ''; // disable the checkbox class selector. |
|
148 | + $this->_sCheckboxClassSelector = ''; // disable the checkbox class selector. |
|
149 | 149 | $aField[ 'label' ] = $this->_getPostTypeArrayForChecklist( |
150 | 150 | isset( $aField[ 'slugs_to_remove' ] ) |
151 | 151 | ? $this->getAsArray( $aField[ 'slugs_to_remove' ] ) |
152 | - : $this->aDefaultRemovingPostTypeSlugs, // slugs to remove |
|
152 | + : $this->aDefaultRemovingPostTypeSlugs, // slugs to remove |
|
153 | 153 | $aField[ 'query' ], |
154 | 154 | $aField[ 'operator' ] |
155 | 155 | ); |
@@ -170,11 +170,11 @@ discard block |
||
170 | 170 | * @return array The array holding the elements of installed post types' labels and their slugs except the specified expluding post types. |
171 | 171 | * @internal |
172 | 172 | */ |
173 | - private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs=array(), $sOperator='and' ) { |
|
173 | + private function _getPostTypeArrayForChecklist( $aSlugsToRemove, $asQueryArgs = array(), $sOperator = 'and' ) { |
|
174 | 174 | |
175 | 175 | $_aPostTypes = array(); |
176 | - foreach( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) { |
|
177 | - if ( isset( $_oPostType->name, $_oPostType->label ) ) { |
|
176 | + foreach ( get_post_types( $asQueryArgs, 'objects' ) as $_oPostType ) { |
|
177 | + if ( isset( $_oPostType->name, $_oPostType->label ) ) { |
|
178 | 178 | $_aPostTypes[ $_oPostType->name ] = $_oPostType->label; |
179 | 179 | } |
180 | 180 | } |
@@ -62,16 +62,16 @@ discard block |
||
62 | 62 | * - use_desc_for_title (boolean|int) default is 1 - Whether to use the category description as the title attribute. side note: the framework enables this by default. |
63 | 63 | * @param integer $iCurrentObjectID |
64 | 64 | */ |
65 | - function start_el( &$sOutput, $oTerm, $iDepth=0, $aArgs=array(), $iCurrentObjectID=0 ) { |
|
65 | + function start_el( &$sOutput, $oTerm, $iDepth = 0, $aArgs = array(), $iCurrentObjectID = 0 ) { |
|
66 | 66 | |
67 | 67 | $aArgs = $aArgs + array( |
68 | 68 | '_name_prefix' => null, |
69 | 69 | '_input_id_prefix' => null, |
70 | 70 | '_attributes' => array(), |
71 | 71 | '_selected_items' => array(), |
72 | - 'taxonomy' => null, // parsed by the core function to perform the database query. |
|
73 | - 'disabled' => null, // not sure what this was for |
|
74 | - '_save_unchecked' => true, // 3.8.8+ |
|
72 | + 'taxonomy' => null, // parsed by the core function to perform the database query. |
|
73 | + 'disabled' => null, // not sure what this was for |
|
74 | + '_save_unchecked' => true, // 3.8.8+ |
|
75 | 75 | ); |
76 | 76 | |
77 | 77 | // Local variables |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | // Post count |
85 | 85 | $_sPostCount = $aArgs[ 'show_post_count' ] |
86 | - ? " <span class='font-lighter'>(" . $oTerm->count . ")</span>" |
|
86 | + ? " <span class='font-lighter'>(".$oTerm->count.")</span>" |
|
87 | 87 | : ''; |
88 | 88 | |
89 | 89 | // Attributes |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | + array( |
103 | 103 | 'class' => null, |
104 | 104 | ); |
105 | - $_aInputAttributes['class'] .= ' apf_checkbox'; |
|
105 | + $_aInputAttributes[ 'class' ] .= ' apf_checkbox'; |
|
106 | 106 | |
107 | 107 | $_aLiTagAttributes = array( |
108 | 108 | 'id' => "list-{$_sID}", |
@@ -111,15 +111,15 @@ discard block |
||
111 | 111 | ); |
112 | 112 | |
113 | 113 | $_sHiddenInputForUnchecked = $aArgs[ '_save_unchecked' ] |
114 | - ? "<input value='0' type='hidden' name='" . $_aInputAttributes[ 'name' ] . "' class='apf_checkbox' />" |
|
114 | + ? "<input value='0' type='hidden' name='".$_aInputAttributes[ 'name' ]."' class='apf_checkbox' />" |
|
115 | 115 | : ''; |
116 | 116 | |
117 | 117 | // Output - the variable is by reference so the modification takes effect |
118 | 118 | $sOutput .= "\n" |
119 | - . "<li " . AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ) . ">" |
|
119 | + . "<li ".AdminPageFramework_WPUtility::getAttributes( $_aLiTagAttributes ).">" |
|
120 | 120 | . "<label for='{$_sID}' class='taxonomy-checklist-label'>" |
121 | 121 | . $_sHiddenInputForUnchecked // 3.8.8+ |
122 | - . "<input " . AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes ) . " />" |
|
122 | + . "<input ".AdminPageFramework_WPUtility::getAttributes( $_aInputAttributes )." />" |
|
123 | 123 | . esc_html( apply_filters( 'the_category', $oTerm->name ) ) |
124 | 124 | . $_sPostCount |
125 | 125 | . "</label>"; |
@@ -36,21 +36,21 @@ |
||
36 | 36 | */ |
37 | 37 | public function _replyToGetField( $aField ) { |
38 | 38 | return |
39 | - $aField['before_label'] |
|
39 | + $aField[ 'before_label' ] |
|
40 | 40 | . "<div class='admin-page-framework-input-label-container'>" |
41 | - . "<label for='{$aField['input_id']}'>" |
|
42 | - . $aField['before_input'] |
|
43 | - . ( $aField['label'] && ! $aField['repeatable'] |
|
44 | - ? "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">" |
|
41 | + . "<label for='{$aField[ 'input_id' ]}'>" |
|
42 | + . $aField[ 'before_input' ] |
|
43 | + . ( $aField[ 'label' ] && !$aField[ 'repeatable' ] |
|
44 | + ? "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">" |
|
45 | 45 | . $aField[ 'label' ] |
46 | 46 | . "</span>" |
47 | 47 | : "" |
48 | 48 | ) |
49 | - . $aField['value'] |
|
50 | - . $aField['after_input'] |
|
49 | + . $aField[ 'value' ] |
|
50 | + . $aField[ 'after_input' ] |
|
51 | 51 | . "</label>" |
52 | 52 | . "</div>" |
53 | - . $aField['after_label'] |
|
53 | + . $aField[ 'after_label' ] |
|
54 | 54 | ; |
55 | 55 | } |
56 | 56 |
@@ -628,7 +628,7 @@ |
||
628 | 628 | return $_aBaseAttributes; |
629 | 629 | |
630 | 630 | } |
631 | - /** |
|
631 | + /** |
|
632 | 632 | * Returns the set image url. |
633 | 633 | * |
634 | 634 | * When the 'attributes_to_store' argument is present, there will be sub elements to the field value. |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | /** |
59 | 59 | * Defines the field type slugs used for this field type. |
60 | 60 | */ |
61 | - public $aFieldTypeSlugs = array( 'image', ); |
|
61 | + public $aFieldTypeSlugs = array( 'image',); |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Defines the default key-values of this field type. |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | */ |
68 | 68 | protected $aDefaultKeys = array( |
69 | 69 | 'attributes_to_store' => array(), // ( array ) This is for the image and media field type. The attributes to save besides URL. e.g. ( for the image field type ) array( 'title', 'alt', 'width', 'height', 'caption', 'id', 'align', 'link' ). |
70 | - 'show_preview' => true, // ( boolean ) Indicates whether the image preview should be displayed or not. |
|
71 | - 'allow_external_source' => true, // ( boolean ) Indicates whether the media library box has the From URL tab. |
|
70 | + 'show_preview' => true, // ( boolean ) Indicates whether the image preview should be displayed or not. |
|
71 | + 'allow_external_source' => true, // ( boolean ) Indicates whether the media library box has the From URL tab. |
|
72 | 72 | 'attributes' => array( |
73 | 73 | 'input' => array( |
74 | 74 | 'size' => 40, |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | return // $this->_getScript_CustomMediaUploaderObject() . PHP_EOL |
99 | 99 | $this->_getScript_ImageSelector( |
100 | 100 | "admin_page_framework" |
101 | - ) . PHP_EOL |
|
101 | + ).PHP_EOL |
|
102 | 102 | . $this->_getScript_RegisterCallbacks(); |
103 | 103 | } |
104 | 104 | /** |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $_sInsertFromURL = esc_js( $this->oMsg->get( 'insert_from_url' ) ); |
181 | 181 | |
182 | 182 | // if the WordPress version is 3.4.x or below |
183 | - if ( ! function_exists( 'wp_enqueue_media' ) ) { |
|
183 | + if ( !function_exists( 'wp_enqueue_media' ) ) { |
|
184 | 184 | |
185 | 185 | return <<<JAVASCRIPTS |
186 | 186 | /** |
@@ -569,13 +569,13 @@ discard block |
||
569 | 569 | . "<label for='{$aField[ 'input_id' ]}'>" |
570 | 570 | . $aField[ 'before_input' ] |
571 | 571 | . $this->getAOrB( |
572 | - $aField[ 'label' ] && ! $aField[ 'repeatable' ], |
|
573 | - "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">" |
|
572 | + $aField[ 'label' ] && !$aField[ 'repeatable' ], |
|
573 | + "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">" |
|
574 | 574 | . $aField[ 'label' ] |
575 | 575 | . "</span>", |
576 | 576 | '' |
577 | 577 | ) |
578 | - . "<input " . $this->getAttributes( $this->_getImageInputAttributes( $aField, $_iCountAttributes, $_sImageURL, $_aBaseAttributes ) ) . " />" |
|
578 | + . "<input ".$this->getAttributes( $this->_getImageInputAttributes( $aField, $_iCountAttributes, $_sImageURL, $_aBaseAttributes ) )." />" |
|
579 | 579 | . $aField[ 'after_input' ] |
580 | 580 | . "<div class='repeatable-field-buttons'></div>" // the repeatable field buttons will be replaced with this element. |
581 | 581 | . $this->getExtraInputFields( $aField ) |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | */ |
616 | 616 | private function _getBaseAttributes( array $aField ) { |
617 | 617 | |
618 | - $_aBaseAttributes = $aField[ 'attributes' ] + array( 'class' => null ); |
|
618 | + $_aBaseAttributes = $aField[ 'attributes' ] + array( 'class' => null ); |
|
619 | 619 | unset( |
620 | 620 | $_aBaseAttributes[ 'input' ], |
621 | 621 | $_aBaseAttributes[ 'button' ], |
@@ -684,8 +684,8 @@ discard block |
||
684 | 684 | protected function getExtraInputFields( array $aField ) { |
685 | 685 | |
686 | 686 | $_aOutputs = array(); |
687 | - foreach( $this->getElementAsArray( $aField, 'attributes_to_store' ) as $sAttribute ) { |
|
688 | - $_aOutputs[] = "<input " . $this->getAttributes( |
|
687 | + foreach ( $this->getElementAsArray( $aField, 'attributes_to_store' ) as $sAttribute ) { |
|
688 | + $_aOutputs[ ] = "<input ".$this->getAttributes( |
|
689 | 689 | array( |
690 | 690 | 'id' => "{$aField[ 'input_id' ]}_{$sAttribute}", |
691 | 691 | 'type' => 'hidden', |
@@ -701,7 +701,7 @@ discard block |
||
701 | 701 | '' |
702 | 702 | ), |
703 | 703 | ) |
704 | - ) . "/>"; |
|
704 | + )."/>"; |
|
705 | 705 | } |
706 | 706 | return implode( PHP_EOL, $_aOutputs ); |
707 | 707 | |
@@ -714,17 +714,17 @@ discard block |
||
714 | 714 | */ |
715 | 715 | protected function _getPreviewContainer( $aField, $sImageURL, $aPreviewAtrributes ) { |
716 | 716 | |
717 | - if ( ! $aField[ 'show_preview' ] ) { |
|
717 | + if ( !$aField[ 'show_preview' ] ) { |
|
718 | 718 | return ''; |
719 | 719 | } |
720 | 720 | |
721 | 721 | $sImageURL = esc_url( $this->getResolvedSRC( $sImageURL, true ) ); |
722 | 722 | return |
723 | - "<div " . $this->getAttributes( |
|
723 | + "<div ".$this->getAttributes( |
|
724 | 724 | array( |
725 | 725 | 'id' => "image_preview_container_{$aField[ 'input_id' ]}", |
726 | - 'class' => 'image_preview ' . $this->getElement( $aPreviewAtrributes, 'class', '' ), |
|
727 | - 'style' => $this->getAOrB( $sImageURL, '', "display: none; " ) |
|
726 | + 'class' => 'image_preview '.$this->getElement( $aPreviewAtrributes, 'class', '' ), |
|
727 | + 'style' => $this->getAOrB( $sImageURL, '', "display: none; " ) |
|
728 | 728 | . $this->getElement( $aPreviewAtrributes, 'style', '' ), |
729 | 729 | ) + $aPreviewAtrributes |
730 | 730 | ) |
@@ -747,12 +747,12 @@ discard block |
||
747 | 747 | */ |
748 | 748 | protected function _getUploaderButtonScript( $sInputID, $abRepeatable, $bExternalSource, array $aButtonAttributes ) { |
749 | 749 | |
750 | - $_bRepeatable = ! empty( $abRepeatable ); |
|
750 | + $_bRepeatable = !empty( $abRepeatable ); |
|
751 | 751 | |
752 | 752 | // Do not include the escaping character (backslash) in the heredoc variable declaration |
753 | 753 | // because the minifier script will parse it and the <<<JAVASCRIPTS and JAVASCRIPTS; parts are converted to double quotes (") |
754 | 754 | // which causes the PHP syntax error. |
755 | - $_sButtonHTML = '"' . $this->_getUploaderButtonHTML( $sInputID, $aButtonAttributes, $_bRepeatable, $bExternalSource ) . '"'; |
|
755 | + $_sButtonHTML = '"'.$this->_getUploaderButtonHTML( $sInputID, $aButtonAttributes, $_bRepeatable, $bExternalSource ).'"'; |
|
756 | 756 | $_sRepeatable = $this->getAOrB( $_bRepeatable, 'true', 'false' ); |
757 | 757 | $_bExternalSource = $this->getAOrB( $bExternalSource, 'true', 'false' ); |
758 | 758 | $_sScript = <<<JAVASCRIPTS |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | . '/* <![CDATA[ */' |
769 | 769 | . $_sScript |
770 | 770 | . '/* ]]> */' |
771 | - . "</script>". PHP_EOL; |
|
771 | + . "</script>".PHP_EOL; |
|
772 | 772 | |
773 | 773 | } |
774 | 774 | /** |
@@ -787,7 +787,7 @@ discard block |
||
787 | 787 | $bRepeatable, |
788 | 788 | $bExternalSource |
789 | 789 | ); |
790 | - return "<a " . $this->getAttributes( $_aAttributes ) . ">" |
|
790 | + return "<a ".$this->getAttributes( $_aAttributes ).">" |
|
791 | 791 | . ( $_bIsLabelSet |
792 | 792 | ? $_aAttributes[ 'data-label' ] |
793 | 793 | : ( strrpos( $_aAttributes[ 'class' ], 'dashicons' ) |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | */ |
807 | 807 | private function _getFormattedUploadButtonAttributes( $sInputID, array $aButtonAttributes, $_bIsLabelSet, $bRepeatable, $bExternalSource ) { |
808 | 808 | |
809 | - $_aAttributes = array( |
|
809 | + $_aAttributes = array( |
|
810 | 810 | 'id' => "select_image_{$sInputID}", |
811 | 811 | 'href' => '#', |
812 | 812 | 'data-uploader_type' => ( string ) function_exists( 'wp_enqueue_media' ), |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | : $this->oMsg->get( 'select_image' ), |
820 | 820 | 'data-label' => null, |
821 | 821 | ); |
822 | - $_aAttributes[ 'class' ] = $this->getClassAttribute( |
|
822 | + $_aAttributes[ 'class' ] = $this->getClassAttribute( |
|
823 | 823 | 'select_image button button-small ', |
824 | 824 | $this->getAOrB( |
825 | 825 | trim( $aButtonAttributes[ 'class' ] ), |
@@ -847,16 +847,16 @@ discard block |
||
847 | 847 | * @return string |
848 | 848 | * @internal |
849 | 849 | */ |
850 | - protected function _getRemoveButtonScript( $sInputID, array $aButtonAttributes, $sType='image' ) { |
|
850 | + protected function _getRemoveButtonScript( $sInputID, array $aButtonAttributes, $sType = 'image' ) { |
|
851 | 851 | |
852 | - if ( ! function_exists( 'wp_enqueue_media' ) ) { |
|
852 | + if ( !function_exists( 'wp_enqueue_media' ) ) { |
|
853 | 853 | return ''; |
854 | 854 | } |
855 | 855 | |
856 | 856 | // Do not include the escaping character (backslash) in the heredoc variable declaration |
857 | 857 | // because the minifier script will parse it and the <<<JAVASCRIPTS and JAVASCRIPTS; parts are converted to double quotes (") |
858 | 858 | // which causes the PHP syntax error. |
859 | - $_sButtonHTML = '"' . $this->_getRemoveButtonHTMLByType( $sInputID, $aButtonAttributes, $sType ) . '"'; |
|
859 | + $_sButtonHTML = '"'.$this->_getRemoveButtonHTMLByType( $sInputID, $aButtonAttributes, $sType ).'"'; |
|
860 | 860 | $_sScript = <<<JAVASCRIPTS |
861 | 861 | if ( 0 === jQuery( 'a#remove_{$sType}_{$sInputID}' ).length ) { |
862 | 862 | jQuery( 'input#{$sInputID}' ).after( $_sButtonHTML ); |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | . '/* <![CDATA[ */' |
868 | 868 | . $_sScript |
869 | 869 | . '/* ]]> */' |
870 | - . "</script>". PHP_EOL; |
|
870 | + . "</script>".PHP_EOL; |
|
871 | 871 | |
872 | 872 | } |
873 | 873 | |
@@ -877,11 +877,11 @@ discard block |
||
877 | 877 | * @return string The generated HTML remove button output. |
878 | 878 | * @internal |
879 | 879 | */ |
880 | - protected function _getRemoveButtonHTMLByType( $sInputID, array $aButtonAttributes, $sType='image' ) { |
|
880 | + protected function _getRemoveButtonHTMLByType( $sInputID, array $aButtonAttributes, $sType = 'image' ) { |
|
881 | 881 | |
882 | 882 | $_bIsLabelSet = isset( $aButtonAttributes[ 'data-label' ] ) && $aButtonAttributes[ 'data-label' ]; |
883 | 883 | $_aAttributes = $this->_getFormattedRemoveButtonAttributesByType( $sInputID, $aButtonAttributes, $_bIsLabelSet, $sType ); |
884 | - return "<a " . $this->getAttributes( $_aAttributes ) . ">" |
|
884 | + return "<a ".$this->getAttributes( $_aAttributes ).">" |
|
885 | 885 | . ( $_bIsLabelSet |
886 | 886 | ? $_aAttributes[ 'data-label' ] |
887 | 887 | : $this->getAOrB( |
@@ -900,9 +900,9 @@ discard block |
||
900 | 900 | * @return array The formatted remove button attributes array. |
901 | 901 | * @internal |
902 | 902 | */ |
903 | - protected function _getFormattedRemoveButtonAttributesByType( $sInputID, array $aButtonAttributes, $_bIsLabelSet, $sType='image' ) { |
|
903 | + protected function _getFormattedRemoveButtonAttributesByType( $sInputID, array $aButtonAttributes, $_bIsLabelSet, $sType = 'image' ) { |
|
904 | 904 | |
905 | - $_sOnClickFunctionName = 'removeInputValuesFor' . ucfirst( $sType ); |
|
905 | + $_sOnClickFunctionName = 'removeInputValuesFor'.ucfirst( $sType ); |
|
906 | 906 | $_aAttributes = array( |
907 | 907 | 'id' => "remove_{$sType}_{$sInputID}", |
908 | 908 | 'href' => '#', |
@@ -914,7 +914,7 @@ discard block |
||
914 | 914 | ? $aButtonAttributes[ 'data-label' ] |
915 | 915 | : $this->oMsg->get( 'remove_value' ), |
916 | 916 | ); |
917 | - $_aAttributes[ 'class' ] = $this->getClassAttribute( |
|
917 | + $_aAttributes[ 'class' ] = $this->getClassAttribute( |
|
918 | 918 | "remove_value remove_{$sType} button button-small", |
919 | 919 | $this->getAOrB( |
920 | 920 | trim( $aButtonAttributes[ 'class' ] ), |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * Defines the field type slugs used for this field type. |
119 | 119 | * @var array |
120 | 120 | */ |
121 | - public $aFieldTypeSlugs = array( 'taxonomy', ); |
|
121 | + public $aFieldTypeSlugs = array( 'taxonomy',); |
|
122 | 122 | |
123 | 123 | /** |
124 | 124 | * Defines the default key-values of this field type. |
@@ -127,41 +127,41 @@ discard block |
||
127 | 127 | * @var array |
128 | 128 | */ |
129 | 129 | protected $aDefaultKeys = array( |
130 | - 'taxonomy_slugs' => 'category', // (array|string) This is for the taxonomy field type. |
|
131 | - 'height' => '250px', // the tab box height |
|
132 | - 'width' => null, // 3.5.7.2+ the tab box width |
|
133 | - 'max_width' => '100%', // for the taxonomy checklist field type, since 2.1.1. |
|
134 | - 'show_post_count' => true, // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not. |
|
130 | + 'taxonomy_slugs' => 'category', // (array|string) This is for the taxonomy field type. |
|
131 | + 'height' => '250px', // the tab box height |
|
132 | + 'width' => null, // 3.5.7.2+ the tab box width |
|
133 | + 'max_width' => '100%', // for the taxonomy checklist field type, since 2.1.1. |
|
134 | + 'show_post_count' => true, // (boolean) 3.2.0+ whether or not the post count associated with the term should be displayed or not. |
|
135 | 135 | 'attributes' => array(), |
136 | - 'select_all_button' => true, // (boolean|string) 3.3.0+ to change the label, set the label here |
|
137 | - 'select_none_button' => true, // (boolean|string) 3.3.0+ to change the label, set the label here |
|
138 | - 'label_no_term_found' => null, // (string) 3.3.2+ The label to display when no term is found. null needs to be set here as the default value will be assigned in the field output method. |
|
139 | - 'label_list_title' => '', // (string) 3.3.2+ The heading title string for a term list. Default: `''`. Insert an HTML custom string right before the list starts. |
|
136 | + 'select_all_button' => true, // (boolean|string) 3.3.0+ to change the label, set the label here |
|
137 | + 'select_none_button' => true, // (boolean|string) 3.3.0+ to change the label, set the label here |
|
138 | + 'label_no_term_found' => null, // (string) 3.3.2+ The label to display when no term is found. null needs to be set here as the default value will be assigned in the field output method. |
|
139 | + 'label_list_title' => '', // (string) 3.3.2+ The heading title string for a term list. Default: `''`. Insert an HTML custom string right before the list starts. |
|
140 | 140 | 'query' => array( // (array) 3.3.2+ Defines the default query argument. |
141 | 141 | // see the arguments of the get_category() function: http://codex.wordpress.org/Function_Reference/get_categories |
142 | 142 | // see the argument of the get_terms() function: http://codex.wordpress.org/Function_Reference/get_terms |
143 | 143 | 'child_of' => 0, |
144 | 144 | 'parent' => '', |
145 | - 'orderby' => 'name', // (string) 'ID' or 'term_id' or 'name' |
|
146 | - 'order' => 'ASC', // (string) 'ASC' or 'DESC' |
|
147 | - 'hide_empty' => false, // (boolean) whether to show the terms with no post associated. Default: false |
|
148 | - 'hierarchical' => true, // (boolean) whether to show the terms as a hierarchical tree. |
|
149 | - 'number' => '', // (integer) The maximum number of the terms to show. |
|
150 | - 'pad_counts' => false, // (boolean) whether to sum up the post counts with the child post counts. |
|
151 | - 'exclude' => array(), // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list. |
|
145 | + 'orderby' => 'name', // (string) 'ID' or 'term_id' or 'name' |
|
146 | + 'order' => 'ASC', // (string) 'ASC' or 'DESC' |
|
147 | + 'hide_empty' => false, // (boolean) whether to show the terms with no post associated. Default: false |
|
148 | + 'hierarchical' => true, // (boolean) whether to show the terms as a hierarchical tree. |
|
149 | + 'number' => '', // (integer) The maximum number of the terms to show. |
|
150 | + 'pad_counts' => false, // (boolean) whether to sum up the post counts with the child post counts. |
|
151 | + 'exclude' => array(), // (string) Comma separated term IDs to exclude from the list. for example `1` will remove the 'Uncategorized' category from the list. |
|
152 | 152 | 'exclude_tree' => array(), |
153 | - 'include' => array(), // (string) Comma separated term IDs to include in the list. |
|
153 | + 'include' => array(), // (string) Comma separated term IDs to include in the list. |
|
154 | 154 | 'fields' => 'all', |
155 | 155 | 'slug' => '', |
156 | 156 | 'get' => '', |
157 | 157 | 'name__like' => '', |
158 | 158 | 'description__like' => '', |
159 | 159 | 'offset' => '', |
160 | - 'search' => '', // (string) The search keyword to get the term with. |
|
160 | + 'search' => '', // (string) The search keyword to get the term with. |
|
161 | 161 | 'cache_domain' => 'core', |
162 | 162 | ), |
163 | - 'queries' => array(), // (optional, array) 3.3.2+ Sets a query argument for each taxonomy. The array key must be the taxonomy slug and the value is the query argument array. |
|
164 | - 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
163 | + 'queries' => array(), // (optional, array) 3.3.2+ Sets a query argument for each taxonomy. The array key must be the taxonomy slug and the value is the query argument array. |
|
164 | + 'save_unchecked' => true, // (optional, boolean) 3.8.8+ Whether to store the values of unchecked items. |
|
165 | 165 | ); |
166 | 166 | |
167 | 167 | /** |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | |
192 | 192 | $_aJSArray = json_encode( $this->aFieldTypeSlugs ); |
193 | 193 | |
194 | - return parent::getScripts() . |
|
194 | + return parent::getScripts(). |
|
195 | 195 | // return |
196 | 196 | <<<JAVASCRIPTS |
197 | 197 | /* For tabs */ |
@@ -412,22 +412,22 @@ discard block |
||
412 | 412 | // Parse |
413 | 413 | $_aTabs = array(); |
414 | 414 | $_aCheckboxes = array(); |
415 | - foreach( $this->getAsArray( $aField[ 'taxonomy_slugs' ] ) as $_isKey => $_sTaxonomySlug ) { |
|
415 | + foreach ( $this->getAsArray( $aField[ 'taxonomy_slugs' ] ) as $_isKey => $_sTaxonomySlug ) { |
|
416 | 416 | $_aAssociatedDataAttributes = $this->_getDataAttributesOfAssociatedPostTypes( |
417 | 417 | $_sTaxonomySlug, |
418 | 418 | $this->_getPostTypesByTaxonomySlug( $_sTaxonomySlug ) |
419 | 419 | ); |
420 | - $_aTabs[] = $this->_getTaxonomyTab( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes ); |
|
421 | - $_aCheckboxes[] = $this->_getTaxonomyCheckboxes( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes ); |
|
420 | + $_aTabs[ ] = $this->_getTaxonomyTab( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes ); |
|
421 | + $_aCheckboxes[ ] = $this->_getTaxonomyCheckboxes( $aField, $_isKey, $_sTaxonomySlug, $_aAssociatedDataAttributes ); |
|
422 | 422 | } |
423 | 423 | |
424 | 424 | // Output |
425 | - return "<div id='tabbox-{$aField['field_id']}' class='tab-box-container categorydiv' style='max-width:{$aField['max_width']};'>" |
|
425 | + return "<div id='tabbox-{$aField[ 'field_id' ]}' class='tab-box-container categorydiv' style='max-width:{$aField[ 'max_width' ]};'>" |
|
426 | 426 | . "<ul class='tab-box-tabs category-tabs'>" |
427 | 427 | . implode( PHP_EOL, $_aTabs ) |
428 | 428 | . "</ul>" |
429 | 429 | . "<div class='tab-box-contents-container'>" |
430 | - . "<div class='tab-box-contents' style='height: {$aField['height']};'>" |
|
430 | + . "<div class='tab-box-contents' style='height: {$aField[ 'height' ]};'>" |
|
431 | 431 | . implode( PHP_EOL, $_aCheckboxes ) |
432 | 432 | . "</div>" |
433 | 433 | . "</div>" |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | private function _getDataAttributesOfAssociatedPostTypes( $sTaxonomySlusg, $aPostTypes ) { |
454 | 454 | return array( |
455 | 455 | 'data-associated-with' => $sTaxonomySlusg, |
456 | - 'data-associated-post-types' => implode( ',', $aPostTypes ) . ',', // must add a trailing comma for jQuery to detect the item. |
|
456 | + 'data-associated-post-types' => implode( ',', $aPostTypes ).',', // must add a trailing comma for jQuery to detect the item. |
|
457 | 457 | ); |
458 | 458 | } |
459 | 459 | |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | private function _getTaxonomyCheckboxes( array $aField, $sKey, $sTaxonomySlug, $aAttributes ) { |
469 | 469 | |
470 | 470 | $_aTabBoxContainerArguments = array( |
471 | - 'id' => "tab_{$aField['input_id']}_{$sKey}", |
|
471 | + 'id' => "tab_{$aField[ 'input_id' ]}_{$sKey}", |
|
472 | 472 | 'class' => 'tab-box-content', |
473 | 473 | 'style' => $this->getInlineCSS( |
474 | 474 | array( |
@@ -477,9 +477,9 @@ discard block |
||
477 | 477 | ) |
478 | 478 | ), |
479 | 479 | ) + $aAttributes; |
480 | - return "<div " . $this->getAttributes( $_aTabBoxContainerArguments ) . ">" |
|
480 | + return "<div ".$this->getAttributes( $_aTabBoxContainerArguments ).">" |
|
481 | 481 | . $this->getElement( $aField, array( 'before_label', $sKey ) ) |
482 | - . "<div " . $this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ) . ">" |
|
482 | + . "<div ".$this->getAttributes( $this->_getCheckboxContainerAttributes( $aField ) ).">" |
|
483 | 483 | . "</div>" |
484 | 484 | . "<ul class='list:category taxonomychecklist form-no-clear'>" |
485 | 485 | . $this->_getTaxonomyChecklist( $aField, $sKey, $sTaxonomySlug ) |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | 'taxonomy' => $sTaxonomySlug, |
505 | 505 | '_name_prefix' => is_array( $aField[ 'taxonomy_slugs' ] ) |
506 | 506 | ? "{$aField[ '_input_name' ]}[{$sTaxonomySlug}]" |
507 | - : $aField[ '_input_name' ], // name prefix of the input |
|
507 | + : $aField[ '_input_name' ], // name prefix of the input |
|
508 | 508 | '_input_id_prefix' => $aField[ 'input_id' ], |
509 | 509 | '_attributes' => $this->getElementAsArray( |
510 | 510 | $aField, |
@@ -512,12 +512,12 @@ discard block |
||
512 | 512 | ) + $aField[ 'attributes' ], |
513 | 513 | |
514 | 514 | // checked items ( term IDs ) e.g. array( 6, 10, 7, 15 ), |
515 | - '_selected_items' => $this->_getSelectedKeyArray( $aField['value'], $sTaxonomySlug ), |
|
515 | + '_selected_items' => $this->_getSelectedKeyArray( $aField[ 'value' ], $sTaxonomySlug ), |
|
516 | 516 | |
517 | - 'echo' => false, // returns the output |
|
518 | - 'show_post_count' => $aField[ 'show_post_count' ], // 3.2.0+ |
|
519 | - 'show_option_none' => $aField[ 'label_no_term_found' ], // 3.3.2+ |
|
520 | - 'title_li' => $aField[ 'label_list_title' ], // 3.3.2+ |
|
517 | + 'echo' => false, // returns the output |
|
518 | + 'show_post_count' => $aField[ 'show_post_count' ], // 3.2.0+ |
|
519 | + 'show_option_none' => $aField[ 'label_no_term_found' ], // 3.3.2+ |
|
520 | + 'title_li' => $aField[ 'label_list_title' ], // 3.3.2+ |
|
521 | 521 | |
522 | 522 | '_save_unchecked' => $aField[ 'save_unchecked' ], // 3.8.8+ Whether to insert hidden input element for unchecked. |
523 | 523 | ) |
@@ -564,8 +564,8 @@ discard block |
||
564 | 564 | $_aLiAttribues = array( |
565 | 565 | 'class' => 'tab-box-tab', |
566 | 566 | ) + $aAttributes; |
567 | - return "<li " . $this->getAttributes( $_aLiAttribues ) . ">" |
|
568 | - . "<a href='#tab_{$aField['input_id']}_{$sKey}'>" |
|
567 | + return "<li ".$this->getAttributes( $_aLiAttribues ).">" |
|
568 | + . "<a href='#tab_{$aField[ 'input_id' ]}_{$sKey}'>" |
|
569 | 569 | . "<span class='tab-box-tab-text'>" |
570 | 570 | . $this->_getLabelFromTaxonomySlug( $sTaxonomySlug ) |
571 | 571 | . "</span>" |
@@ -106,11 +106,11 @@ discard block |
||
106 | 106 | */ |
107 | 107 | protected function getField( $aField ) { |
108 | 108 | |
109 | - $_aOutput = array(); |
|
110 | - foreach( $this->getAsArray( $aField['label'] ) as $_sKey => $_sLabel ) { |
|
111 | - $_aOutput[] = $this->_getEachRadioButtonOutput( $aField, $_sKey, $_sLabel ); |
|
109 | + $_aOutput = array(); |
|
110 | + foreach ( $this->getAsArray( $aField[ 'label' ] ) as $_sKey => $_sLabel ) { |
|
111 | + $_aOutput[ ] = $this->_getEachRadioButtonOutput( $aField, $_sKey, $_sLabel ); |
|
112 | 112 | } |
113 | - $_aOutput[] = $this->_getUpdateCheckedScript( $aField['input_id'] ); |
|
113 | + $_aOutput[ ] = $this->_getUpdateCheckedScript( $aField[ 'input_id' ] ); |
|
114 | 114 | return implode( PHP_EOL, $_aOutput ); |
115 | 115 | |
116 | 116 | } |
@@ -126,12 +126,12 @@ discard block |
||
126 | 126 | $_aAttributes = $aField[ 'attributes' ] + $this->getElementAsArray( $aField, array( 'attributes', $sKey ) ); |
127 | 127 | $_oRadio = new AdminPageFramework_Input_radio( $_aAttributes ); |
128 | 128 | $_oRadio->setAttributesByKey( $sKey ); |
129 | - $_oRadio->setAttribute( 'data-default', $aField['default'] ); // refered by the repeater script |
|
129 | + $_oRadio->setAttribute( 'data-default', $aField[ 'default' ] ); // refered by the repeater script |
|
130 | 130 | |
131 | 131 | // Output |
132 | 132 | return $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] ) |
133 | - . "<div " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-radio-label' ) . ">" |
|
134 | - . "<label " . $this->getAttributes( |
|
133 | + . "<div ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-container admin-page-framework-radio-label' ).">" |
|
134 | + . "<label ".$this->getAttributes( |
|
135 | 135 | array( |
136 | 136 | 'for' => $_oRadio->getAttribute( 'id' ), |
137 | 137 | 'class' => $_oRadio->getAttribute( 'disabled' ) |
@@ -507,8 +507,8 @@ discard block |
||
507 | 507 | protected function getField( $aField ) { |
508 | 508 | |
509 | 509 | $_aOutput = array(); |
510 | - foreach( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) { |
|
511 | - $_aOutput[] = $this->_getFieldOutputByLabel( |
|
510 | + foreach ( ( array ) $aField[ 'label' ] as $_sKey => $_sLabel ) { |
|
511 | + $_aOutput[ ] = $this->_getFieldOutputByLabel( |
|
512 | 512 | $_sKey, |
513 | 513 | $_sLabel, |
514 | 514 | $aField |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | } |
517 | 517 | |
518 | 518 | // the repeatable field buttons will be replaced with this element. |
519 | - $_aOutput[] = "<div class='repeatable-field-buttons'></div>"; |
|
519 | + $_aOutput[ ] = "<div class='repeatable-field-buttons'></div>"; |
|
520 | 520 | return implode( '', $_aOutput ); |
521 | 521 | |
522 | 522 | } |
@@ -537,27 +537,27 @@ discard block |
||
537 | 537 | $aField[ 'rich' ] = $this->getElementByLabel( $aField[ 'rich' ], $sKey, $aField[ 'label' ] ); |
538 | 538 | $aField[ 'attributes' ] = $_bIsArray |
539 | 539 | ? array( |
540 | - 'name' => $aField[ 'attributes' ][ 'name' ] . "[{$sKey}]", |
|
541 | - 'id' => $aField[ 'attributes' ][ 'id' ] . "_{$sKey}", |
|
540 | + 'name' => $aField[ 'attributes' ][ 'name' ]."[{$sKey}]", |
|
541 | + 'id' => $aField[ 'attributes' ][ 'id' ]."_{$sKey}", |
|
542 | 542 | 'value' => $aField[ 'value' ], |
543 | 543 | ) |
544 | 544 | + $aField[ 'attributes' ] |
545 | 545 | : $aField[ 'attributes' ]; |
546 | - $_aOutput = array( |
|
547 | - $this->getElementByLabel( $aField['before_label'], $sKey, $aField[ 'label' ] ), |
|
546 | + $_aOutput = array( |
|
547 | + $this->getElementByLabel( $aField[ 'before_label' ], $sKey, $aField[ 'label' ] ), |
|
548 | 548 | "<div class='admin-page-framework-input-label-container {$_sClassSelector}'>", |
549 | - "<label for='" . $aField[ 'attributes' ][ 'id' ] . "'>", |
|
550 | - $this->getElementByLabel( $aField['before_input'], $sKey, $aField[ 'label' ] ), |
|
549 | + "<label for='".$aField[ 'attributes' ][ 'id' ]."'>", |
|
550 | + $this->getElementByLabel( $aField[ 'before_input' ], $sKey, $aField[ 'label' ] ), |
|
551 | 551 | $_sLabel |
552 | - ? "<span " . $this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ) . ">" |
|
552 | + ? "<span ".$this->getLabelContainerAttributes( $aField, 'admin-page-framework-input-label-string' ).">" |
|
553 | 553 | . $_sLabel |
554 | 554 | . "</span>" |
555 | 555 | : '', |
556 | 556 | $this->_getEditor( $aField ), |
557 | - $this->getElementByLabel( $aField['after_input'], $sKey, $aField[ 'label' ] ), |
|
557 | + $this->getElementByLabel( $aField[ 'after_input' ], $sKey, $aField[ 'label' ] ), |
|
558 | 558 | "</label>", |
559 | 559 | "</div>", |
560 | - $this->getElementByLabel( $aField['after_label'], $sKey, $aField[ 'label' ] ), |
|
560 | + $this->getElementByLabel( $aField[ 'after_label' ], $sKey, $aField[ 'label' ] ), |
|
561 | 561 | ); |
562 | 562 | return implode( '', $_aOutput ); |
563 | 563 | |
@@ -572,31 +572,31 @@ discard block |
||
572 | 572 | */ |
573 | 573 | private function _getEditor( $aField ) { |
574 | 574 | |
575 | - unset( $aField['attributes']['value'] ); |
|
575 | + unset( $aField[ 'attributes' ][ 'value' ] ); |
|
576 | 576 | |
577 | 577 | // For no TinyMCE |
578 | - if ( empty( $aField['rich'] ) || ! $this->isTinyMCESupported() ) { |
|
579 | - return "<textarea " . $this->getAttributes( $aField['attributes'] ) . " >" // this method is defined in the base class |
|
580 | - . esc_textarea( $aField['value'] ) |
|
578 | + if ( empty( $aField[ 'rich' ] ) || !$this->isTinyMCESupported() ) { |
|
579 | + return "<textarea ".$this->getAttributes( $aField[ 'attributes' ] )." >" // this method is defined in the base class |
|
580 | + . esc_textarea( $aField[ 'value' ] ) |
|
581 | 581 | . "</textarea>"; |
582 | 582 | } |
583 | 583 | |
584 | 584 | // Rich editor |
585 | 585 | ob_start(); |
586 | 586 | wp_editor( |
587 | - $aField['value'], |
|
588 | - $aField['attributes']['id'], |
|
587 | + $aField[ 'value' ], |
|
588 | + $aField[ 'attributes' ][ 'id' ], |
|
589 | 589 | $this->uniteArrays( |
590 | - ( array ) $aField['rich'], |
|
590 | + ( array ) $aField[ 'rich' ], |
|
591 | 591 | array( |
592 | 592 | 'wpautop' => true, // use wpautop? |
593 | 593 | 'media_buttons' => true, // show insert/upload button(s) |
594 | - 'textarea_name' => $aField['attributes']['name'], |
|
595 | - 'textarea_rows' => $aField['attributes']['rows'], |
|
594 | + 'textarea_name' => $aField[ 'attributes' ][ 'name' ], |
|
595 | + 'textarea_rows' => $aField[ 'attributes' ][ 'rows' ], |
|
596 | 596 | 'tabindex' => '', |
597 | 597 | 'tabfocus_elements' => ':prev,:next', // the previous and next element ID to move the focus to when pressing the Tab key in TinyMCE |
598 | 598 | 'editor_css' => '', // intended for extra styles for both visual and Text editors buttons, needs to include the <style> tags, can use "scoped". |
599 | - 'editor_class' => $aField['attributes']['class'], // add extra class(es) to the editor textarea |
|
599 | + 'editor_class' => $aField[ 'attributes' ][ 'class' ], // add extra class(es) to the editor textarea |
|
600 | 600 | 'teeny' => false, // output the minimal editor config used in Press This |
601 | 601 | 'dfw' => false, // replace the default fullscreen with DFW (needs specific DOM elements and css) |
602 | 602 | 'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array() |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | ob_end_clean(); |
609 | 609 | |
610 | 610 | return $_sContent |
611 | - . $this->_getScriptForRichEditor( $aField['attributes']['id'] ); |
|
611 | + . $this->_getScriptForRichEditor( $aField[ 'attributes' ][ 'id' ] ); |
|
612 | 612 | |
613 | 613 | } |
614 | 614 |