' . $_REQUEST['content'];
if ($_REQUEST['content2']) {
$content .= '
';
$content = $content . $_REQUEST['content2'];
}
break;
case 'photo':
if ($_REQUEST['photo_link'])
$content = '';
$content .= '';
if ($_REQUEST['photo_link'])
$content .= '
';
if ($_REQUEST['content'])
$content = $content . "\n".$_REQUEST['content'];
break;
case "video":
list($garbage,$video_id) = split("v=", $_REQUEST['content']);
$content = '';
if ($_REQUEST['content2'])
$content .= "\n" . $_REQUEST['content2'];
break;
}
$quick['post_content'] = $content;
$post_ID = wp_insert_post($quick, true);
if ( is_wp_error($post_ID) )
wp_die($wp_error);
return $post_ID;
}
function tag_div() { ?>
]+src=[\'"]([^\'" >]+?)[\'" >]/is';
preg_match_all($pattern, $content, $matches);
if ( empty($matches[1]) ) return '';
$sources = array();
foreach ($matches[1] as $src) {
if ( false !== strpos($src, '&') )
continue;
$host = parse_url($_GET['u']);
if (strpos($src, 'http://') === false) {
$src = 'http://'.str_replace('//','/', $host['host'].'/'.$src);
}
$sources[] = $src;
}
return "'" . implode("','", $sources) . "'";
}
function press_this_js_init() { ?>
(function() {
var base = tinymce.baseURL, sl = tinymce.ScriptLoader, ln = "";
sl.markDone(base + '/langs/' + ln + '.js');
sl.markDone(base + '/themes/advanced/langs/' + ln + '.js');
sl.markDone(base + '/themes/advanced/langs/' + ln + '_dlg.js');
})();
tinyMCE.init({
mode: "textareas",
editor_selector: "mceEditor",
language : "",
width: "100%",
theme : "advanced",
theme_advanced_buttons1 : "bold,italic,underline,blockquote,separator,strikethrough,bullist,numlist,undo,redo,link,unlink",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
skin : "wp_theme",
dialog_type : "modal",
relative_urls : false,
remove_script_host : false,
convert_urls : false,
apply_source_formatting : false,
remove_linebreaks : true,
accessibility_focus : false,
tab_focus : ":next",
plugins : "safari,inlinepopups",
entity_encoding : "raw"
});
jQuery('#tags-input').hide();
tag_update_quickclicks();
// add the quickadd form
jQuery('#jaxtag').prepend('
'+postL10n.separate+'');
jQuery('#tagadd').click( tag_flush_to_text );
jQuery('#newtag').focus(function() {
if ( this.value == postL10n.addTag )
jQuery(this).val( '' ).removeClass( 'form-input-tip' );
});
jQuery('#newtag').blur(function() {
if ( this.value == '' )
jQuery(this).val( postL10n.addTag ).addClass( 'form-input-tip' );
});
// auto-save tags on post save/publish
jQuery('#publish').click( tag_save_on_publish );
jQuery('#save-post').click( tag_save_on_publish );
>