section into the generated page section, and by allowing parts of the page header and footer to be altered by adding options to the header.php and footer.php files using the standard child-theme methods. So - you can extend the theme essentially the same way - adding override or new CSS rules in ttw_extened_wp_head; inserting HTML into the head using ttw_extended_header_insert, or adding stuff to the footer with ttw_extended_footer. You can also build your own admin tab that will be added to the standard TTW admin page (but you don't have to, necessarily). One of the main intents of this extended option is to allow very fancy headers. This will likely involve JavaScripts and more. A suggested method for sharing a TTW extension would be to provide a zip file that gets unpacked and uploaded to the twentyten-weaver theme directory on the WP site. You should only have to replace the default ttw_extend.php file, and provide whatever Javascript (put in the js subdirectory) or auxilliary files that are required. */ define('TTW_EXTENSIONS', false); /* change to true if you've provided extensions. Noothing will happen with TTW extensions when false. */ function ttw_add_extended_tab($before, $after) { /* add appropriate layout to add the extended control panel. Other than changing the name, you shouldn't need to change any part of this function. */ if (!TTW_EXTENSIONS) return; echo($before."\n"); ttw_extended_admin(); echo($after."\n"); } function ttw_add_extended_tab_title($before, $after) { /* if the tabber needs a special title, this will be called. */ if (!TTW_EXTENSIONS) return; echo($before); echo('Extended'); echo($after); } function ttw_extended_admin() { /* Admin tab for extensions Note that the name for the form post action must be "ttw_save_extension", which will result in the function ttw_save_extension() being called with all $_POST vars set according to the fields of your form. We suggest you use a prefix of ttwx_ for values you save in the WP db via ttw_getopt, ttw_setopt, and ttw_deleteopt. Note that implementing this is optional - you could add extensions stricty using the appropriate extended functions provided. */ if (!TTW_EXTENSIONS) return; /* don't do anything if not enabled */ ?>

Extensions

Twenty Ten Weaver Extensions

This page can be customized to provide your own extensions.

You can place any control values you need for your extension in a form here.


This is an example text entry box that could be used for something interesting.


TTW Extended Options Saved

'; } function ttw_extended_admin_scripts() { /* if you need to add a JS to your admin panel only, use wp_enqueue_script or wp_enqueue_style here to do so. */ if (!TTW_EXTENSIONS) return; } function ttw_extended_wp_head() { /* this is where your extensions can insert stuff right before the tag of the generate page. This will be after anything generated by the main TTW theme, and can include JS includes and more CSS rules between