#54: Updated Custom CSS Plugin
Searching, reading, learning … then improve … :p)
After knowing more about Wordpress MU (wpmu), I know that my first plugin for Wordpress MU (Custom CSS menu) is not good in term of coding. It use two separate file, which is actually possible to use only one. Not only two files, but also need to copy one of them to wp-admin folder.
For you who like that plugin (like me :p), just download the latest ones from here. Save the file as a PHP file (if you don’t know how: right click, and then Save Link As … / Save Target As … rename the destination file to “ccss.php”), and copy it to your wp-content/mu-plugins folder, and you will get the additional Custom CSS sub-menu under the Design menu.
The difference between the 1st version and this update is the function that is used to insert this plugin into the core code. When I wrote the 1st version, I only knew about adding the submenu item using add_action() and the global variable $submenu. I did try some function about adding submenu, but always failed (I guess, I missunderstood some explanation from codex.wordpress.org developer’s document).
Then, I found an interesting example from Power Tools plugin. It use add_action and add_submenu_page to insert both submenu item and submenu function. I try with my own style of coding, and it works.
add_action is a function to add our own function to the main wordpress function. For example, if we call add_action('admin_menu', 'our_own_test_function1'); then wordpress will also execute function called our_own_test_function1 when the main admin_menu function is called.
add_submenu_page is a function to add our submenu item into the parent menu. The syntax is : add_submenu_page(parent, page_title, submenu_title, user_level, file_or_pageid, function_name). If we want to ‘include’ our function_name to the parent (file), then we must supply the unique pageid, and use it in our form action (<form action="parent?page=pageid">).
Hope it is useful,

See discussion here;
http://mu.wordpress.org/forums/topic.php?id=9879#post-60056
Thanks.
Comment by nonegiven — 22 October 2008 @ 8:50 am
Hi,
Interesting by your plugin but the link “just download the latest ones from here” lead to a jpg link ????
Comment by samti — 21 November 2008 @ 6:28 pm
Sorry ! Didn’t read § My fault !!
Forgot my previous stupid comment.
Thank to share your work on wordpress µ
Comment by samti — 21 November 2008 @ 7:47 pm
It says:
Warning: Cannot modify header information - headers already sent by (output started at E:AppServwwwpsoft.org.uawp-contentpluginsccss.php:1) in E:AppServwwwpsoft.org.uawp-includesclasses.php on line 806
If plugin is turned on - every time on every trying to redirect.
Comment by EvolMate — 1 December 2008 @ 8:07 am
@EvolMate: I believe that you already change something in your WPMU core (PHP) files. Its look like, you add some print / echo command in the very beginning of PHP code. Please check them …
Comment by rizapn — 2 December 2008 @ 12:21 pm
Works great! Thanks!
Comment by au໘ust — 12 January 2009 @ 5:05 pm
Thanks a lot! Great thing!
Comment by zarej — 4 February 2009 @ 2:38 am
why not the plugin show the standard css file so that we just have to edit it.
because user have now a blank page and it is not so easy to make modifications on a blank page
Comment by bebop — 18 February 2009 @ 4:51 pm
which file are we able to edit ?
style.css or also layout.css
i would like users to be able to edit layout.css : to change column width for example
is it possible ?
Comment by greenzer — 18 February 2009 @ 4:59 pm
@bebop: You just need to ADD your code into the existing css. The file is blank, but the existing css will also be called. So, just add your new css AND/OR overwrite the old ones that you want to overwrite. Anything else will be the same.
@greenzer: yes, it is possible. This plugin is not to EDIT the existing css file(s), but adding the css code to them. Just rewrite the part that you want to ‘edit’ …
Comment by rizapn — 6 March 2009 @ 9:33 am
CSS ( Cascading Style Sheets ) - Why CSS ? - Introduction - Css Link Properties / Examples - Css List Properties / Examples - Css Layer Properties / Examples - Css TextBox Properties / Examples - Css Font Properties / Examples - Css Text Properties / Examples - Css Cursor Properties / Examples - Css Background Properties / Examples - Css Table Properties / Examples - Css Scroll Bar Properties / Examples - Tools - Units - Parameters - Template Page - Web Design
http://www.css-lessons.ucoz.com/
Comment by css — 15 September 2009 @ 12:44 pm