Changeset 9272 for trunk/wp-admin/plugins.php
- Timestamp:
- 10/22/2008 12:08:22 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugins.php
r9233 r9272 222 222 update_option('recently_activated', $recently_activated); 223 223 224 $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());225 226 224 foreach( (array)$all_plugins as $plugin_file => $plugin_data) { 227 225 228 //Translate fields 229 if( !empty($plugin_data['TextDomain']) ) { 230 if( !empty( $plugin_data['DomainPath'] ) ) 231 load_plugin_textdomain($plugin_data['TextDomain'], dirname($plugin_file). $plugin_data['DomainPath']); 232 else 233 load_plugin_textdomain($plugin_data['TextDomain'], dirname($plugin_file)); 234 235 foreach ( array('Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version') as $field ) 236 $plugin_data[ $field ] = translate($plugin_data[ $field ], $plugin_data['TextDomain']); 237 } 238 239 //Apply Markup 240 $plugin_data['Title'] = $plugin_data['Name']; 241 if ( !empty($plugin_data['PluginURI']) && !empty($plugin_data['Name']) ) 242 $plugin_data['Title'] = '<a href="' . $plugin_data['PluginURI'] . '" title="'.__( 'Visit plugin homepage' ).'">' . $plugin_data['Name'] . '</a>'; 243 244 if ( ! empty($plugin_data['AuthorURI']) ) 245 $plugin_data['Author'] = '<a href="' . $plugin_data['AuthorURI'] . '" title="'.__( 'Visit author homepage' ).'">' . $plugin_data['Author'] . '</a>'; 246 247 $plugin_data['Description'] = wptexturize( $plugin_data['Description'] ); 248 249 // Sanitize all displayed data 250 $plugin_data['Title'] = wp_kses($plugin_data['Title'], $plugins_allowedtags); 251 $plugin_data['Version'] = wp_kses($plugin_data['Version'], $plugins_allowedtags); 252 $plugin_data['Description'] = wp_kses($plugin_data['Description'], $plugins_allowedtags); 253 $plugin_data['Author'] = wp_kses($plugin_data['Author'], $plugins_allowedtags); 254 if( ! empty($plugin_data['Author']) ) 255 $plugin_data['Description'] .= ' <cite>' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.</cite>'; 226 //Translate, Apply Markup, Sanitize HTML 227 $plugin_data = _get_plugin_data_markup_translate($plugin_data, true, true); 256 228 257 229 //Filter into individual sections
Note: See TracChangeset
for help on using the changeset viewer.