PressThis fixes from noel, fixes #11011
git-svn-id: http://svn.automattic.com/wordpress/trunk@12094 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
aca36c75ce
commit
efe32b7285
File diff suppressed because one or more lines are too long
|
@ -1,8 +1,11 @@
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font: 13px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;
|
font: 13px "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
min-width: 675px;
|
||||||
|
min-height: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
@ -17,7 +20,7 @@ img {
|
||||||
}
|
}
|
||||||
|
|
||||||
.tagchecklist span a {
|
.tagchecklist span a {
|
||||||
background: transparent url(../images/xit.gif) no-repeat 0 0;
|
background: transparent url(../images/xit.gif) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#poststuff #edButtonPreview,
|
#poststuff #edButtonPreview,
|
||||||
|
@ -74,7 +77,6 @@ div.zerosize {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: absolute;
|
|
||||||
width: 0;
|
width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,16 +88,13 @@ div.zerosize {
|
||||||
.posting {
|
.posting {
|
||||||
margin-right: 212px;
|
margin-right: 212px;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
* html .posting {
|
|
||||||
width: 470px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#side-info-column {
|
#side-info-column {
|
||||||
float: right;
|
float: right;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
position: relative;
|
||||||
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#side-info-column .sleeve {
|
#side-info-column .sleeve {
|
||||||
|
@ -107,7 +106,7 @@ div.zerosize {
|
||||||
margin: 8px;
|
margin: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#poststuff h2, #poststuff h3 {
|
#poststuff h2,#poststuff h3 {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
@ -147,6 +146,16 @@ h3.tb {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stuffbox:hover .handlediv {
|
||||||
|
background: transparent url(../images/menu-bits-vs.gif) no-repeat scroll left -111px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.handlediv {
|
||||||
|
float: right;
|
||||||
|
height: 26px;
|
||||||
|
width: 23px;
|
||||||
|
}
|
||||||
|
|
||||||
#title,
|
#title,
|
||||||
.tbtitle {
|
.tbtitle {
|
||||||
-moz-border-radius: 6px;
|
-moz-border-radius: 6px;
|
||||||
|
@ -167,7 +176,7 @@ h3.tb {
|
||||||
}
|
}
|
||||||
|
|
||||||
#title {
|
#title {
|
||||||
width: 97%;
|
width: 97%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-container {
|
.editor-container {
|
||||||
|
@ -180,29 +189,26 @@ h3.tb {
|
||||||
}
|
}
|
||||||
|
|
||||||
.postdivrich {
|
.postdivrich {
|
||||||
position: relative;
|
|
||||||
padding-top: 25px;
|
padding-top: 25px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#actions {
|
.actions {
|
||||||
float: right;
|
float: right;
|
||||||
margin: -19px 0 0;
|
margin: -19px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#extra_fields #actions {
|
#extra-fields .actions {
|
||||||
clear: both;
|
margin: -15px -5px 0 0;
|
||||||
position: relative;
|
|
||||||
right: 0px;
|
|
||||||
margin: -24px 0 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#actions li {
|
.actions li {
|
||||||
float: left;
|
float: left;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#extra_fields .button {
|
#extra-fields .button {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
padding: 3px 6px;
|
padding: 3px 6px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
@ -224,29 +230,30 @@ h3.tb {
|
||||||
#img_container {
|
#img_container {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#img_container_container {
|
#img_container_container {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#extra_fields {
|
#extra-fields {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
#extra_fields .postbox {
|
#waiting {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#extra-fields .postbox {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#extra_fields .titlewrap {
|
#extra-fields .titlewrap {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#img_container {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#img_container a {
|
#img_container a {
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -291,16 +298,11 @@ h3.tb {
|
||||||
/* Submit Column */
|
/* Submit Column */
|
||||||
#viewsite {
|
#viewsite {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0 0 20px 0;
|
margin: 0 0 20px 5px;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
#viewsite .button {
|
|
||||||
margin: 0;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wp-hidden-children
|
.wp-hidden-children
|
||||||
.wp-hidden-child {
|
.wp-hidden-child {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -316,7 +318,7 @@ h3.tb {
|
||||||
|
|
||||||
#category-add input {
|
#category-add input {
|
||||||
width: 94%;
|
width: 94%;
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
font-family: Verdana,Arial,Helvetica,sans-serif;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
|
@ -327,7 +329,7 @@ h3.tb {
|
||||||
-x-system-font: none;
|
-x-system-font: none;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif;
|
font-family: "Lucida Grande","Bitstream Vera Sans",Verdana,Arial,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 2em;
|
height: 2em;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
|
@ -368,6 +370,7 @@ ul.categorychecklist li {
|
||||||
.screen-reader-text {
|
.screen-reader-text {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tagsdiv .newtag {
|
.tagsdiv .newtag {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
@ -425,7 +428,6 @@ ul.categorychecklist li {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Submit */
|
/* Submit */
|
||||||
|
|
||||||
#saving {
|
#saving {
|
||||||
display: inline;
|
display: inline;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
@ -437,7 +439,7 @@ ul.categorychecklist li {
|
||||||
.button-secondary,
|
.button-secondary,
|
||||||
.button-highlighted,
|
.button-highlighted,
|
||||||
#postcustomstuff .submit input {
|
#postcustomstuff .submit input {
|
||||||
font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif;
|
font-family: "Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 11px !important;
|
font-size: 11px !important;
|
||||||
line-height: 16px;
|
line-height: 16px;
|
||||||
|
@ -542,6 +544,7 @@ ul.categorychecklist li {
|
||||||
#footer p a {
|
#footer p a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer p a:hover {
|
#footer p a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
@ -566,7 +569,7 @@ ul.categorychecklist li {
|
||||||
/* tag hints */
|
/* tag hints */
|
||||||
.taghint {
|
.taghint {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
margin: -17px 6px 0 0;
|
margin: -17px 0 0 7px;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,19 +100,19 @@ if ( ! empty($selection) ) {
|
||||||
$url = isset($_GET['u']) ? esc_url($_GET['u']) : '';
|
$url = isset($_GET['u']) ? esc_url($_GET['u']) : '';
|
||||||
$image = isset($_GET['i']) ? $_GET['i'] : '';
|
$image = isset($_GET['i']) ? $_GET['i'] : '';
|
||||||
|
|
||||||
if ( !empty($_GET['ajax']) ) {
|
if ( !empty($_REQUEST['ajax']) ) {
|
||||||
switch ($_GET['ajax']) {
|
switch ($_REQUEST['ajax']) {
|
||||||
case 'video': ?>
|
case 'video': ?>
|
||||||
<script type="text/javascript" charset="utf-8">
|
<script type="text/javascript" charset="utf-8">
|
||||||
/* <![CDATA[ */
|
/* <![CDATA[ */
|
||||||
jQuery('.select').click(function() {
|
jQuery('.select').click(function() {
|
||||||
append_editor(jQuery('#embed-code').val());
|
append_editor(jQuery('#embed-code').val());
|
||||||
jQuery('#extra_fields').hide();
|
jQuery('#extra-fields').hide();
|
||||||
jQuery('#extra_fields').html('');
|
jQuery('#extra-fields').html('');
|
||||||
});
|
});
|
||||||
jQuery('.close').click(function() {
|
jQuery('.close').click(function() {
|
||||||
jQuery('#extra_fields').hide();
|
jQuery('#extra-fields').hide();
|
||||||
jQuery('#extra_fields').html('');
|
jQuery('#extra-fields').html('');
|
||||||
});
|
});
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
</script>
|
</script>
|
||||||
|
@ -192,13 +192,14 @@ if ( !empty($_GET['ajax']) ) {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function get_images_from_uri($uri) {
|
function get_images_from_uri($uri) {
|
||||||
|
$uri = preg_replace('/\/#.+?$/','', $uri);
|
||||||
if( preg_match('/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )
|
if( preg_match('/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )
|
||||||
return "'".html_entity_decode($uri)."'";
|
return "'".html_entity_decode($uri)."'";
|
||||||
$content = wp_remote_fopen($uri);
|
$content = wp_remote_fopen($uri);
|
||||||
if ( false === $content )
|
if ( false === $content )
|
||||||
return '';
|
return '';
|
||||||
$host = parse_url($uri);
|
$host = parse_url($uri);
|
||||||
$pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif)[^<>\'\"]*)(\2)([^>]*)\/*>/is';
|
$pattern = '/<img ([^>]*)src=(\"|\')([^<>\'\"]+)(\2)([^>]*)\/*>/is';
|
||||||
preg_match_all($pattern, $content, $matches);
|
preg_match_all($pattern, $content, $matches);
|
||||||
if ( empty($matches[0]) )
|
if ( empty($matches[0]) )
|
||||||
return '';
|
return '';
|
||||||
|
@ -215,15 +216,15 @@ if ( !empty($_GET['ajax']) ) {
|
||||||
}
|
}
|
||||||
return "'" . implode("','", $sources) . "'";
|
return "'" . implode("','", $sources) . "'";
|
||||||
}
|
}
|
||||||
$url = urldecode($url);
|
$url = wp_kses(urldecode($url), null);
|
||||||
echo 'new Array('.get_images_from_uri($url).')';
|
echo 'new Array('.get_images_from_uri($url).')';
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'photo_js': ?>
|
case 'photo_js': ?>
|
||||||
// gather images and load some default JS
|
// gather images and load some default JS
|
||||||
var last = null
|
var last = null
|
||||||
var img, img_tag, aspect, w, h, skip, i, strtoappend = "";
|
var img, img_tag, aspect, w, h, skip, i, strtoappend = "";
|
||||||
|
if(photostorage == false) {
|
||||||
var my_src = eval(
|
var my_src = eval(
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
|
@ -249,7 +250,7 @@ if ( !empty($_GET['ajax']) ) {
|
||||||
strtoappend = '<?php _e('Unable to retrieve images or no images on page.'); ?>';
|
strtoappend = '<?php _e('Unable to retrieve images or no images on page.'); ?>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (i = 0; i < my_src.length; i++) {
|
for (i = 0; i < my_src.length; i++) {
|
||||||
img = new Image();
|
img = new Image();
|
||||||
img.src = my_src[i];
|
img.src = my_src[i];
|
||||||
|
@ -294,26 +295,12 @@ if ( !empty($_GET['ajax']) ) {
|
||||||
desc = jQuery('#this_photo_description').val();
|
desc = jQuery('#this_photo_description').val();
|
||||||
src = jQuery('#this_photo').val();
|
src = jQuery('#this_photo').val();
|
||||||
pick(src, desc);
|
pick(src, desc);
|
||||||
jQuery('#extra_fields').hide();
|
jQuery('#extra-fields').hide();
|
||||||
jQuery('#extra_fields').html('');
|
jQuery('#extra-fields').html('');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
jQuery('#extra-fields').html('<div class="postbox"><h2>Add Photos <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul class="actions"><li><a href="#" id="photo-add-url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>');
|
||||||
jQuery(document).ready(function() {
|
|
||||||
jQuery('#extra_fields').html('<div class="postbox"><h2>Photo <small id="photo_directions">(<?php _e("click images to select") ?>)</small></h2><ul id="actions"><li><a href="#" id="photo_add_url" class="thickbox button"><?php _e("Add from URL") ?> +</a></li></ul><div class="inside"><div class="titlewrap"><div id="img_container"></div></div><p id="options"><a href="#" class="close button"><?php _e('Cancel'); ?></a><a href="#" class="refresh button"><?php _e('Refresh'); ?></a></p></div>');
|
|
||||||
jQuery('.close').click(function() {
|
|
||||||
jQuery('#extra_fields').hide();
|
|
||||||
jQuery('#extra_fields').html('');
|
|
||||||
});
|
|
||||||
jQuery('.refresh').click(function() {
|
|
||||||
show('photo');
|
|
||||||
});
|
|
||||||
jQuery('#img_container').html(strtoappend);
|
jQuery('#img_container').html(strtoappend);
|
||||||
jQuery('#photo_add_url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500');
|
|
||||||
tb_init('#extra_fields .thickbox');
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
<?php break;
|
<?php break;
|
||||||
}
|
}
|
||||||
die;
|
die;
|
||||||
|
@ -328,17 +315,18 @@ die;
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
add_thickbox();
|
add_thickbox();
|
||||||
wp_enqueue_style('press-this');
|
wp_enqueue_style( 'press-this' );
|
||||||
wp_enqueue_style('press-this-ie');
|
wp_enqueue_style( 'press-this-ie');
|
||||||
wp_enqueue_style( 'colors' );
|
wp_enqueue_style( 'colors' );
|
||||||
wp_enqueue_script( 'post' );
|
wp_enqueue_script( 'post' );
|
||||||
wp_enqueue_script('editor');
|
wp_enqueue_script( 'editor' );
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
addLoadEvent = function(func){if(typeof jQuery!="undefined")jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||||
var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'};
|
var userSettings = {'url':'<?php echo SITECOOKIEPATH; ?>','uid':'<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>','time':'<?php echo time() ?>'};
|
||||||
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-this';
|
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-this';
|
||||||
|
var photostorage = false;
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -376,11 +364,10 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-thi
|
||||||
}
|
}
|
||||||
|
|
||||||
function show(tab_name) {
|
function show(tab_name) {
|
||||||
jQuery('#extra_fields').html('');
|
jQuery('#extra-fields').html('');
|
||||||
jQuery('#extra_fields').show();
|
|
||||||
switch(tab_name) {
|
switch(tab_name) {
|
||||||
case 'video' :
|
case 'video' :
|
||||||
jQuery('#extra_fields').load('<?php echo esc_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo esc_attr($selection); ?>'}, function() {
|
jQuery('#extra-fields').load('<?php echo esc_url($_SERVER['PHP_SELF']); ?>', { ajax: 'video', s: '<?php echo esc_attr($selection); ?>'}, function() {
|
||||||
<?php
|
<?php
|
||||||
$content = '';
|
$content = '';
|
||||||
if ( preg_match("/youtube\.com\/watch/i", $url) ) {
|
if ( preg_match("/youtube\.com\/watch/i", $url) ) {
|
||||||
|
@ -402,27 +389,50 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-thi
|
||||||
?>
|
?>
|
||||||
jQuery('#embed-code').prepend('<?php echo htmlentities($content); ?>');
|
jQuery('#embed-code').prepend('<?php echo htmlentities($content); ?>');
|
||||||
});
|
});
|
||||||
|
jQuery('#extra-fields').show();
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case 'photo' :
|
case 'photo' :
|
||||||
jQuery('#extra_fields').before('<p id="waiting"><img src="images/wpspin_light.gif" alt="" /> <?php echo esc_js( __( 'Loading...' ) ); ?></p>');
|
function setup_photo_actions() {
|
||||||
|
jQuery('.close').click(function() {
|
||||||
|
jQuery('#extra-fields').hide();
|
||||||
|
jQuery('#extra-fields').html('');
|
||||||
|
});
|
||||||
|
jQuery('.refresh').click(function() {
|
||||||
|
photostorage = false;
|
||||||
|
show('photo');
|
||||||
|
});
|
||||||
|
jQuery('#photo-add-url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500');
|
||||||
|
tb_init('#extra-fields .thickbox');
|
||||||
|
jQuery('#waiting').hide();
|
||||||
|
jQuery('#extra-fields').show();
|
||||||
|
}
|
||||||
|
jQuery('#extra-fields').before('<div id="waiting"><img src="images/wpspin_light.gif" alt="" /> <?php echo esc_js( __( 'Loading...' ) ); ?></div>');
|
||||||
|
|
||||||
|
if(photostorage == false) {
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
cache : false,
|
cache : false,
|
||||||
url: "<?php echo esc_url($_SERVER['PHP_SELF']); ?>",
|
url: "<?php echo esc_url($_SERVER['PHP_SELF']); ?>",
|
||||||
data: "ajax=photo_js&u=<?php echo urlencode($url)?>",
|
data: "ajax=photo_js&u=<?php echo urlencode($url)?>",
|
||||||
dataType : "script",
|
dataType : "script",
|
||||||
success : function() {
|
success : function(data) {
|
||||||
jQuery('#waiting').remove();
|
eval(data);
|
||||||
|
photostorage = jQuery('#extra-fields').html();
|
||||||
|
setup_photo_actions();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
jQuery('#extra-fields').html(photostorage);
|
||||||
|
setup_photo_actions();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
//resize screen
|
//resize screen
|
||||||
window.resizeTo(720,570);
|
window.resizeTo(720,540);
|
||||||
// set button actions
|
// set button actions
|
||||||
jQuery('#photo_button').click(function() { show('photo'); return false; });
|
jQuery('#photo_button').click(function() { show('photo'); return false; });
|
||||||
jQuery('#video_button').click(function() { show('video'); return false; });
|
jQuery('#video_button').click(function() { show('video'); return false; });
|
||||||
|
@ -449,7 +459,7 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-thi
|
||||||
<div id="poststuff" class="metabox-holder">
|
<div id="poststuff" class="metabox-holder">
|
||||||
<div id="side-info-column">
|
<div id="side-info-column">
|
||||||
<div class="sleeve">
|
<div class="sleeve">
|
||||||
<h1 id="viewsite"><a class="button" href="<?php echo get_option('home'); ?>/" target="_blank"><?php bloginfo('name'); ?> › <?php _e('Press This') ?></a></span></h1>
|
<h1 id="viewsite"><a href="<?php echo get_option('home'); ?>/" target="_blank"><?php bloginfo('name'); ?> › <?php _e('Press This') ?></a></span></h1>
|
||||||
|
|
||||||
<?php wp_nonce_field('press-this') ?>
|
<?php wp_nonce_field('press-this') ?>
|
||||||
<input type="hidden" name="post_type" id="post_type" value="text"/>
|
<input type="hidden" name="post_type" id="post_type" value="text"/>
|
||||||
|
@ -461,6 +471,9 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-thi
|
||||||
<div class="photolist"></div>
|
<div class="photolist"></div>
|
||||||
|
|
||||||
<div id="submitdiv" class="stuffbox">
|
<div id="submitdiv" class="stuffbox">
|
||||||
|
<div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
<h3><?php _e('Publish') ?></h3>
|
<h3><?php _e('Publish') ?></h3>
|
||||||
<div class="inside">
|
<div class="inside">
|
||||||
<p>
|
<p>
|
||||||
|
@ -476,10 +489,14 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-thi
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="categorydiv" class="stuffbox">
|
<div id="categorydiv" class="stuffbox">
|
||||||
|
<div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
<h3><?php _e('Categories') ?></h3>
|
<h3><?php _e('Categories') ?></h3>
|
||||||
<div class="inside">
|
<div class="inside">
|
||||||
|
|
||||||
<div id="categories-all" class="tabs-panel">
|
<div id="categories-all" class="tabs-panel">
|
||||||
|
|
||||||
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
|
<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
|
||||||
<?php wp_category_checklist($post_ID, false) ?>
|
<?php wp_category_checklist($post_ID, false) ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -499,6 +516,9 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-thi
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="tagsdiv-post_tag" class="stuffbox" >
|
<div id="tagsdiv-post_tag" class="stuffbox" >
|
||||||
|
<div class="handlediv" title="<?php _e( 'Click to toggle' ); ?>">
|
||||||
|
<br/>
|
||||||
|
</div>
|
||||||
<h3><span><?php _e('Post Tags'); ?></span></h3>
|
<h3><span><?php _e('Post Tags'); ?></span></h3>
|
||||||
<div class="inside">
|
<div class="inside">
|
||||||
<div class="tagsdiv" id="post_tag">
|
<div class="tagsdiv" id="post_tag">
|
||||||
|
@ -518,7 +538,6 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-thi
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="posting">
|
<div class="posting">
|
||||||
<?php if ( isset($posted) && intval($posted) ) { $post_ID = intval($posted); ?>
|
<?php if ( isset($posted) && intval($posted) ) { $post_ID = intval($posted); ?>
|
||||||
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="<?php echo get_edit_post_link( $post_ID ); ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();"><?php _e('Close Window'); ?></a></p></div>
|
<div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="<?php echo get_edit_post_link( $post_ID ); ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();"><?php _e('Close Window'); ?></a></p></div>
|
||||||
|
@ -530,10 +549,10 @@ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>', pagenow = 'press-thi
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="extra_fields" style="display: none"></div>
|
<div id="extra-fields" style="display: none"></div>
|
||||||
|
|
||||||
<div class="postdivrich">
|
<div class="postdivrich">
|
||||||
<ul id="actions">
|
<ul id="actions" class="actions">
|
||||||
|
|
||||||
<li id="photo_button">
|
<li id="photo_button">
|
||||||
Add: <?php if ( current_user_can('upload_files') ) { ?><a title="<?php _e('Insert an Image'); ?>" href="#">
|
Add: <?php if ( current_user_can('upload_files') ) { ?><a title="<?php _e('Insert an Image'); ?>" href="#">
|
||||||
|
|
|
@ -1716,7 +1716,7 @@ function get_shortcut_link() {
|
||||||
l=d.location,
|
l=d.location,
|
||||||
e=encodeURIComponent,
|
e=encodeURIComponent,
|
||||||
u=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=4';
|
u=f+'?u='+e(l.href)+'&t='+e(d.title)+'&s='+e(s)+'&v=4';
|
||||||
a=function(){if(!w.open(u,'t','toolbar=0,resizable=0,status=1,width=720,height=570'))l.href=u;};
|
a=function(){if(!w.open(u,'t','toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=570'))l.href=u;};
|
||||||
if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a();
|
if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a();
|
||||||
void(0)";
|
void(0)";
|
||||||
|
|
||||||
|
|
|
@ -438,7 +438,7 @@ function wp_default_styles( &$styles ) {
|
||||||
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20090514' );
|
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20090514' );
|
||||||
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20090514' );
|
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20090514' );
|
||||||
$styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20090625' );
|
$styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20090625' );
|
||||||
$styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array(), '20091014' );
|
$styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array(), '20091022' );
|
||||||
$styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20090514' );
|
$styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20090514' );
|
||||||
$styles->add( 'login', "/wp-admin/css/login$suffix.css", array(), '20091010' );
|
$styles->add( 'login', "/wp-admin/css/login$suffix.css", array(), '20091010' );
|
||||||
$styles->add( 'plugin-install', "/wp-admin/css/plugin-install$suffix.css", array(), '20090514' );
|
$styles->add( 'plugin-install', "/wp-admin/css/plugin-install$suffix.css", array(), '20090514' );
|
||||||
|
|
Loading…
Reference in New Issue