Literally over the railing on our back deck.

Yum!
/** * Plugin Name: Code Blocks * Plugin URI: http://subinsb.com/posting-code-blocks-on-wordpress * Description: Add Code Blocks To Your posts and pages in the Visual Editor or Text Editor. * Version: 0.3 * Author: Subin Siby * Author URI: http://subinsb.com * License: GPLv3 */ function CBS_adminMenu() { add_submenu_page('edit.php', __('Code Blocks'), __('Code Blocks'), 'manage_options', 'CBS_admin', 'CBS_optPage'); } add_action('admin_menu', 'CBS_adminMenu'); function CBSmakeItPretty($s){ $s=str_replace('\"','"',$s); $s=str_replace("\'",'"',$s); return $s; } function CBS_optPage(){ if(isset($_POST['submit'])){ $isV=isset($_POST['visual']) ? "":"off"; update_option("CBS_InVisual",$isV); $isTx=isset($_POST['text']) ? "":"off"; update_option("CBS_InText",$isTx); update_option("CBS_StartCode",$_POST['before']); update_option("CBS_EndCode",$_POST['after']); $isPt=isset($_POST['ptag']) ? "":"off"; update_option("CBS_PTag",$isPt); if(!file_put_contents(WP_PLUGIN_DIR. '/code-blocks/editor-style.css', $_POST['css']) && $_POST['css']!=""){ echo '
Failed To Save Custom CSS. Make Sure you have Write permission in wp-contents/plugins folder.
Saved Settings
":get_option("CBS_StartCode");
$endCode=get_option("CBS_EndCode")=="" ? "
":get_option("CBS_EndCode");
$vchecked=get_option("CBS_InVisual")=="" ? "checked='checked'":"";
$tchecked=get_option("CBS_InText")=="" ? "checked='checked'":"";
$pchecked=get_option("CBS_PTag")=="" ? "checked='checked'":"";
?>
":get_option("CBS_StartCode");
$endCode=get_option("CBS_EndCode")=="" ? "
":get_option("CBS_EndCode");
$plugin_array["CBSbutton"] = $url.'/button.php?start='.urlencode(CBSmakeItPretty($startCode)).'&end='.urlencode(CBSmakeItPretty($endCode))."&nop=".get_option("CBS_PTag");
return $plugin_array;
}
/* HTML Text Editor */
function CBS_teButton(){
//Remove Linebreaks
$startCode=get_option("CBS_StartCode")=="" ? "":get_option("CBS_StartCode");
$endCode=get_option("CBS_EndCode")=="" ? "
":get_option("CBS_EndCode");
$right_tag = CBSmakeItPretty(str_replace("\r\n","",$endCode));
$left_tag = CBSmakeItPretty(str_replace("\r\n","",$startCode));
if(get_option("CBS_InText")!="off" && get_current_screen()->base!="" && get_current_screen()->base=="post"){
$content = '";
echo $content;
}
}
/* Text Editor functions */
function CBS_init(){
if (current_user_can('edit_posts') && current_user_can('edit_pages')) {
add_action('admin_print_footer_scripts', 'CBS_teButton');
}
}
add_action("admin_init", "CBS_init");
function CBS_custom_css($wp) {
$url = plugins_url()."/code-blocks";
$wp .= ',' . $url.'/editor-style.css';
return $wp;
}
add_filter('mce_css','CBS_custom_css');
?>
So I’ve started adding links to the link collection. Yep, you heard that right. You see one of the main reasons for this site is to consolidate my ever growing bookmark list spread across multiple browsers on multiple devices. It has been growing for many years, and being the pack rat that I am I bookmark everything that might be useful. Now all I have to do is remember to clean out my bookmarks on a regular basis.
Anyone know of a firefox, chrome, safari, konquerer plugin that will do that?
FYI: If you are setting up a new wordpress installation and want a links/blogroll section you will need to install the WordPress Link Manager plugin.
Many thanks to Lorelle at Lorelle on WordPress for posting this.