[wp-testers] CSS in WYSIWYG

Stefano steagl at people.it
Mon Dec 12 14:17:08 GMT 2005


Il Sun, 11 Dec 2005 19:56:50 -0600, Andy Skelton <skeltoac at gmail.com>
scrive:

>Here's a thought: theme authors now have functions.php. In the editor
>we could do something like this:
>
>$image_classes = apply_filter('editor_image_classes', array());
>if ( count($image_classes) > 0 ) {
> echo "<select ...>";
> foreach ( $image_classes as $label => $class )
>  echo "<option value='$class'>$label</option>";
> echo "</select>";
>}
>
>And then the theme authors would do this:
>
>add_filter('editor_image_classes', 'oogabooga_image_classes');
>function oogabooga_image_classes($image_classes) {
> $image_classes += array('alignright' => 'alignright', 'alt
>(Alternate)' => 'alt');
> return $image_classes;

I think it's a great idea, this way allowa theme developper have theyr
own class for images and other stuff allowing users not go back to
quicktags.

-- 

Stefano Aglietti - StallonIt on IRCnet - ICQ#: 2078431
Email: steve at 40annibuttati.it steagl at people.it
Sites: http://www.40annibuttati.it
       http://www.wordpress-it.it


More information about the wp-testers mailing list