' . $_REQUEST['content2']; break; case 'quote': $content = '
' . $_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 . '
' . $_REQUEST['content']; break; case "video": list($garbage,$video_id) = split("v=", $_REQUEST['content']); $content = ''; if ($_REQUEST['content2']) $content .= '

' . $_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_input() { $s = '

' . __('Tags') . '


' . __('Comma separated (e.g. Wordpress, Plugins)') . '
'; return $s; } function get_images_from_uri($uri) { $content = wp_remote_fopen($uri); if ( false === $content ) return ''; $pattern = '/src=[\'"]?([^\'" >]+)[\'" >]/'; preg_match_all($pattern, $content, $matches); if ( empty($matches[1]) ) return ''; $from_host = parse_url($uri); $from_host = $from_host['host']; $from_host = explode('.', $from_host); $count = count($from_host); $from_host = $from_host[$count - 2] . '.' . $from_host[$count - 1]; $sources = array(); foreach ($matches[1] as $src) { if ( false !== strpos($src, '&') ) continue; $img_host = parse_url($src); $img_host = $img_host['host']; if ( false === strpos($img_host, $from_host) ) continue; $sources[] = $src; } return "'" . implode("','", $sources) . "'"; } // Clean up the data being passed in $title = stripslashes($_GET['t']); if ( !empty($_GET['load']) && 'photo' == $_GET['load'] ) { ?>

     

> <?php _e('Quick Post') ?>

     

(optional)') ?>

     


(optional)') ?>