Changeset 19172 for trunk/wp-includes/class-wp-editor.php
- Timestamp:
- 11/05/2011 04:00:38 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-editor.php
r19126 r19172 140 140 141 141 if ( $this->this_quicktags ) { 142 $qt_buttons = array();143 142 144 143 $qtInit = array( 145 144 'id' => $editor_id, 146 'buttons' => '', 147 'disabled_buttons' => '' 145 'buttons' => '' 148 146 ); 149 147 … … 151 149 $qtInit = array_merge($qtInit, $set['quicktags']); 152 150 153 $qtInit = apply_filters( 'quicktags_settings', $qtInit, $editor_id ); 154 151 if ( empty($qtInit['buttons']) ) 152 $qtInit['buttons'] = 'strong,em,link,block,del,ins,img,ul,ol,li,code,more,spell,close'; 153 154 if ( $set['dfw'] ) 155 $qtInit['buttons'] .= ',fullscreen'; 156 157 $qtInit = apply_filters('quicktags_settings', $qtInit, $editor_id); 155 158 $this->qt_settings[$editor_id] = $qtInit; 156 159 157 if ( !empty($qtInit['buttons']) || !empty($qtInit['disabled_buttons']) ) { 158 if ( strpos( ',' . $qtInit['buttons'] . ',', ',link,' ) !== false ) 159 $qt_buttons[] = 'link'; 160 161 if ( strpos( ',' . $qtInit['disabled_buttons'] . ',', ',link,' ) !== false ) 162 $qt_buttons = array(); 163 } else { 164 $qt_buttons[] = 'link'; 165 } 166 167 if ( $set['dfw'] ) 168 $qt_buttons[] = 'fullscreen'; 169 170 $this->qt_buttons = array_merge( $this->qt_buttons, $qt_buttons ); 160 $this->qt_buttons = array_merge( $this->qt_buttons, explode(',', $qtInit['buttons']) ); 171 161 } 172 162
Note: See TracChangeset
for help on using the changeset viewer.