Download all files FTP
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
@@ -0,0 +1,127 @@
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
var uploadContainer = $('#drag_to_upload');
|
||||
|
||||
// Media Library button hook (WP >= 3.5):
|
||||
$('a#dgd_library_button').click(function(e){
|
||||
|
||||
// Prevent default:
|
||||
e.preventDefault();
|
||||
|
||||
// Set frame object:
|
||||
var frame = wp.media({
|
||||
id: 'dgd_featured_image',
|
||||
title : dgd_strings.panel.title,
|
||||
multiple : true,
|
||||
library : { type : 'image'},
|
||||
button : { text : dgd_strings.panel.button }
|
||||
});
|
||||
|
||||
// On select image:
|
||||
frame.on('select', function(){
|
||||
var attachment = frame.state().get('selection').first().toJSON();
|
||||
doSetFeaturedImage(attachment.id);
|
||||
});
|
||||
|
||||
// Display:
|
||||
frame.open();
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Set as featured image hook (WP < 3.5):
|
||||
$('body').on('click', 'a.wp-post-thumbnail', function(e){
|
||||
parent.tb_remove();
|
||||
parent.location.reload(1);
|
||||
});
|
||||
|
||||
// Remove featured image:
|
||||
uploadContainer.on('click', '#remove-post-thumbnail', function (){
|
||||
$('#current-uploaded-image').slideUp('medium');
|
||||
updateHotspotImages('');
|
||||
});
|
||||
|
||||
|
||||
// Set featured image:
|
||||
function doSetFeaturedImage(attachmentID){
|
||||
$.post(ajaxurl, {
|
||||
action: 'dgd_set_featured_image',
|
||||
postID: dgd_post_id,
|
||||
nonce: dgd_set_featured_image_nonce,
|
||||
attachmentID: attachmentID
|
||||
}, function (response){
|
||||
var response = $.parseJSON(response);
|
||||
if (response.response_code == 200){
|
||||
|
||||
// Publish post:
|
||||
if (dgd_page_reload){
|
||||
$('div#publishing-action input#publish').trigger('click');
|
||||
}
|
||||
|
||||
// Fetch image:
|
||||
doFetchFeaturedImage();
|
||||
|
||||
} else {
|
||||
alert(response.response_content);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Fetch featured image function:
|
||||
function doFetchFeaturedImage(){
|
||||
$.post(ajaxurl, {
|
||||
action: 'dgd_get_featured_image',
|
||||
post_id: dgd_post_id
|
||||
}, function (response){
|
||||
|
||||
// Parse response AS JSON:
|
||||
var response = $.parseJSON(response);
|
||||
|
||||
// Valid response:
|
||||
if (response.response_code == 200){
|
||||
|
||||
// Find current image and continue:
|
||||
$('#current-uploaded-image').slideUp('medium', function(){
|
||||
|
||||
// Update image with new info:
|
||||
var imageObject = uploadContainer.find('div.inside img.attachment-full');
|
||||
imageObject.removeAttr('width');
|
||||
imageObject.removeAttr('height');
|
||||
imageObject.removeAttr('title');
|
||||
imageObject.removeAttr('alt');
|
||||
imageObject.removeAttr('srcset');
|
||||
imageObject.removeAttr('sizes');
|
||||
imageObject.attr('src', response.response_content);
|
||||
|
||||
// Hide container:
|
||||
imageObject.load(function(){
|
||||
|
||||
// Display container:
|
||||
$('#current-uploaded-image').slideDown('medium');
|
||||
|
||||
// Fade in upload container:
|
||||
$('div#plupload-upload-ui').fadeIn('medium');
|
||||
$('#uploaderSection .loading').fadeOut('medium');
|
||||
|
||||
});
|
||||
updateHotspotImages(imageObject.attr('src'));
|
||||
});
|
||||
} else {
|
||||
alert(response.response_content);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function updateHotspotImages(src) {
|
||||
var fields = $('input[name$="[coordinates]"]');
|
||||
|
||||
fields.each(function(){
|
||||
$(this).attr('data-image-url', src);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
// Load iOS Switch script:
|
||||
$('input.iOSToggle').iToggle();
|
||||
|
||||
// Info panel blob jump:
|
||||
$('div.blobContainer img').hover(function(){
|
||||
$(this).stop(true, false).fadeTo(200, 1.0);
|
||||
}, function(){
|
||||
$(this).stop(true, false).fadeTo(200, 0.7);
|
||||
});
|
||||
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
/*---------------
|
||||
* jQuery iToggle Plugin by Engage Interactive
|
||||
* Examples and documentation at: http://labs.engageinteractive.co.uk/itoggle/
|
||||
* Copyright (c) 2009 Engage Interactive
|
||||
* Version: 1.0 (10-JUN-2009)
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
* Version: 1.7 (30-May-2012) by pshiryaev
|
||||
* Requires: jQuery v1.7 or later
|
||||
---------------*/
|
||||
(function(a){a.fn.iToggle=function(g){function f(b,c){!0==b?"radio"==d.type?a("label[for="+c+"]").addClass("ilabel_radio"):a("label[for="+c+"]").addClass("ilabel"):a("label[for="+c+"]").remove()}function e(b,c){d.onClick.call(b);h=b.innerHeight();t=b.prop("for");b.hasClass("iTon")?(d.onClickOff.call(b),b.animate({backgroundPositionX:"100%",backgroundPositionY:"-"+h+"px"},d.speed,d.easing,function(){b.removeClass("iTon").addClass("iToff");clickEnabled=!0;d.onSlide.call(this);d.onSlideOff.call(this)}),
|
||||
a("input#"+t).removeAttr("checked")):(d.onClickOn.call(b),b.animate({backgroundPositionX:"0%",backgroundPositionY:"-"+h+"px"},d.speed,d.easing,function(){b.removeClass("iToff").addClass("iTon");clickEnabled=!0;d.onSlide.call(this);d.onSlideOn.call(this)}),a("input#"+t).prop("checked","checked"));!0==c&&(name=a("#"+t).prop("name"),e(b.siblings("label[for]")))}clickEnabled=!0;var d=a.extend({},{type:"checkbox",keepLabel:!0,easing:!1,speed:200,onClick:function(){},onClickOn:function(){},onClickOff:function(){},
|
||||
onSlide:function(){},onSlideOn:function(){},onSlideOff:function(){}},g);this.each(function(){var b=a(this);if(b.is("input")){var c=b.attr("id");f(d.keepLabel,c);if(b.attr("checked")){c=a('<label class="itoggle" for="'+c+'"><span></span></label>');b.addClass("iT_checkbox").before(c);var e=a(c).innerHeight();a(c).css({"background-position-x":"0%","background-position-y":"-"+e+"px"});b.prev("label").addClass("iTon")}else c=a('<label class="itoggle" for="'+c+'"><span></span></label>'),b.addClass("iT_checkbox").before(c),
|
||||
e=a(c).innerHeight(),a(c).css({"background-position-x":"100%","background-position-y":"-"+e+"px"}),b.prev("label").addClass("iToff")}else b.children("input:"+d.type).each(function(){var b=a(this).attr("id");f(d.keepLabel,b);if(a(this).attr("checked")){b=a('<label class="itoggle" for="'+b+'"><span></span></label>');a(this).addClass("iT_checkbox").before(b);var c=a(b).innerHeight();a(b).css({"background-position-x":"0%","background-position-y":"-"+c+"px"});a(this).prev("label").addClass("iTon")}else b=
|
||||
a('<label class="itoggle" for="'+b+'"><span></span></label>'),a(this).addClass("iT_checkbox").before(b),c=a(b).innerHeight(),a(b).css({"background-position-x":"100%","background-position-y":"-"+c+"px"}),a(this).prev("label").addClass("iToff");"radio"==d.type&&a(this).prev("label").addClass("iT_radio")})});a("label.itoggle").click(function(){!0==clickEnabled&&(clickEnabled=!1,a(this).hasClass("iT_radio")?a(this).hasClass("iTon")?clickEnabled=!0:e(a(this),!0):e(a(this)));return!1});a("label.ilabel").click(function(){!0==
|
||||
clickEnabled&&(clickEnabled=!1,e(a(this).next("label.itoggle")));return!1})}})(jQuery);
|
||||
@@ -0,0 +1,64 @@
|
||||
div#uploaderSection {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div#current-uploaded-image {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
div#current-uploaded-image.closed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div#current-uploaded-image p.hide-if-no-js {
|
||||
width: 100%;
|
||||
margin: -8px 0px 0px 0px;
|
||||
position: absolute;
|
||||
top: 50%; left: 0;
|
||||
text-align: center;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div#current-uploaded-image:hover p.hide-if-no-js { display: block; }
|
||||
|
||||
div#current-uploaded-image p.hide-if-no-js a {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
div#current-uploaded-image img {
|
||||
width: 100%;
|
||||
height: auto !important;
|
||||
display: block;
|
||||
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
div#uploaderSection div.loading {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
position: absolute;
|
||||
top: 50%; left: 50%;
|
||||
margin: -16px 0px 0px -16px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div#drag-drop-area {
|
||||
-webkit-border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
div#uploaderSection div.drag-drop-inside {
|
||||
margin-top: 48px !important;
|
||||
}
|
||||
|
||||
body.mp6 div#uploaderSection div.drag-drop-inside,
|
||||
body.wp38 div#uploaderSection div.drag-drop-inside {
|
||||
margin-top: 25px !important;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
div#contact-me.postbox div.inside {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
div#manage-plugin-options.postbox h3.hndle {
|
||||
cursor: default !important;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
div#manage-plugin-options.postbox div.inside {
|
||||
margin: 0px 0px 0px 0px !important;
|
||||
padding: 0px 0px 0px 0px !important;
|
||||
}
|
||||
|
||||
div.metaBoxRow {
|
||||
padding: 15px 15px;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
}
|
||||
|
||||
div.metaBoxRow.last {
|
||||
border-bottom: 0px;
|
||||
}
|
||||
|
||||
div.objectRow {
|
||||
overflow: hidden;
|
||||
padding-top: 5px;
|
||||
margin-bottom: -10px;
|
||||
}
|
||||
|
||||
div.toggleObject {
|
||||
float: left;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0px 20px 0px 0px;
|
||||
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.toggleObject p { margin-top: -14px; }
|
||||
|
||||
input.filesizeLimit {
|
||||
width: 260px;
|
||||
padding: 6px 6px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
div.blobContainer {
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
}
|
||||
div.blobContainer img {
|
||||
width: 23%;
|
||||
margin: 0px 1px;
|
||||
display: inline-block;
|
||||
filter: alpha(opacity=70);
|
||||
-khtml-opacity: 0.7;
|
||||
-moz-opacity: 0.7;
|
||||
opacity: 0.7;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/* ---------------------------------------------
|
||||
TOGGLE.CSS
|
||||
-----------------------------------------------*/
|
||||
|
||||
div#itoggle{
|
||||
|
||||
}
|
||||
div#itoggle h3{
|
||||
margin-bottom:4px;
|
||||
font-size: 14px;
|
||||
font-weight:bold;
|
||||
}
|
||||
div#itoggle p{
|
||||
color:#666;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
div#itoggle input.iT_checkbox_on{
|
||||
display:block !important;
|
||||
float:left;
|
||||
position:relative !important;
|
||||
top:-43px !important;
|
||||
left:100px !important;
|
||||
margin-bottom:-43px;
|
||||
}
|
||||
|
||||
/* -----------------------------
|
||||
This is the important bit
|
||||
-------------------------------*/
|
||||
|
||||
div#itoggle label.ilabel{
|
||||
display:block;
|
||||
font-size:12px;
|
||||
padding-bottom:10px;
|
||||
cursor:pointer;
|
||||
}
|
||||
|
||||
div#itoggle label.itoggle,
|
||||
div#itoggle label.itoggle span{
|
||||
display: block;
|
||||
width: 93px;
|
||||
height: 27px;
|
||||
margin-bottom: 20px;
|
||||
background: url(../images/itoggle.png) left bottom no-repeat;
|
||||
cursor:pointer;
|
||||
text-indent:-5000px;
|
||||
}
|
||||
div#itoggle label.itoggle.iToff{
|
||||
background-position:right bottom;
|
||||
}
|
||||
div#itoggle label.itoggle span{
|
||||
background-position: left top;
|
||||
margin: 0;
|
||||
}
|
||||
div#itoggle input.iT_checkbox{
|
||||
position:absolute;
|
||||
top:-9999px;
|
||||
left:-9999px;
|
||||
}
|
||||
|
||||
/*
|
||||
If you want the corners to be
|
||||
transparent, add these two lines
|
||||
to the main block above. Only
|
||||
works on webkit and mozilla browsers
|
||||
For more reliable results, make your
|
||||
own png using the supplied .psd
|
||||
|
||||
-moz-border-radius:6px;
|
||||
-webkit-border-radius:6px;
|
||||
*/
|
||||
@@ -0,0 +1,152 @@
|
||||
<div class="wrap">
|
||||
<div id="icon-themes" class="icon32"></div>
|
||||
<h2><?php echo get_admin_page_title(); ?></h2>
|
||||
|
||||
<?php
|
||||
|
||||
// Check for POST request:
|
||||
if (isset($_POST['updatePluginSettings'])){
|
||||
|
||||
// Check that everything is set:
|
||||
if ($_POST['file_types'] && !empty($_POST['post_types'])){
|
||||
|
||||
// Update post types:
|
||||
$selected = $_POST['post_types'];
|
||||
update_option('drag-drop-post-types', $selected);
|
||||
|
||||
// Update formats:
|
||||
$selected = $_POST['file_types'];
|
||||
update_option('drag-drop-file-types', $selected);
|
||||
|
||||
// Update user capability:
|
||||
if (isset($_POST['user_capability']) && $_POST['user_capability']){
|
||||
update_option('drag-drop-user-capability', $_POST['user_capability']);
|
||||
} else {
|
||||
update_option('drag-drop-user-capability', 'manage_options');
|
||||
}
|
||||
|
||||
// Update page reload:
|
||||
if (isset($_POST['page_reload']) && $_POST['page_reload'] == 'checked'){
|
||||
update_option('drag-drop-page-reload', 1);
|
||||
} else {
|
||||
update_option('drag-drop-page-reload', 0);
|
||||
}
|
||||
|
||||
// Show message:
|
||||
echo '<div id="message" style="margin-top: 10px;" class="updated"><p><strong>'.__('Success:', $this->plugin_locale).'</strong> '.__('The plugin options have been successfully updated!', $this->plugin_locale).'</p></div>';
|
||||
|
||||
} else {
|
||||
|
||||
// Show message:
|
||||
echo '<div id="message" style="margin-top: 10px;" class="error"><p>'.__('Please make sure you filled in all the required fields before submitting. At least <em><strong>one post type</strong></em> and <em><strong>one extension</strong></em> must be selected!', $this->plugin_locale).'</p></div>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div id="drag-to-feature-image" class="metabox-holder has-right-sidebar">
|
||||
|
||||
<!-- Sidebar info -->
|
||||
<div class="inner-sidebar">
|
||||
|
||||
<div id="contact-me" class="postbox">
|
||||
<h3><span><?php _e('Contact me', $this->plugin_locale); ?></span></h3>
|
||||
<div class="inside">
|
||||
<p><?php _e('If you have any questions regarding this plugin or have ideas on how to improve it then please dont hesitate to', $this->plugin_locale); ?> <a href="mailto:info@jonathanlundstrom.me"><?php _e('contact me', $this->plugin_locale); ?>.</a></p>
|
||||
<div class="blobContainer contact-me">
|
||||
<a href="mailto:info@jonathanlundstrom.me" title="<?php _e('Send me an email', $this->plugin_locale); ?>"><img src="<?php echo $this->plugin_directory; ?>assets/images/blob-email.png" alt="" /></a>
|
||||
<a target="_blank" href="https://www.facebook.com/jonathanlundstrom" title="<?php _e('Find me on Facebook', $this->plugin_locale); ?>"><img src="<?php echo $this->plugin_directory; ?>assets/images/blob-facebook.png" alt="" /></a>
|
||||
<a target="_blank" href="https://twitter.com/Plizzo" title="<?php _e('Find me on Twitter', $this->plugin_locale); ?>"><img src="<?php echo $this->plugin_directory; ?>assets/images/blob-twitter.png" alt="" /></a>
|
||||
<a target="_blank" href="https://plus.google.com/111226368568418280015" title="<?php _e('Find me on Google+', $this->plugin_locale); ?>"><img class="last" src="<?php echo $this->plugin_directory; ?>assets/images/blob-googleplus.png" alt="" /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="post-body">
|
||||
<div id="post-body-content">
|
||||
|
||||
<!-- Meta box -->
|
||||
<div id="manage-plugin-options" class="postbox">
|
||||
<h3 class="hndle"><span><?php _e('Available options:', $this->plugin_locale); ?></span></h3>
|
||||
<div id="itoggle" class="inside" style="padding: 20px 30px;">
|
||||
<form action="" method="post">
|
||||
|
||||
<div class="metaBoxRow">
|
||||
<strong><?php _e('Which post types do you want the meta box to display at?', $this->plugin_locale); ?></strong><br />
|
||||
<div class="containerDiv" style="margin: 2px 0px 0px 0px; overflow: hidden;">
|
||||
<?php $post_types = get_post_types(array( 'show_ui' => true )); ?>
|
||||
<?php $selected = $this->get_option_post_types(); ?>
|
||||
<div class="objectRow">
|
||||
<?php foreach ($post_types as $type): ?>
|
||||
<?php if ($type !== 'attachment'): ?>
|
||||
<?php $checked = (in_array($type, $selected)) ? 'checked="checked"' : ''; ?>
|
||||
<div class="toggleObject itoggle">
|
||||
<input class="iOSToggle" name="post_types[]" <?php echo $checked; ?> type="checkbox" id="type_<?php echo $type; ?>" value="<?php echo $type; ?>" />
|
||||
<p><?php echo ucfirst($type); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="metaBoxRow">
|
||||
<strong><?php _e('Which of the following file types should be supported?', $this->plugin_locale); ?></strong><br />
|
||||
<div class="containerDiv" style="margin: 2px 0px 0px 0px; overflow: hidden;">
|
||||
<?php $selected = $this->get_option_file_types(); ?>
|
||||
<?php $file_types = array('jpg', 'jpeg', 'png', 'gif'); ?>
|
||||
<div class="objectRow">
|
||||
<?php foreach ($file_types as $ft): ?>
|
||||
<?php $checked = (in_array($ft, $selected)) ? 'checked="checked"' : ''; ?>
|
||||
<div class="toggleObject">
|
||||
<input class="iOSToggle" name="file_types[]" <?php echo $checked; ?> type="checkbox" id="filetype_<?php echo $ft; ?>" value="<?php echo $ft; ?>" />
|
||||
<p><?php echo strtoupper($ft); ?></p>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (current_user_can('manage_options')): ?>
|
||||
<div class="metaBoxRow">
|
||||
<strong><?php _e('Change the capability required to customize the plugin settings', $this->plugin_locale); ?></strong><br />
|
||||
<small><em><?php _e('The default capability is <code>manage_options</code> and applies to administrators.', $this->plugin_locale); ?></em></small><br />
|
||||
<input class="filesizeLimit" style="width: 275px;" type="text" name="user_capability" placeholder="manage_options" value="<?php echo $this->get_option_user_capability(); ?>" />
|
||||
<small> <a href="http://codex.wordpress.org/Roles_and_Capabilities" target="_blank"><?php _e('User roles & capabilities', $this->plugin_locale); ?> »</a></small>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="metaBoxRow">
|
||||
<strong><?php _e('Publish / update post after successful image upload?', $this->plugin_locale); ?></strong><br />
|
||||
<small><em><?php _e('If you like some users upload the featured image as the last step when publishing a post, this option is for you.', $this->plugin_locale); ?></em></small><br />
|
||||
<div class="containerDiv" style="margin: 2px 0px 0px 0px; overflow: hidden;">
|
||||
<div class="objectRow">
|
||||
<?php $checked = $this->get_option_page_reload() ? 'checked="checked"' : ''; ?>
|
||||
<div class="toggleObject itoggle">
|
||||
<input class="iOSToggle" name="page_reload" <?php echo $checked; ?> type="checkbox" id="reload_page" value="checked" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="metaBoxRow last">
|
||||
<input type="submit" name="updatePluginSettings" class="button-secondary" value="<?php _e('Update settings', $this->plugin_locale); ?>" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="contact-info" class="metabox-holder">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,587 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Modified by Tyler Digital December 31, 2014
|
||||
|
||||
Plugin Name: Drag & Drop Featured Image
|
||||
Plugin URI: http://wordpress.org/extend/plugins/drag-drop-featured-image/description/
|
||||
Description: A drag'n'drop replacement for the built in featured image metabox.
|
||||
Version: 2.0.4
|
||||
Author: Jonathan Lundström
|
||||
Author URI: http://www.jonathanlundstrom.me
|
||||
License: GPLv2 or later
|
||||
|
||||
Code references and thanks to:
|
||||
http://wordpress.org/support/topic/use-php-to-set-featured-image
|
||||
http://wordpress.stackexchange.com/questions/33173/plupload-intergration-in-a-meta-box
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Initiate plugin.
|
||||
*/
|
||||
global $drag_drop_featured_image_map;
|
||||
$drag_drop_featured_image_map = new WP_Drag_Drop_Featured_Image_Map;
|
||||
|
||||
class WP_Drag_Drop_Featured_Image_Map {
|
||||
|
||||
public $plugin_locale;
|
||||
public $plugin_options_slug;
|
||||
public $plugin_dirname;
|
||||
public $plugin_directory;
|
||||
public $selected_post_types;
|
||||
public $selected_file_types;
|
||||
public $selected_page_reload;
|
||||
public $wordpress_version;
|
||||
|
||||
/**
|
||||
* Plugin constructor.
|
||||
*/
|
||||
public function __construct(){
|
||||
|
||||
// Globalize:
|
||||
global $wp_version;
|
||||
|
||||
|
||||
// Set default options
|
||||
add_option('drag-drop-file-types', array('jpg', 'jpeg', 'png', 'gif', 'webp'));
|
||||
add_option('drag-drop-page-reload', 0);
|
||||
|
||||
// Bind plugin actions:
|
||||
add_action('admin_head', array(&$this, 'print_header_post_id'));
|
||||
add_action('plugins_loaded', array(&$this, 'load_textdomain'));
|
||||
add_action('add_meta_boxes', array(&$this, 'toggle_meta_box_functionality'));
|
||||
add_action('admin_enqueue_scripts', array(&$this, 'handle_plugin_script_loading'));
|
||||
add_action('wp_ajax_dgd_upload_featured_image', array(&$this, 'ajax_upload_image_file'));
|
||||
add_action('wp_ajax_dgd_set_featured_image', array(&$this, 'ajax_set_featured_image'));
|
||||
add_action('wp_ajax_dgd_get_featured_image', array(&$this, 'ajax_get_featured_image'));
|
||||
|
||||
// Bind plugin filters:
|
||||
add_filter('admin_body_class', array(&$this, 'modify_admin_body_class'));
|
||||
|
||||
// Set local variables:
|
||||
$this->plugin_locale = 'drawattention-fi';
|
||||
$this->plugin_options_slug = 'drag-drop-featured-image';
|
||||
$this->plugin_dirname = dirname(plugin_basename(__FILE__));
|
||||
$this->plugin_directory = DrawAttention::get_plugin_url().'/public/includes/lib/drag-drop-featured-image/';
|
||||
$this->selected_post_types = $this->get_option_post_types();
|
||||
$this->selected_file_types = $this->get_option_file_types();
|
||||
$this->selected_page_reload = $this->get_option_page_reload();
|
||||
|
||||
// Set WordPress version:
|
||||
$this->wordpress_version = substr(str_replace('.', '', $wp_version), 0, 2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get selected post types.
|
||||
* @return array
|
||||
*/
|
||||
public function get_option_post_types(){
|
||||
return array( 'da_image' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get selected file types.
|
||||
* @return array
|
||||
*/
|
||||
public function get_option_file_types(){
|
||||
return array('jpg', 'jpeg', 'png', 'gif', 'webp');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get page reload status.
|
||||
* @return boolean
|
||||
*/
|
||||
public function get_option_page_reload(){
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load plugin textdomain.
|
||||
*/
|
||||
public function load_textdomain(){
|
||||
load_plugin_textdomain('drawattention-fi', false, dirname(plugin_basename(__FILE__)).'/languages/');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print current post ID in header.
|
||||
*/
|
||||
public function print_header_post_id(){
|
||||
global $post, $current_screen;
|
||||
if ($current_screen->base === 'post'){
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
var dgd_post_id = '.$post->ID.';
|
||||
var dgd_set_featured_image_nonce = "'.wp_create_nonce('dgd_set_featured_image_nonce').'";
|
||||
var dgd_page_reload = '.$this->get_option_page_reload().';
|
||||
</script>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Toggle the metaboxes.
|
||||
*/
|
||||
public function toggle_meta_box_functionality(){
|
||||
global $wp_meta_boxes;
|
||||
// Fetch selected post types:
|
||||
$selected = $this->get_option_post_types();
|
||||
|
||||
// Add theme support:
|
||||
add_theme_support('post-thumbnails', $selected);
|
||||
|
||||
// Remove default meta box:
|
||||
foreach ($selected as $post_type){
|
||||
add_post_type_support($post_type, 'thumbnail');
|
||||
remove_meta_box('postimagediv', $post_type, 'side');
|
||||
// needed for reported conflict with plugin: conditionally-display-featured-image-on-singular-pages
|
||||
if ( isset( $wp_meta_boxes[ $post_type ]['side']['low']['postimagediv'] ) && false === $wp_meta_boxes[ $post_type ]['side']['low']['postimagediv'] ) {
|
||||
unset ( $wp_meta_boxes[ $post_type ]['side']['low']['postimagediv'] );
|
||||
}
|
||||
remove_meta_box('postimagediv', $post_type, 'normal');
|
||||
remove_meta_box('postimagediv', $post_type, 'advanced');
|
||||
}
|
||||
|
||||
// Add the enhanced meta box:
|
||||
foreach ($selected as $post_type){
|
||||
add_meta_box('drag_to_upload', __('Image'), array(&$this, 'updated_upload_meta_box'), $post_type, 'side', 'default');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handle script loading.
|
||||
* @param $hook
|
||||
*/
|
||||
public function handle_plugin_script_loading($hook){
|
||||
|
||||
// Globalize:
|
||||
global $post;
|
||||
|
||||
// Get current post type:
|
||||
if (!is_null($post)){
|
||||
$current_post_type = get_post_type($post->ID);
|
||||
}
|
||||
|
||||
// Post edit screen:
|
||||
if ($hook == 'post.php' || $hook == 'post-new.php'){
|
||||
if (in_array($current_post_type, $this->selected_post_types)){
|
||||
// Stylesheets:
|
||||
wp_register_style('dgd_uploaderStyle', $this->plugin_directory.'assets/style/drag-drop-uploader.css', false);
|
||||
wp_enqueue_style('dgd_uploaderStyle');
|
||||
|
||||
// Scripts:
|
||||
wp_enqueue_script('plupload-all');
|
||||
wp_register_script('dgd_uploaderScript', $this->plugin_directory.'assets/scripts/drag-drop-uploader.js', 'jquery');
|
||||
wp_enqueue_script('dgd_uploaderScript');
|
||||
|
||||
// Localize JavaScript:
|
||||
wp_localize_script('dgd_uploaderScript', 'dgd_strings', array(
|
||||
'panel' => array(
|
||||
'title' => __('Set featured image'),
|
||||
'button' => __('Set featured image')
|
||||
)
|
||||
));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Plugin options screen:
|
||||
if ($hook === 'settings_page_'.$this->plugin_options_slug){
|
||||
|
||||
// Stylesheets:
|
||||
wp_register_style('itoggle_style', $this->plugin_directory.'assets/style/engage.itoggle.css', false);
|
||||
wp_register_style('dgd_panelStyle', $this->plugin_directory.'assets/style/drag-to-feature.css', false);
|
||||
wp_enqueue_style('itoggle_style');
|
||||
wp_enqueue_style('dgd_panelStyle');
|
||||
|
||||
// Scripts:
|
||||
wp_register_script('itoggle_script', $this->plugin_directory.'assets/scripts/engage.itoggle.1.7.min.js', 'jquery');
|
||||
wp_register_script('dgd_panelScript', $this->plugin_directory.'assets/scripts/drag-to-feature.js', 'jquery');
|
||||
wp_enqueue_script('itoggle_script');
|
||||
wp_enqueue_script('dgd_panelScript');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Render options page.
|
||||
*/
|
||||
public function render_options_page(){
|
||||
require_once('assets/views/options.php');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Byte formatting function:
|
||||
* @param $bytes
|
||||
* @param int $precision
|
||||
* @return float
|
||||
*/
|
||||
public function format_bytes($bytes, $precision = 2) {
|
||||
$units = array('B', 'KB', 'MB', 'GB', 'TB');
|
||||
$bytes = max($bytes, 0);
|
||||
$pow = floor(($bytes ? log($bytes) : 0) / log(1024));
|
||||
$pow = min($pow, count($units) - 1);
|
||||
$bytes /= pow(1024, $pow);
|
||||
return round($bytes, $precision);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Uploading functionality trigger.
|
||||
* (Most of the code comes from media.php and handlers.js)
|
||||
*/
|
||||
function updated_upload_meta_box(){ ?>
|
||||
<?php global $post; ?>
|
||||
<div id="uploadContainer" style="margin-top: 10px;">
|
||||
|
||||
<!-- Current image -->
|
||||
<div id="current-uploaded-image" class="<?php echo has_post_thumbnail() ? 'open' : 'closed'; ?>">
|
||||
<?php if (has_post_thumbnail()): ?>
|
||||
<?php the_post_thumbnail('full'); ?>
|
||||
<?php else: ?>
|
||||
<img class="attachment-full" src="" />
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $thumbnail_id = get_post_thumbnail_id($post->ID); ?>
|
||||
<?php $ajax_nonce = wp_create_nonce("set_post_thumbnail-$post->ID"); ?>
|
||||
<p class="hide-if-no-js">
|
||||
<a class="button-secondary" href="#" id="remove-post-thumbnail" onclick="WPRemoveThumbnail('<?php echo $ajax_nonce; ?>');return false;"><?php _e('Remove image'); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Uploader section -->
|
||||
<div id="uploaderSection">
|
||||
<div class="loading">
|
||||
<img src="<?php echo $this->plugin_directory; ?>/assets/images/loading.gif" alt="Loading..." />
|
||||
</div>
|
||||
<div id="plupload-upload-ui" class="hide-if-no-js">
|
||||
<div id="drag-drop-area">
|
||||
<div class="drag-drop-inside">
|
||||
<p class="drag-drop-info"><?php _e('Drop image here'); ?></p>
|
||||
<p><?php _ex('or', 'Uploader: Drop files here - or - Select Files'); ?></p>
|
||||
<p class="drag-drop-buttons"><input id="plupload-browse-button" type="button" value="<?php esc_attr_e('Upload Image'); ?>" class="button" /></p>
|
||||
<p><?php //_e('from', $this->plugin_locale); ?></p>
|
||||
<p class="drag-drop-buttons">
|
||||
<?php if ($this->wordpress_version >= 35): ?>
|
||||
<!--<a href="#" id="dgd_library_button" class="button insert-media add_media" data-editor="content" title="Add Media">-->
|
||||
<a href="#" id="dgd_library_button" class="button" title="Add Media">
|
||||
<span class="wp-media-buttons-icon"></span><?php _e('Media Library', $this->plugin_locale); ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a href="<?php bloginfo('wpurl'); ?>/wp-admin/media-upload.php?post_id=<?php echo $post->ID; ?>&tab=library&=&post_mime_type=image&TB_iframe=1&width=640&height=353" class="thickbox add_media button-secondary" id="content-browse_library" title="Browse Media Library" onclick="return false;">
|
||||
<?php _e('Media Library', $this->plugin_locale); ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
global $post;
|
||||
$plupload_init = array(
|
||||
'runtimes' => 'html5,silverlight,flash,html4',
|
||||
'browse_button' => 'plupload-browse-button',
|
||||
'container' => 'plupload-upload-ui',
|
||||
'drop_element' => 'drag-drop-area',
|
||||
'file_data_name' => 'async-upload',
|
||||
'multiple_queues' => false,
|
||||
'multi_selection' => false,
|
||||
'max_file_size' => wp_max_upload_size().'b',
|
||||
'url' => admin_url('admin-ajax.php'),
|
||||
'flash_swf_url' => includes_url('js/plupload/plupload.flash.swf'),
|
||||
'silverlight_xap_url' => includes_url('js/plupload/plupload.silverlight.xap'),
|
||||
'filters' => array(
|
||||
array(
|
||||
'title' => __('Allowed Files', $this->plugin_locale),
|
||||
'extensions' => implode(',', $this->get_option_file_types())
|
||||
)
|
||||
),
|
||||
'multipart' => true,
|
||||
'urlstream_upload' => true,
|
||||
|
||||
// Additional parameters:
|
||||
'multipart_params' => array(
|
||||
'_ajax_nonce' => wp_create_nonce('photo-upload'),
|
||||
'action' => 'dgd_upload_featured_image',
|
||||
'postID' => $post->ID
|
||||
),
|
||||
);
|
||||
|
||||
// Apply filters to initiate plupload:
|
||||
$plupload_init = apply_filters('plupload_init', $plupload_init); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
// Create uploader and pass configuration:
|
||||
var uploader = new plupload.Uploader(<?php echo json_encode($plupload_init); ?>);
|
||||
|
||||
// Check for drag'n'drop functionality:
|
||||
uploader.bind('Init', function(up){
|
||||
var uploaddiv = $('#plupload-upload-ui');
|
||||
|
||||
// Add classes and bind actions:
|
||||
if(up.features.dragdrop){
|
||||
uploaddiv.addClass('drag-drop');
|
||||
$('#drag-drop-area')
|
||||
.bind('dragover.wp-uploader', function(){ uploaddiv.addClass('drag-over'); })
|
||||
.bind('dragleave.wp-uploader, drop.wp-uploader', function(){ uploaddiv.removeClass('drag-over'); });
|
||||
|
||||
} else{
|
||||
uploaddiv.removeClass('drag-drop');
|
||||
$('#drag-drop-area').unbind('.wp-uploader');
|
||||
}
|
||||
});
|
||||
|
||||
// Initiate uploading script:
|
||||
uploader.init();
|
||||
|
||||
// File queue handler:
|
||||
uploader.bind('FilesAdded', function(up, files){
|
||||
var hundredmb = 100 * 1024 * 1024, max = parseInt(up.settings.max_file_size, 10);
|
||||
|
||||
// Limit to one limit:
|
||||
if (files.length > 1){
|
||||
alert("<?php _e('You may only upload one image at a time!', $this->plugin_locale); ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Remove extra files:
|
||||
if (up.files.length > 1){
|
||||
up.removeFile(uploader.files[0]);
|
||||
up.refresh();
|
||||
}
|
||||
|
||||
// Loop through files:
|
||||
plupload.each(files, function(file){
|
||||
|
||||
// Handle maximum size limit:
|
||||
if (max > hundredmb && file.size > hundredmb && up.runtime != 'html5'){
|
||||
alert("<?php _e('The file you selected exceeds the maximum filesize limit.', $this->plugin_locale); ?>");
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// Refresh and start:
|
||||
up.refresh();
|
||||
up.start();
|
||||
|
||||
// Set sizes and hide container:
|
||||
var currentHeight = $('#uploaderSection').outerHeight();
|
||||
$('#uploaderSection').css({ height: currentHeight });
|
||||
$('div#plupload-upload-ui').fadeOut('medium');
|
||||
$('#uploaderSection .loading').fadeIn('medium');
|
||||
|
||||
});
|
||||
|
||||
// A new file was uploaded:
|
||||
uploader.bind('FileUploaded', function(up, file, response){
|
||||
|
||||
// Publish post:
|
||||
if (dgd_page_reload){
|
||||
$('div#publishing-action input#publish').trigger('click');
|
||||
}
|
||||
|
||||
// Toggle image:
|
||||
$('#current-uploaded-image').slideUp('medium', function(){
|
||||
|
||||
// Parse response AS JSON:
|
||||
response = $.parseJSON(response.response);
|
||||
|
||||
// Find current image and continue:
|
||||
if ($('#drag_to_upload div.inside').find('.attachment-full').length > 0){
|
||||
|
||||
// Update image with new info:
|
||||
var imageObject = $('#drag_to_upload div.inside img.attachment-full');
|
||||
imageObject.removeAttr('width');
|
||||
imageObject.removeAttr('height');
|
||||
imageObject.removeAttr('title');
|
||||
imageObject.removeAttr('alt');
|
||||
imageObject.removeAttr('srcset');
|
||||
imageObject.removeAttr('sizes');
|
||||
imageObject.attr('src', response.image);
|
||||
|
||||
// Hide container:
|
||||
imageObject.load(function(){
|
||||
|
||||
// Display container:
|
||||
$('#current-uploaded-image').slideDown('medium');
|
||||
|
||||
// Fade in upload container:
|
||||
$('div#plupload-upload-ui').fadeIn('medium');
|
||||
$('#uploaderSection .loading').fadeOut('medium');
|
||||
|
||||
// Remove previous uploads:
|
||||
if (uploader.files.length >= 1){
|
||||
uploader.splice(0, (uploader.files.length - 1));
|
||||
}
|
||||
|
||||
var fields = $('input[name$="[coordinates]"]');
|
||||
fields.each(function(){
|
||||
$(this).attr('data-image-url', response.image);
|
||||
});
|
||||
hotspotAdmin.reset();
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* File upload handler.
|
||||
*/
|
||||
public function ajax_upload_image_file(){
|
||||
|
||||
// Check referer, die if no ajax:
|
||||
check_ajax_referer('photo-upload');
|
||||
|
||||
/// Upload file using Wordpress functions:
|
||||
$file = $_FILES['async-upload'];
|
||||
$status = wp_handle_upload($file, array(
|
||||
'test_form' => true,
|
||||
'action' => 'dgd_upload_featured_image'
|
||||
));
|
||||
|
||||
// Fetch post ID:
|
||||
$post_id = $_POST['postID'];
|
||||
|
||||
// Insert uploaded file as attachment:
|
||||
$attach_id = wp_insert_attachment(array(
|
||||
'post_mime_type' => $status['type'],
|
||||
'post_title' => preg_replace('/\.[^.]+$/', '', basename($file['name'])),
|
||||
'post_content' => '',
|
||||
'post_status' => 'inherit'
|
||||
), $status['file'], $post_id);
|
||||
|
||||
// Include the image handler library:
|
||||
require_once(ABSPATH . 'wp-admin/includes/image.php');
|
||||
|
||||
// Generate meta data and update attachment:
|
||||
$attach_data = wp_generate_attachment_metadata($attach_id, $status['file']);
|
||||
wp_update_attachment_metadata($attach_id, $attach_data);
|
||||
|
||||
// Check for current meta (update / add):
|
||||
if ($prevValue = get_post_meta($post_id, '_thumbnail_id', true)){
|
||||
update_post_meta($post_id, '_thumbnail_id', $attach_id, $prevValue);
|
||||
} else {
|
||||
add_post_meta($post_id, '_thumbnail_id', $attach_id);
|
||||
}
|
||||
|
||||
// Get image sizes and correct thumb:
|
||||
$croppedImage = wp_get_attachment_image_src($attach_id, 'full');
|
||||
$imageDetails = getimagesize($croppedImage[0]);
|
||||
|
||||
// Create response array:
|
||||
$uploadResponse = array(
|
||||
'image' => $croppedImage[0],
|
||||
'width' => $imageDetails[0],
|
||||
'height' => $imageDetails[1],
|
||||
'postID' => $post_id
|
||||
);
|
||||
|
||||
// Return response and exit:
|
||||
die(json_encode($uploadResponse));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* AJAX function: Set featured image.
|
||||
*/
|
||||
public function ajax_set_featured_image(){
|
||||
$postID = isset($_POST['postID']) ? (int) $_POST['postID'] : false;
|
||||
$attachmentID = isset($_POST['attachmentID']) ? (int) $_POST['attachmentID'] : false;
|
||||
$dgd_set_featured_image_nonce = isset($_POST['nonce']) ? $_POST['nonce'] : false;
|
||||
if ($postID && $attachmentID ){
|
||||
if( current_user_can( 'edit_post', $postID ) && wp_verify_nonce( $dgd_set_featured_image_nonce, "dgd_set_featured_image_nonce" ) ){
|
||||
// Update / add post meta:
|
||||
if ($status = get_post_meta($postID, '_thumbnail_id', true)){
|
||||
update_post_meta($postID, '_thumbnail_id', $attachmentID);
|
||||
} else {
|
||||
add_post_meta($postID, '_thumbnail_id', $attachmentID);
|
||||
}
|
||||
|
||||
$response = array(
|
||||
'response_code' => 200,
|
||||
'response_content' => 'success'
|
||||
);
|
||||
} else {
|
||||
$response = array(
|
||||
'response_code' => 403,
|
||||
'response_content' => __('Drag & Drop Feaured image: You do not have permission to edit this post!', $this->plugin_locale)
|
||||
);
|
||||
}
|
||||
|
||||
} else {
|
||||
$response = array(
|
||||
'response_code' => 500,
|
||||
'response_content' => __('Drag & Drop Feaured image: Unknown post och attachment ID, please try again!', $this->plugin_locale)
|
||||
);
|
||||
}
|
||||
|
||||
// Return response:
|
||||
die(json_encode($response));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* AJAX function: Get featured image.
|
||||
*/
|
||||
public function ajax_get_featured_image(){
|
||||
|
||||
$postID = isset($_POST['post_id']) ? (int) $_POST['post_id'] : false;
|
||||
if ($postID){
|
||||
$featured = wp_get_attachment_image_src(get_post_thumbnail_id($postID), 'full');
|
||||
$response = array(
|
||||
'response_code' => 200,
|
||||
'response_content' => $featured[0]
|
||||
);
|
||||
} else {
|
||||
$response = array(
|
||||
'response_code' => 500,
|
||||
'response_content' => __('Drag & Drop Feaured image: An error occured, please reload page!', $this->plugin_locale)
|
||||
);
|
||||
}
|
||||
|
||||
// Return response:
|
||||
die(json_encode($response));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add body classes to the admin.
|
||||
* @param $classes
|
||||
* @return string
|
||||
*/
|
||||
public function modify_admin_body_class($classes){
|
||||
if ($this->wordpress_version >= 38){ $classes .= ' wp38'; }
|
||||
return $classes;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Drag & Drop Featured Image v2.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2013-11-17 16:51:06+0000\n"
|
||||
"Last-Translator: jonathan <contact@jonathanlundstrom.me>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: CSL v1.x\n"
|
||||
"X-Poedit-Language: English\n"
|
||||
"X-Poedit-Country: UNITED STATES\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
||||
"X-Poedit-Basepath: ../\n"
|
||||
"X-Poedit-Bookmarks: \n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
"X-Textdomain-Support: yes"
|
||||
|
||||
#: index.php:175
|
||||
#@ dgdfi
|
||||
msgid "Options for Drag & Drop Featured Image"
|
||||
msgstr "Options for Drag & Drop Featured Image"
|
||||
|
||||
#: assets/views/options.php:73
|
||||
#@ dgdfi
|
||||
msgid "Available options:"
|
||||
msgstr "Available options:"
|
||||
|
||||
#: index.php:115
|
||||
#: index.php:175
|
||||
#@ default
|
||||
#@ dgdfi
|
||||
msgid "Featured Image"
|
||||
msgstr "Featured Image"
|
||||
|
||||
#: index.php:210
|
||||
#@ default
|
||||
msgid "Remove featured image"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:222
|
||||
#@ default
|
||||
msgid "Drop files here"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:223
|
||||
#@ default
|
||||
msgctxt "Uploader: Drop files here - or - Select Files"
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:224
|
||||
#@ default
|
||||
msgid "Select Files"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:265
|
||||
#@ dgdfi
|
||||
msgid "Allowed Files"
|
||||
msgstr "Allowed filetypes"
|
||||
|
||||
#: index.php:315
|
||||
#@ dgdfi
|
||||
msgid "You may only upload one image at a time!"
|
||||
msgstr "You may only upload one image at a time!"
|
||||
|
||||
#: index.php:330
|
||||
#@ dgdfi
|
||||
msgid "The file you selected exceeds the maximum filesize limit."
|
||||
msgstr "The file you selected exceeds the maximum filesize limit."
|
||||
|
||||
#: index.php:225
|
||||
#@ dgdfi
|
||||
msgid "from"
|
||||
msgstr "from"
|
||||
|
||||
#: index.php:234
|
||||
#: index.php:238
|
||||
#@ dgdfi
|
||||
msgid "Media Library"
|
||||
msgstr "Media Library"
|
||||
|
||||
#: index.php:502
|
||||
#@ dgdfi
|
||||
msgid "Drag & Drop Feaured image: An error occured, please reload page!"
|
||||
msgstr "Drag & Drop Featured image: An error occured, please reload page!"
|
||||
|
||||
#: assets/views/options.php:36
|
||||
#@ dgdfi
|
||||
msgid "Success:"
|
||||
msgstr "Success:"
|
||||
|
||||
#: assets/views/options.php:36
|
||||
#@ dgdfi
|
||||
msgid "The plugin options have been successfully updated!"
|
||||
msgstr "The plugin options have been successfully updated!"
|
||||
|
||||
#: assets/views/options.php:41
|
||||
#@ dgdfi
|
||||
msgid "Please make sure you filled in all the required fields before submitting. At least <em><strong>one post type</strong></em> and <em><strong>one extension</strong></em> must be selected!"
|
||||
msgstr "Please make sure you filled in all the required fields before submitting. At least <em><strong>one post type</strong></em> and <em><strong>one extension</strong></em> must be selected!"
|
||||
|
||||
#: assets/views/options.php:54
|
||||
#@ dgdfi
|
||||
msgid "Contact me"
|
||||
msgstr "Contact me"
|
||||
|
||||
#: assets/views/options.php:56
|
||||
#@ dgdfi
|
||||
msgid "If you have any questions regarding this plugin or have ideas on how to improve it then please dont hesitate to"
|
||||
msgstr "If you have any questions regarding this plugin or have ideas on how to improve it then please dont hesitate to"
|
||||
|
||||
#: assets/views/options.php:56
|
||||
#@ dgdfi
|
||||
msgid "contact me"
|
||||
msgstr "contact me"
|
||||
|
||||
#: assets/views/options.php:58
|
||||
#@ dgdfi
|
||||
msgid "Send me an email"
|
||||
msgstr "Send me an email"
|
||||
|
||||
#: assets/views/options.php:59
|
||||
#@ dgdfi
|
||||
msgid "Find me on Facebook"
|
||||
msgstr "Find me on Facebook"
|
||||
|
||||
#: assets/views/options.php:60
|
||||
#@ dgdfi
|
||||
msgid "Find me on Twitter"
|
||||
msgstr "Find me on Twitter"
|
||||
|
||||
#: assets/views/options.php:61
|
||||
#@ dgdfi
|
||||
msgid "Find me on Google+"
|
||||
msgstr "Find me on Google+"
|
||||
|
||||
#: assets/views/options.php:78
|
||||
#@ dgdfi
|
||||
msgid "Which post types do you want the meta box to display at?"
|
||||
msgstr "Which post types do you want the meta box to display at?"
|
||||
|
||||
#: assets/views/options.php:97
|
||||
#@ dgdfi
|
||||
msgid "Which of the following file types should be supported?"
|
||||
msgstr "Which of the following file types should be supported?"
|
||||
|
||||
#: assets/views/options.php:115
|
||||
#@ dgdfi
|
||||
msgid "Change the capability required to customize the plugin settings"
|
||||
msgstr "Change the capability required to customize the plugin settings"
|
||||
|
||||
#: assets/views/options.php:116
|
||||
#@ dgdfi
|
||||
msgid "The default capability is <code>manage_options</code> and applies to administrators."
|
||||
msgstr "The default capability is <code>manage_options</code> and applies to administrators."
|
||||
|
||||
#: assets/views/options.php:118
|
||||
#@ dgdfi
|
||||
msgid "User roles & capabilities"
|
||||
msgstr "User roles & capabilities"
|
||||
|
||||
#: assets/views/options.php:136
|
||||
#@ dgdfi
|
||||
msgid "Update settings"
|
||||
msgstr "Update settings"
|
||||
|
||||
#: assets/views/options.php:123
|
||||
#@ dgdfi
|
||||
msgid "Publish / update post after successful image upload?"
|
||||
msgstr "Publish / update post after selecting a featured image"
|
||||
|
||||
#: assets/views/options.php:124
|
||||
#@ dgdfi
|
||||
msgid "If you like some users upload the featured image as the last step when publishing a post, this option is for you."
|
||||
msgstr "If you like some users upload the featured image as the last step when publishing a post, this option is for you."
|
||||
|
||||
#: index.php:146
|
||||
#: index.php:147
|
||||
#@ default
|
||||
msgid "Set featured image"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:479
|
||||
#@ dgdfi
|
||||
msgid "Drag & Drop Feaured image: Unknown post och attachment ID, please try again!"
|
||||
msgstr "Drag & Drop Featured image: Unknown post och attachment ID, please try again!"
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Drag & Drop Featured Image v2.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2014-01-09 10:59+0100\n"
|
||||
"Last-Translator: jelena kovacevic <jecajeca260@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Poedit 1.5.5\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
||||
"_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
|
||||
"X-Poedit-Basepath: ../\n"
|
||||
"X-Textdomain-Support: yes\n"
|
||||
"Language: sv_SE\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
# @ dgdfi
|
||||
#: index.php:175
|
||||
msgid "Options for Drag & Drop Featured Image"
|
||||
msgstr "Opciones para Arrastrar y Soltar Foto Principal"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:73
|
||||
msgid "Available options:"
|
||||
msgstr "Opciones disponibles:"
|
||||
|
||||
# @ default
|
||||
# @ dgdfi
|
||||
#: index.php:115 index.php:175
|
||||
msgid "Featured Image"
|
||||
msgstr "Foto principal"
|
||||
|
||||
# @ default
|
||||
#: index.php:210
|
||||
msgid "Remove featured image"
|
||||
msgstr "Eliminar foto principal"
|
||||
|
||||
# @ default
|
||||
#: index.php:222
|
||||
msgid "Drop files here"
|
||||
msgstr "Soltar archivos aquí"
|
||||
|
||||
# @ default
|
||||
#: index.php:223
|
||||
msgctxt "Uploader: Drop files here - or - Select Files"
|
||||
msgid "or"
|
||||
msgstr "O"
|
||||
|
||||
# @ default
|
||||
#: index.php:224
|
||||
msgid "Select Files"
|
||||
msgstr "Seleccionar archivos"
|
||||
|
||||
# @ dgdfi
|
||||
#: index.php:265
|
||||
msgid "Allowed Files"
|
||||
msgstr "Archivos Permitidos"
|
||||
|
||||
# @ dgdfi
|
||||
#: index.php:315
|
||||
msgid "You may only upload one image at a time!"
|
||||
msgstr "¡Sólo puede cargar una imagen a la vez!."
|
||||
|
||||
# @ dgdfi
|
||||
#: index.php:330
|
||||
msgid "The file you selected exceeds the maximum filesize limit."
|
||||
msgstr "El archivo seleccionado excede el límite máximo de tamaño de archivo"
|
||||
|
||||
# @ dgdfi
|
||||
#: index.php:225
|
||||
msgid "from"
|
||||
msgstr "de"
|
||||
|
||||
# @ dgdfi
|
||||
#: index.php:234 index.php:238
|
||||
msgid "Media Library"
|
||||
msgstr "Biblioteca de Medios"
|
||||
|
||||
# @ dgdfi
|
||||
#: index.php:502
|
||||
msgid "Drag & Drop Feaured image: An error occured, please reload page!"
|
||||
msgstr ""
|
||||
"Arrastrar y Soltar imagen Principal: Ha ocurrido un error, ¡por favor "
|
||||
"vuelva a cargar la página"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:36
|
||||
msgid "Success:"
|
||||
msgstr "Éxito:"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:36
|
||||
msgid "The plugin options have been successfully updated!"
|
||||
msgstr "¡Las opciones del plugin se han actualizado correctamente!."
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:41
|
||||
msgid ""
|
||||
"Please make sure you filled in all the required fields before submitting. At "
|
||||
"least <em><strong>one post type</strong></em> and <em><strong>one extension</"
|
||||
"strong></em> must be selected!"
|
||||
msgstr ""
|
||||
"Por favor asegúrese de que llenó todos los campos requeridos antes de "
|
||||
"enviar. ¡Se debe seleccionar por lo menos <strong> un tipo de publicación</"
|
||||
"strong></em> y <strong> una extensión </ strong> </ em>!"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:54
|
||||
msgid "Contact me"
|
||||
msgstr "Contácteme"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:56
|
||||
msgid ""
|
||||
"If you have any questions regarding this plugin or have ideas on how to "
|
||||
"improve it then please dont hesitate to"
|
||||
msgstr ""
|
||||
"Si tiene alguna pregunta relacionada con este plugin o tiene ideas sobre "
|
||||
"cómo mejorarlo, por favor no dude en"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:56
|
||||
msgid "contact me"
|
||||
msgstr "ponerse en contacto conmigo"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:58
|
||||
msgid "Send me an email"
|
||||
msgstr "Envíeme un email"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:59
|
||||
msgid "Find me on Facebook"
|
||||
msgstr "Encuéntreme en Facebook"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:60
|
||||
msgid "Find me on Twitter"
|
||||
msgstr "Encuéntreme en Twitter"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:61
|
||||
msgid "Find me on Google+"
|
||||
msgstr "Encuéntreme en Google+"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:78
|
||||
msgid "Which post types do you want the meta box to display at?"
|
||||
msgstr "¿Qué tipos de publicación desea que el cuadro meta muestre?"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:97
|
||||
msgid "Which of the following file types should be supported?"
|
||||
msgstr "¿Cuál de los siguientes tipos de archivo debe contar con soporte?"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:115
|
||||
msgid "Change the capability required to customize the plugin settings"
|
||||
msgstr ""
|
||||
"Cambie la capacidad necesaria para personalizar la configuración del plugin"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:116
|
||||
msgid ""
|
||||
"The default capability is <code>manage_options</code> and applies to "
|
||||
"administrators."
|
||||
msgstr ""
|
||||
"La capacidad por defecto es <code> manage_options</code> y se aplica a los "
|
||||
"administradores."
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:118
|
||||
msgid "User roles & capabilities"
|
||||
msgstr "Roles y capacidades & de los usuarios"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:136
|
||||
msgid "Update settings"
|
||||
msgstr "Configuración de la actualización"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:123
|
||||
msgid "Publish / update post after successful image upload?"
|
||||
msgstr ""
|
||||
"¿Publicar / actualizar publicación después de subir con éxito la imagen?"
|
||||
|
||||
# @ dgdfi
|
||||
#: assets/views/options.php:124
|
||||
msgid ""
|
||||
"If you like some users upload the featured image as the last step when "
|
||||
"publishing a post, this option is for you."
|
||||
msgstr ""
|
||||
"Si permites que los usuarios suban la imagen principal como el último paso "
|
||||
"al publicar una publicación, esta opción es para ti."
|
||||
|
||||
# @ default
|
||||
#: index.php:146 index.php:147
|
||||
msgid "Set featured image"
|
||||
msgstr "Establecer imagen principal"
|
||||
|
||||
# @ dgdfi
|
||||
#: index.php:479
|
||||
msgid ""
|
||||
"Drag & Drop Feaured image: Unknown post och attachment ID, please try again!"
|
||||
msgstr ""
|
||||
"Arrastrar y Soltar la imagen principal: Publicación Desconocida en el ID de "
|
||||
"la publicación, ¡por favor intente de nuevo!"
|
||||
@@ -0,0 +1,192 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Drag & Drop Featured Image v2.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2013-11-17 16:49:31+0000\n"
|
||||
"Last-Translator: jonathan <contact@jonathanlundstrom.me>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: CSL v1.x\n"
|
||||
"X-Poedit-Language: Swedish\n"
|
||||
"X-Poedit-Country: SWEDEN\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
||||
"X-Poedit-Basepath: ../\n"
|
||||
"X-Poedit-Bookmarks: \n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
"X-Textdomain-Support: yes"
|
||||
|
||||
#: index.php:175
|
||||
#@ dgdfi
|
||||
msgid "Options for Drag & Drop Featured Image"
|
||||
msgstr "Inställningar för Drag & Drop Featured Image"
|
||||
|
||||
#: assets/views/options.php:73
|
||||
#@ dgdfi
|
||||
msgid "Available options:"
|
||||
msgstr "Tillgängliga alternativ:"
|
||||
|
||||
#: index.php:115
|
||||
#: index.php:175
|
||||
#@ default
|
||||
#@ dgdfi
|
||||
msgid "Featured Image"
|
||||
msgstr "Utvald bild"
|
||||
|
||||
#: index.php:210
|
||||
#@ default
|
||||
msgid "Remove featured image"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:222
|
||||
#@ default
|
||||
msgid "Drop files here"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:223
|
||||
#@ default
|
||||
msgctxt "Uploader: Drop files here - or - Select Files"
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:224
|
||||
#@ default
|
||||
msgid "Select Files"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:265
|
||||
#@ dgdfi
|
||||
msgid "Allowed Files"
|
||||
msgstr "Tillåtna filtyper"
|
||||
|
||||
#: index.php:315
|
||||
#@ dgdfi
|
||||
msgid "You may only upload one image at a time!"
|
||||
msgstr "Du kan endast ladda upp en bild i taget!"
|
||||
|
||||
#: index.php:330
|
||||
#@ dgdfi
|
||||
msgid "The file you selected exceeds the maximum filesize limit."
|
||||
msgstr "Filen du valde överstiger den maximala filstorleken."
|
||||
|
||||
#: index.php:225
|
||||
#@ dgdfi
|
||||
msgid "from"
|
||||
msgstr "från"
|
||||
|
||||
#: index.php:234
|
||||
#: index.php:238
|
||||
#@ dgdfi
|
||||
msgid "Media Library"
|
||||
msgstr "Mediabiblioteket"
|
||||
|
||||
#: index.php:502
|
||||
#@ dgdfi
|
||||
msgid "Drag & Drop Feaured image: An error occured, please reload page!"
|
||||
msgstr "Drag & Drop Featured image: Ett fel uppstod, vänligen ladda om sidan!"
|
||||
|
||||
#: assets/views/options.php:36
|
||||
#@ dgdfi
|
||||
msgid "Success:"
|
||||
msgstr "Succe:"
|
||||
|
||||
#: assets/views/options.php:36
|
||||
#@ dgdfi
|
||||
msgid "The plugin options have been successfully updated!"
|
||||
msgstr "Inställningarna har nu uppdaterats!"
|
||||
|
||||
#: assets/views/options.php:41
|
||||
#@ dgdfi
|
||||
msgid "Please make sure you filled in all the required fields before submitting. At least <em><strong>one post type</strong></em> and <em><strong>one extension</strong></em> must be selected!"
|
||||
msgstr "Vänligen se till att du fyllt i alla obligatoriska fält innan du sparar. Åtminstone <em><strong>en posttyp</strong></em> och <em><strong>ett bildformat</strong></em> måste vara valt!"
|
||||
|
||||
#: assets/views/options.php:54
|
||||
#@ dgdfi
|
||||
msgid "Contact me"
|
||||
msgstr "Kontakta mig"
|
||||
|
||||
#: assets/views/options.php:56
|
||||
#@ dgdfi
|
||||
msgid "If you have any questions regarding this plugin or have ideas on how to improve it then please dont hesitate to"
|
||||
msgstr "Om du har några frågor angående denna plugin eller har ideér på hur jag kan förbättra den, tveka isåfall inte utan "
|
||||
|
||||
#: assets/views/options.php:56
|
||||
#@ dgdfi
|
||||
msgid "contact me"
|
||||
msgstr "kontakta mig"
|
||||
|
||||
#: assets/views/options.php:58
|
||||
#@ dgdfi
|
||||
msgid "Send me an email"
|
||||
msgstr "Skicka ett e-post till mig"
|
||||
|
||||
#: assets/views/options.php:59
|
||||
#@ dgdfi
|
||||
msgid "Find me on Facebook"
|
||||
msgstr "Hitta mig på Facebook"
|
||||
|
||||
#: assets/views/options.php:60
|
||||
#@ dgdfi
|
||||
msgid "Find me on Twitter"
|
||||
msgstr "Hitta mig på Twitter"
|
||||
|
||||
#: assets/views/options.php:61
|
||||
#@ dgdfi
|
||||
msgid "Find me on Google+"
|
||||
msgstr "Hitta mig på Google+"
|
||||
|
||||
#: assets/views/options.php:78
|
||||
#@ dgdfi
|
||||
msgid "Which post types do you want the meta box to display at?"
|
||||
msgstr "Vilka inläggstyper vill du att metaboxen ska visas på?"
|
||||
|
||||
#: assets/views/options.php:97
|
||||
#@ dgdfi
|
||||
msgid "Which of the following file types should be supported?"
|
||||
msgstr "Vilka av följande filtyper ska stödjas?"
|
||||
|
||||
#: assets/views/options.php:115
|
||||
#@ dgdfi
|
||||
msgid "Change the capability required to customize the plugin settings"
|
||||
msgstr "Ändra vilken förmåga som krävs för att ändra plugin-inställningarna"
|
||||
|
||||
#: assets/views/options.php:116
|
||||
#@ dgdfi
|
||||
msgid "The default capability is <code>manage_options</code> and applies to administrators."
|
||||
msgstr "Förvald förmåga är <code>manage_options</code> och appliceras på administratörer."
|
||||
|
||||
#: assets/views/options.php:118
|
||||
#@ dgdfi
|
||||
msgid "User roles & capabilities"
|
||||
msgstr "Roller & förmågor"
|
||||
|
||||
#: assets/views/options.php:136
|
||||
#@ dgdfi
|
||||
msgid "Update settings"
|
||||
msgstr "Uppdatera inställningar"
|
||||
|
||||
#: assets/views/options.php:123
|
||||
#@ dgdfi
|
||||
msgid "Publish / update post after successful image upload?"
|
||||
msgstr "Publicera / uppdatera inlägg efter att du valt en utvald bild"
|
||||
|
||||
#: assets/views/options.php:124
|
||||
#@ dgdfi
|
||||
msgid "If you like some users upload the featured image as the last step when publishing a post, this option is for you."
|
||||
msgstr "Om du som vissa användare laddar upp den utvalda bilden som sista steg när du skriver ett inlägg, då är detta för dig."
|
||||
|
||||
#: index.php:146
|
||||
#: index.php:147
|
||||
#@ default
|
||||
msgid "Set featured image"
|
||||
msgstr ""
|
||||
|
||||
#: index.php:479
|
||||
#@ dgdfi
|
||||
msgid "Drag & Drop Feaured image: Unknown post och attachment ID, please try again!"
|
||||
msgstr "Drag & Drop Featured image: Okänt inläggs eller bilagsid, vänligen försök igen!"
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PlaceHolder\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: 2012-10-18 18:46:28+0000\n"
|
||||
"Last-Translator: none\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Poedit-Language: English\n"
|
||||
"X-Poedit-Country: UNITED STATES\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
||||
"X-Poedit-Basepath: ../\n"
|
||||
"X-Poedit-Bookmarks: \n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
"X-Textdomain-Support: yes"
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
=== Drag & Drop Featured Image ===
|
||||
Contributors: Plizzo
|
||||
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=APEQE63QALKHA&lc=SE&item_name=Drag%20%26%20Drop%20Featured%20Image&item_number=drag%2dand%2dfeatured¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
|
||||
Tags: image, upload, metabox, replacement, featured image
|
||||
Requires at least: 3.2.1
|
||||
Tested up to: 3.8.1
|
||||
Stable tag: 2.0.4
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Drag & Drop Featured Image is a plugin that replaces the default featured image metabox with a drop zone for faster and more convenient uploads.
|
||||
|
||||
== Description ==
|
||||
|
||||
Drag & Drop Featured Image is a plugin made to save you time when setting a featured image. What it does is simple, it replaces the default "Set featured image" metabox with a new one containing a Plupload drop area just like the one found in the media uploader.
|
||||
|
||||
Since it uses the default Wordpress functions it will compress all sizes just as the regular upload method would and it also respects any custom image sizes.
|
||||
|
||||
In WordPress versions lower than 3.5 the page will reload after a successful image upload in order to show the new image. This has been fixed in more recent versions of WordPress, but cannot be implemented properly in older versions.
|
||||
|
||||
If you want to showcase testimonials on your website I highly recommend you to download the [Testionials Widget plugin](http://wordpress.org/extend/plugins/testimonials-widget/ "View plugin") by [Michael Cannon](http://wordpress.org/support/profile/comprock/ "Visit profile").
|
||||
|
||||
**Translations:**
|
||||
|
||||
* English - Jonathan Lundström
|
||||
* Swedish - Jonathan Lundström
|
||||
* Spanish - Andrew Kurtis at [WebHostingHub](http://www.webhostinghub.com/ "Visit their website").
|
||||
|
||||
Translations are always more than welcome, and highly appreciated. If you are interested in helping me translate the plugin to your language, please [contact me](mailto:contact@jonathanlundstrom.me "Send me an email"). You can use the tool [Codestyling Localization](http://wordpress.org/plugins/codestyling-localization/ "WordPress plugin") in order to translate the plugin straight from your WordPress admin.
|
||||
|
||||
== Installation ==
|
||||
|
||||
To perform a manual install, do the following:
|
||||
|
||||
1. Upload the 'drag-and-featured' folder to the '/wp-content/plugins/' directory
|
||||
2. Activate the plugin through the 'Plugins' menu in WordPress
|
||||
3. Configure the plugin through the Options => Featured Image options panel
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= How do I select an image from the Media Library? =
|
||||
|
||||
To select an image from the Media Library, simple use the regular button above the content editor, or the one provided in the uploader. All methods have been rewritten to use the native implementations.
|
||||
|
||||
= Which image file formats extensions are currently supported? =
|
||||
|
||||
The current formats that are supported are JPG (JPEG), PNG and GIF
|
||||
|
||||
= If I have some feature requests, where can I turn to? =
|
||||
|
||||
If you have some ideas for new features or improvements I would love to hear about them. You can get in touch with me by [sending me an email](mailto:contact@jonathanlundstrom.me "My email-address").
|
||||
|
||||
== Screenshots ==
|
||||
1. The metabox without image attached.
|
||||
2. The metabox with an image attached.
|
||||
3. Options panel to customize plugin settings.
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 2.0.4 =
|
||||
* Added spanish translation, courtesy of Andrew Kurtis at [WebHostingHub](http://www.webhostinghub.com/ "Visit their website").
|
||||
|
||||
= 2.0.2 =
|
||||
* Fixed PHP notice on line 128, sorry it took so long.
|
||||
* Fixed a minor styling issue in WordPress 3.8.
|
||||
* User capability should now apply properly again.
|
||||
* Minor code fixes.
|
||||
|
||||
= 2.0 =
|
||||
* Rewritten plugin from scratch using an object-oriented approach.
|
||||
* Brand new Media Manager hooks, image retrieved using the real API.
|
||||
* Fixed all AJAX issues that occured in WordPress >= 3.6.
|
||||
* All post types now show as long as `show_ui` is set to true.
|
||||
* Added option to publish / update the post after a successful image upload or select.
|
||||
* Fixes minor CSS and JavaScript issues, general code cleanup.
|
||||
* Renamed the option panel to simply say "Featured Image".
|
||||
* Cleaned up the options page styling.
|
||||
|
||||
= 1.5.4 =
|
||||
* The uploader could sometimes get stuck the second time an image was uploaded. This behavior has now been fixed.
|
||||
* Options panel has now been moved to Settings
|
||||
* Added more options for localization, please help translate the plugin.
|
||||
* Removed option for file size, this is handled by php.ini.
|
||||
|
||||
= 1.5.2 =
|
||||
* Fixes an invalid media manager hook that conflicted with ACF.
|
||||
|
||||
= 1.5 =
|
||||
* Split the javascript and stylesheets for the uploader and the panel into separate files.
|
||||
* Changed the loading behavior of the scripts and stylesheets by changing hooks and checking the current page in order to reduce conflicts.
|
||||
* All javascript has been refined to remove compatibility issues with other plugins.
|
||||
* Re-coded the entire featured image mechanism to utilize ajax and mimic the original WordPress behavior. **In other words, no more reloads! (WP3.5+)**
|
||||
|
||||
= 1.4.8 =
|
||||
* Fixes another conflict with Advanced Custom Fields.
|
||||
|
||||
= 1.4.6 =
|
||||
* Fixes a mistake I made where some lines of code from 1.4.2 were removed. Compatibility with ACF has been resolved again in this version.
|
||||
|
||||
= 1.4.4 =
|
||||
* Fixes a potential conflict with other plugins that bind actions to the media uploader.
|
||||
|
||||
= 1.4.2 =
|
||||
* Changed PHP function to reformat names with uppercase characters from 'mb_stroupper' to 'strtoupper'.
|
||||
* Fixed an issue that affected later versions of Advanced Custom Fields where the image field button would collide with the media selector button JS of this plugin.
|
||||
* Previously, dropping several files at once would cause them all to upload even though it was warning the user. This issue has now been fixed.
|
||||
|
||||
= 1.4 =
|
||||
* Added WordPress 3.5 compatibility with the new media viewer. Fixed minor issues and hopefully solved the dual file select bug. Please update asap if you run WordPress 3.5.
|
||||
|
||||
= 1.3.6 =
|
||||
* Added settings for plugin customizing control between user roles and capabilities.
|
||||
|
||||
= 1.3.5 =
|
||||
* Fixed Plugin URL in main plugin file. No changes made to the code.
|
||||
|
||||
= 1.3.4 =
|
||||
* Added a button in the uploader ares for quick access to the Media Library. Also changed the meta box priority from 'high' to 'default'. Thanks to [Michael Cannon](http://wordpress.org/support/profile/comprock/ "Visit profile") for suggesting these fixes.
|
||||
|
||||
= 1.3.2 =
|
||||
* Fixes a bug where $post->ID was called at every page instead of the edit page. Thanks to [kanakiyajay](http://profiles.wordpress.org/kanakiyajay/ "Visit profile") for reporting this issue.
|
||||
|
||||
= 1.3 =
|
||||
* This version adds support for choosing an image previously uploaded to the gallery or through the media library. It also includes support for localization. Due to restrictions, the page will reload when you choose an image from one of these locations.
|
||||
|
||||
= 1.2 =
|
||||
* This version fixes a critical bug preventing the pop-out menus to load as well as the visual editor to work properly. Many thanks to [Adam](http://wordpress.org/support/profile/panhead "Visit profile") for reporting this issue.
|
||||
|
||||
= 1.1 =
|
||||
* Updated and improved options panel.
|
||||
* The options panel is now called 'D&D Featured Image'
|
||||
* Added option to set a custom filesize limit.
|
||||
* Removed BMP support as WordPress doesn't support this format.
|
||||
* This version also fixes some minor text issues.
|
||||
|
||||
= 1.0 =
|
||||
* Initial release
|
||||
|
||||
== Upgrade Notice ==
|
||||
|
||||
= 2.0.4 =
|
||||
Added spanish language files, no critical changes.
|
||||
|
||||
= 2.0.2 =
|
||||
Notice fix, interface fix, minor tweaks.
|
||||
|
||||
= 2.0 =
|
||||
Major update, fixes several issues. Please update as soon as possible!
|
||||
|
||||
= 1.5.4 =
|
||||
Fixes the freezing error and some other minor issues.
|
||||
|
||||
= 1.5.2 =
|
||||
Fixes a minor media manager binding that was broken and conflicted with ACF.
|
||||
|
||||
= 1.5 =
|
||||
Major changes done to the plugin in order to fix bugs and better your workflow.
|
||||
|
||||
= 1.4.8 =
|
||||
Fixes another conflict with Advanced Custom Fields.
|
||||
|
||||
= 1.4.6 =
|
||||
Fixes a conflict with Advanced Custom Fields.
|
||||
|
||||
= 1.4.4 =
|
||||
Fixes a potential conflict with other plugins that bind actions to the media uploader.
|
||||
|
||||
= 1.4.2 =
|
||||
Fixed several issues, one that would cause a PHP error and one that affected ACF.
|
||||
|
||||
= 1.4 =
|
||||
Added compatibility with the new media viewer in WordPress 3.5 and fixed other minor issues.
|
||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 71 KiB |
|
After Width: | Height: | Size: 106 KiB |