Cambios
git-svn-id: https://192.168.0.254/svn/Proyectos.OriginalHouse_Web/trunk@38 54e8636e-a86c-764f-903d-b964358a1ae2
BIN
información/Cartelera/BUDAS.jpg
Normal file
|
After Width: | Height: | Size: 193 KiB |
BIN
información/Cartelera/lamparas.jpg
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
información/Proyectos/acro1.jpg
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
información/Proyectos/acro2.jpg
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
información/la tienda.jpg
Normal file
|
After Width: | Height: | Size: 202 KiB |
@ -11,7 +11,7 @@
|
||||
global $g_lightbox_plus_url;
|
||||
if (!is_admin()) {
|
||||
wp_enqueue_script('jquery','','','1.4.2',true);
|
||||
wp_enqueue_script( 'lightbox', $g_lightbox_plus_url.'/js/jquery.colorbox-min.js', array( 'jquery' ), '1.3.8', true);
|
||||
wp_enqueue_script( 'lightbox', $g_lightbox_plus_url.'/js/jquery.colorbox.js', array( 'jquery' ), '1.3.8', true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -73,11 +73,11 @@
|
||||
"resize" => '1',
|
||||
"opacity" => '0.8',
|
||||
"preloading" => '1',
|
||||
"label_image" => 'Image',
|
||||
"label_of" => 'of',
|
||||
"previous" => 'previous',
|
||||
"next" => 'next',
|
||||
"close" => 'close',
|
||||
"label_image" => 'Imagen',
|
||||
"label_of" => 'de',
|
||||
"previous" => 'anterior',
|
||||
"next" => 'siguiente',
|
||||
"close" => 'cerrar',
|
||||
"overlay_close" => '1',
|
||||
"slideshow" => '0',
|
||||
"slideshow_auto" => '0',
|
||||
|
||||
864
src/wp-content/plugins/lightbox-plus/js/jquery.colorbox.js
Normal file
@ -0,0 +1,864 @@
|
||||
// ColorBox v1.3.17.2 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
|
||||
// Copyright (c) 2011 Jack Moore - jack@colorpowered.com
|
||||
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
|
||||
|
||||
(function ($, document, window) {
|
||||
var
|
||||
// ColorBox Default Settings.
|
||||
// See http://colorpowered.com/colorbox for details.
|
||||
defaults = {
|
||||
transition: "elastic",
|
||||
speed: 300,
|
||||
width: false,
|
||||
initialWidth: "600",
|
||||
innerWidth: false,
|
||||
maxWidth: false,
|
||||
height: false,
|
||||
initialHeight: "450",
|
||||
innerHeight: false,
|
||||
maxHeight: false,
|
||||
scalePhotos: true,
|
||||
scrolling: true,
|
||||
inline: false,
|
||||
html: false,
|
||||
iframe: false,
|
||||
fastIframe: true,
|
||||
photo: false,
|
||||
href: false,
|
||||
title: false,
|
||||
rel: false,
|
||||
opacity: 0.9,
|
||||
preloading: true,
|
||||
current: "image {current} of {total}",
|
||||
previous: "previous",
|
||||
next: "next",
|
||||
close: "close",
|
||||
open: false,
|
||||
returnFocus: true,
|
||||
loop: true,
|
||||
slideshow: false,
|
||||
slideshowAuto: true,
|
||||
slideshowSpeed: 2500,
|
||||
slideshowStart: "start slideshow",
|
||||
slideshowStop: "stop slideshow",
|
||||
onOpen: false,
|
||||
onLoad: false,
|
||||
onComplete: false,
|
||||
onCleanup: false,
|
||||
onClosed: false,
|
||||
overlayClose: true,
|
||||
escKey: true,
|
||||
arrowKey: true,
|
||||
top: false,
|
||||
bottom: false,
|
||||
left: false,
|
||||
right: false,
|
||||
fixed: false,
|
||||
data: false
|
||||
},
|
||||
|
||||
// Abstracting the HTML and event identifiers for easy rebranding
|
||||
colorbox = 'colorbox',
|
||||
prefix = 'cbox',
|
||||
boxElement = prefix + 'Element',
|
||||
|
||||
// Events
|
||||
event_open = prefix + '_open',
|
||||
event_load = prefix + '_load',
|
||||
event_complete = prefix + '_complete',
|
||||
event_cleanup = prefix + '_cleanup',
|
||||
event_closed = prefix + '_closed',
|
||||
event_purge = prefix + '_purge',
|
||||
|
||||
// Special Handling for IE
|
||||
isIE = $.browser.msie && !$.support.opacity, // Detects IE6,7,8. IE9 supports opacity. Feature detection alone gave a false positive on at least one phone browser and on some development versions of Chrome, hence the user-agent test.
|
||||
isIE6 = isIE && $.browser.version < 7,
|
||||
event_ie6 = prefix + '_IE6',
|
||||
|
||||
// Cached jQuery Object Variables
|
||||
$overlay,
|
||||
$box,
|
||||
$wrap,
|
||||
$content,
|
||||
$topBorder,
|
||||
$leftBorder,
|
||||
$rightBorder,
|
||||
$bottomBorder,
|
||||
$related,
|
||||
$window,
|
||||
$loaded,
|
||||
$loadingBay,
|
||||
$loadingOverlay,
|
||||
$title,
|
||||
$current,
|
||||
$slideshow,
|
||||
$next,
|
||||
$prev,
|
||||
$close,
|
||||
$groupControls,
|
||||
|
||||
// Variables for cached values or use across multiple functions
|
||||
settings,
|
||||
interfaceHeight,
|
||||
interfaceWidth,
|
||||
loadedHeight,
|
||||
loadedWidth,
|
||||
element,
|
||||
index,
|
||||
photo,
|
||||
open,
|
||||
active,
|
||||
closing,
|
||||
handler,
|
||||
loadingTimer,
|
||||
publicMethod;
|
||||
|
||||
// ****************
|
||||
// HELPER FUNCTIONS
|
||||
// ****************
|
||||
|
||||
// jQuery object generator to reduce code size
|
||||
function $div(id, cssText, div) {
|
||||
div = document.createElement('div');
|
||||
if (id) {
|
||||
div.id = prefix + id;
|
||||
}
|
||||
div.style.cssText = cssText || '';
|
||||
return $(div);
|
||||
}
|
||||
|
||||
// Convert '%' and 'px' values to integers
|
||||
function setSize(size, dimension) {
|
||||
return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : $window.height()) / 100) : 1) * parseInt(size, 10));
|
||||
}
|
||||
|
||||
// Checks an href to see if it is a photo.
|
||||
// There is a force photo option (photo: true) for hrefs that cannot be matched by this regex.
|
||||
function isImage(url) {
|
||||
return settings.photo || /\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i.test(url);
|
||||
}
|
||||
|
||||
// Assigns function results to their respective settings. This allows functions to be used as values.
|
||||
function makeSettings(i) {
|
||||
settings = $.extend({}, $.data(element, colorbox));
|
||||
|
||||
for (i in settings) {
|
||||
if ($.isFunction(settings[i]) && i.substring(0, 2) !== 'on') { // checks to make sure the function isn't one of the callbacks, they will be handled at the appropriate time.
|
||||
settings[i] = settings[i].call(element);
|
||||
}
|
||||
}
|
||||
|
||||
settings.rel = settings.rel || element.rel || 'nofollow';
|
||||
settings.href = settings.href || $(element).attr('href');
|
||||
settings.title = settings.title || element.title;
|
||||
|
||||
if (typeof settings.href === "string") {
|
||||
settings.href = $.trim(settings.href);
|
||||
}
|
||||
}
|
||||
|
||||
function trigger(event, callback) {
|
||||
if (callback) {
|
||||
callback.call(element);
|
||||
}
|
||||
$.event.trigger(event);
|
||||
}
|
||||
|
||||
// Slideshow functionality
|
||||
function slideshow() {
|
||||
var
|
||||
timeOut,
|
||||
className = prefix + "Slideshow_",
|
||||
click = "click." + prefix,
|
||||
start,
|
||||
stop,
|
||||
clear;
|
||||
|
||||
if (settings.slideshow && $related[1]) {
|
||||
start = function () {
|
||||
$slideshow
|
||||
.text(settings.slideshowStop)
|
||||
.unbind(click)
|
||||
.bind(event_complete, function () {
|
||||
if (index < $related.length - 1 || settings.loop) {
|
||||
timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
|
||||
}
|
||||
})
|
||||
.bind(event_load, function () {
|
||||
clearTimeout(timeOut);
|
||||
})
|
||||
.one(click + ' ' + event_cleanup, stop);
|
||||
$box.removeClass(className + "off").addClass(className + "on");
|
||||
timeOut = setTimeout(publicMethod.next, settings.slideshowSpeed);
|
||||
};
|
||||
|
||||
stop = function () {
|
||||
clearTimeout(timeOut);
|
||||
$slideshow
|
||||
.text(settings.slideshowStart)
|
||||
.unbind([event_complete, event_load, event_cleanup, click].join(' '))
|
||||
.one(click, start);
|
||||
$box.removeClass(className + "on").addClass(className + "off");
|
||||
};
|
||||
|
||||
if (settings.slideshowAuto) {
|
||||
start();
|
||||
} else {
|
||||
stop();
|
||||
}
|
||||
} else {
|
||||
$box.removeClass(className + "off " + className + "on");
|
||||
}
|
||||
}
|
||||
|
||||
function launch(target) {
|
||||
if (!closing) {
|
||||
|
||||
element = target;
|
||||
|
||||
makeSettings();
|
||||
|
||||
$related = $(element);
|
||||
|
||||
index = 0;
|
||||
|
||||
if (settings.rel !== 'nofollow') {
|
||||
$related = $('.' + boxElement).filter(function () {
|
||||
var relRelated = $.data(this, colorbox).rel || this.rel;
|
||||
return (relRelated === settings.rel);
|
||||
});
|
||||
index = $related.index(element);
|
||||
|
||||
// Check direct calls to ColorBox.
|
||||
if (index === -1) {
|
||||
$related = $related.add(element);
|
||||
index = $related.length - 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!open) {
|
||||
open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
|
||||
|
||||
$box.show();
|
||||
|
||||
if (settings.returnFocus) {
|
||||
try {
|
||||
element.blur();
|
||||
$(element).one(event_closed, function () {
|
||||
try {
|
||||
this.focus();
|
||||
} catch (e) {
|
||||
// do nothing
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
// +settings.opacity avoids a problem in IE when using non-zero-prefixed-string-values, like '.5'
|
||||
$overlay.css({"opacity": +settings.opacity, "cursor": settings.overlayClose ? "pointer" : "auto"}).show();
|
||||
|
||||
// Opens inital empty ColorBox prior to content being loaded.
|
||||
settings.w = setSize(settings.initialWidth, 'x');
|
||||
settings.h = setSize(settings.initialHeight, 'y');
|
||||
publicMethod.position();
|
||||
|
||||
if (isIE6) {
|
||||
$window.bind('resize.' + event_ie6 + ' scroll.' + event_ie6, function () {
|
||||
$overlay.css({width: $window.width(), height: $window.height(), top: $window.scrollTop(), left: $window.scrollLeft()});
|
||||
}).trigger('resize.' + event_ie6);
|
||||
}
|
||||
|
||||
trigger(event_open, settings.onOpen);
|
||||
|
||||
$groupControls.add($title).hide();
|
||||
|
||||
$close.html(settings.close).show();
|
||||
}
|
||||
|
||||
publicMethod.load(true);
|
||||
}
|
||||
}
|
||||
|
||||
// ****************
|
||||
// PUBLIC FUNCTIONS
|
||||
// Usage format: $.fn.colorbox.close();
|
||||
// Usage from within an iframe: parent.$.fn.colorbox.close();
|
||||
// ****************
|
||||
|
||||
publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
|
||||
var $this = this;
|
||||
|
||||
options = options || {};
|
||||
|
||||
if (!$this[0]) {
|
||||
if ($this.selector) { // if a selector was given and it didn't match any elements, go ahead and exit.
|
||||
return $this;
|
||||
}
|
||||
// if no selector was given (ie. $.colorbox()), create a temporary element to work with
|
||||
$this = $('<a/>');
|
||||
options.open = true; // assume an immediate open
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
options.onComplete = callback;
|
||||
}
|
||||
|
||||
$this.each(function () {
|
||||
$.data(this, colorbox, $.extend({}, $.data(this, colorbox) || defaults, options));
|
||||
$(this).addClass(boxElement);
|
||||
});
|
||||
|
||||
if (($.isFunction(options.open) && options.open.call($this)) || options.open) {
|
||||
launch($this[0]);
|
||||
}
|
||||
|
||||
return $this;
|
||||
};
|
||||
|
||||
// Initialize ColorBox: store common calculations, preload the interface graphics, append the html.
|
||||
// This preps ColorBox for a speedy open when clicked, and minimizes the burdon on the browser by only
|
||||
// having to run once, instead of each time colorbox is opened.
|
||||
publicMethod.init = function () {
|
||||
// Create & Append jQuery Objects
|
||||
$window = $(window);
|
||||
$box = $div().attr({id: colorbox, 'class': isIE ? prefix + (isIE6 ? 'IE6' : 'IE') : ''});
|
||||
$overlay = $div("Overlay", isIE6 ? 'position:absolute' : '').hide();
|
||||
|
||||
$wrap = $div("Wrapper");
|
||||
$content = $div("Content").append(
|
||||
$loaded = $div("LoadedContent", 'width:0; height:0; overflow:hidden'),
|
||||
$loadingOverlay = $div("LoadingOverlay").add($div("LoadingGraphic")),
|
||||
$title = $div("Title"),
|
||||
$current = $div("Current"),
|
||||
$next = $div("Next"),
|
||||
$prev = $div("Previous"),
|
||||
$slideshow = $div("Slideshow").bind(event_open, slideshow),
|
||||
$close = $div("Close")
|
||||
);
|
||||
$wrap.append( // The 3x3 Grid that makes up ColorBox
|
||||
$div().append(
|
||||
$div("TopLeft"),
|
||||
$topBorder = $div("TopCenter"),
|
||||
$div("TopRight")
|
||||
),
|
||||
$div(false, 'clear:left').append(
|
||||
$leftBorder = $div("MiddleLeft"),
|
||||
$content,
|
||||
$rightBorder = $div("MiddleRight")
|
||||
),
|
||||
$div(false, 'clear:left').append(
|
||||
$div("BottomLeft"),
|
||||
$bottomBorder = $div("BottomCenter"),
|
||||
$div("BottomRight")
|
||||
)
|
||||
).children().children().css({'float': 'left'});
|
||||
|
||||
$loadingBay = $div(false, 'position:absolute; width:9999px; visibility:hidden; display:none');
|
||||
|
||||
$('body').prepend($overlay, $box.append($wrap, $loadingBay));
|
||||
|
||||
$content.children()
|
||||
.hover(function () {
|
||||
$(this).addClass('hover');
|
||||
}, function () {
|
||||
$(this).removeClass('hover');
|
||||
}).addClass('hover');
|
||||
|
||||
// Cache values needed for size calculations
|
||||
interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();//Subtraction needed for IE6
|
||||
interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
|
||||
loadedHeight = $loaded.outerHeight(true);
|
||||
loadedWidth = $loaded.outerWidth(true);
|
||||
|
||||
// Setting padding to remove the need to do size conversions during the animation step.
|
||||
$box.css({"padding-bottom": interfaceHeight, "padding-right": interfaceWidth}).hide();
|
||||
|
||||
// Setup button events.
|
||||
// Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
|
||||
$next.click(function () {
|
||||
publicMethod.next();
|
||||
});
|
||||
$prev.click(function () {
|
||||
publicMethod.prev();
|
||||
});
|
||||
$close.click(function () {
|
||||
publicMethod.close();
|
||||
});
|
||||
|
||||
$groupControls = $next.add($prev).add($current).add($slideshow);
|
||||
|
||||
// Adding the 'hover' class allowed the browser to load the hover-state
|
||||
// background graphics in case the images were not part of a sprite. The class can now can be removed.
|
||||
$content.children().removeClass('hover');
|
||||
|
||||
$overlay.click(function () {
|
||||
if (settings.overlayClose) {
|
||||
publicMethod.close();
|
||||
}
|
||||
});
|
||||
|
||||
// Set Navigation Key Bindings
|
||||
$(document).bind('keydown.' + prefix, function (e) {
|
||||
var key = e.keyCode;
|
||||
if (open && settings.escKey && key === 27) {
|
||||
e.preventDefault();
|
||||
publicMethod.close();
|
||||
}
|
||||
if (open && settings.arrowKey && $related[1]) {
|
||||
if (key === 37) {
|
||||
e.preventDefault();
|
||||
$prev.click();
|
||||
} else if (key === 39) {
|
||||
e.preventDefault();
|
||||
$next.click();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
publicMethod.remove = function () {
|
||||
$box.add($overlay).remove();
|
||||
$('.' + boxElement).removeData(colorbox).removeClass(boxElement);
|
||||
};
|
||||
|
||||
publicMethod.position = function (speed, loadedCallback) {
|
||||
var top = 0, left = 0;
|
||||
|
||||
$window.unbind('resize.' + prefix);
|
||||
|
||||
// remove the modal so that it doesn't influence the document width/height
|
||||
$box.hide();
|
||||
|
||||
if (settings.fixed && !isIE6) {
|
||||
$box.css({position: 'fixed'});
|
||||
} else {
|
||||
top = $window.scrollTop();
|
||||
left = $window.scrollLeft();
|
||||
$box.css({position: 'absolute'});
|
||||
}
|
||||
|
||||
// keeps the top and left positions within the browser's viewport.
|
||||
if (settings.right !== false) {
|
||||
left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.right, 'x'), 0);
|
||||
} else if (settings.left !== false) {
|
||||
left += setSize(settings.left, 'x');
|
||||
} else {
|
||||
left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
|
||||
}
|
||||
|
||||
if (settings.bottom !== false) {
|
||||
top += Math.max(document.documentElement.clientHeight - settings.h - loadedHeight - interfaceHeight - setSize(settings.bottom, 'y'), 0);
|
||||
} else if (settings.top !== false) {
|
||||
top += setSize(settings.top, 'y');
|
||||
} else {
|
||||
top += Math.round(Math.max(document.documentElement.clientHeight - settings.h - loadedHeight - interfaceHeight, 0) / 2);
|
||||
}
|
||||
|
||||
$box.show();
|
||||
|
||||
// setting the speed to 0 to reduce the delay between same-sized content.
|
||||
speed = ($box.width() === settings.w + loadedWidth && $box.height() === settings.h + loadedHeight) ? 0 : speed || 0;
|
||||
|
||||
// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
|
||||
// but it has to be shrank down around the size of div#colorbox when it's done. If not,
|
||||
// it can invoke an obscure IE bug when using iframes.
|
||||
$wrap[0].style.width = $wrap[0].style.height = "9999px";
|
||||
|
||||
function modalDimensions(that) {
|
||||
// loading overlay height has to be explicitly set for IE6.
|
||||
$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = that.style.width;
|
||||
$loadingOverlay[0].style.height = $loadingOverlay[1].style.height = $content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = that.style.height;
|
||||
}
|
||||
|
||||
$box.dequeue().animate({width: settings.w + loadedWidth, height: settings.h + loadedHeight, top: top, left: left}, {
|
||||
duration: speed,
|
||||
complete: function () {
|
||||
modalDimensions(this);
|
||||
|
||||
active = false;
|
||||
|
||||
// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
|
||||
$wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
|
||||
$wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
|
||||
|
||||
if (loadedCallback) {
|
||||
loadedCallback();
|
||||
}
|
||||
|
||||
setTimeout(function(){ // small delay before binding onresize due to an IE8 bug.
|
||||
$window.bind('resize.' + prefix, publicMethod.position);
|
||||
}, 1);
|
||||
},
|
||||
step: function () {
|
||||
modalDimensions(this);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
publicMethod.resize = function (options) {
|
||||
if (open) {
|
||||
options = options || {};
|
||||
|
||||
if (options.width) {
|
||||
settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
|
||||
}
|
||||
if (options.innerWidth) {
|
||||
settings.w = setSize(options.innerWidth, 'x');
|
||||
}
|
||||
$loaded.css({width: settings.w});
|
||||
|
||||
if (options.height) {
|
||||
settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
|
||||
}
|
||||
if (options.innerHeight) {
|
||||
settings.h = setSize(options.innerHeight, 'y');
|
||||
}
|
||||
if (!options.innerHeight && !options.height) {
|
||||
var $child = $loaded.wrapInner("<div style='overflow:auto'></div>").children(); // temporary wrapper to get an accurate estimate of just how high the total content should be.
|
||||
settings.h = $child.height();
|
||||
$child.replaceWith($child.children()); // ditch the temporary wrapper div used in height calculation
|
||||
}
|
||||
$loaded.css({height: settings.h});
|
||||
|
||||
publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
|
||||
}
|
||||
};
|
||||
|
||||
publicMethod.prep = function (object) {
|
||||
if (!open) {
|
||||
return;
|
||||
}
|
||||
|
||||
var callback, speed = settings.transition === "none" ? 0 : settings.speed;
|
||||
|
||||
$loaded.remove();
|
||||
$loaded = $div('LoadedContent').append(object);
|
||||
|
||||
function getWidth() {
|
||||
settings.w = settings.w || $loaded.width();
|
||||
settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
|
||||
return settings.w;
|
||||
}
|
||||
function getHeight() {
|
||||
settings.h = settings.h || $loaded.height();
|
||||
settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
|
||||
return settings.h;
|
||||
}
|
||||
|
||||
$loaded.hide()
|
||||
.appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
|
||||
.css({width: getWidth(), overflow: settings.scrolling ? 'auto' : 'hidden'})
|
||||
.css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
|
||||
.prependTo($content);
|
||||
|
||||
$loadingBay.hide();
|
||||
|
||||
// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
|
||||
//$(photo).css({'float': 'none', marginLeft: 'auto', marginRight: 'auto'});
|
||||
|
||||
$(photo).css({'float': 'none'});
|
||||
|
||||
// Hides SELECT elements in IE6 because they would otherwise sit on top of the overlay.
|
||||
if (isIE6) {
|
||||
$('select').not($box.find('select')).filter(function () {
|
||||
return this.style.visibility !== 'hidden';
|
||||
}).css({'visibility': 'hidden'}).one(event_cleanup, function () {
|
||||
this.style.visibility = 'inherit';
|
||||
});
|
||||
}
|
||||
|
||||
callback = function () {
|
||||
var prev, prevSrc, next, nextSrc, total = $related.length, iframe, complete;
|
||||
|
||||
if (!open) {
|
||||
return;
|
||||
}
|
||||
|
||||
function removeFilter() {
|
||||
if (isIE) {
|
||||
$box[0].style.removeAttribute('filter');
|
||||
}
|
||||
}
|
||||
|
||||
complete = function () {
|
||||
clearTimeout(loadingTimer);
|
||||
$loadingOverlay.hide();
|
||||
trigger(event_complete, settings.onComplete);
|
||||
};
|
||||
|
||||
if (isIE) {
|
||||
//This fadeIn helps the bicubic resampling to kick-in.
|
||||
if (photo) {
|
||||
$loaded.fadeIn(100);
|
||||
}
|
||||
}
|
||||
|
||||
$title.html(settings.title).add($loaded).show();
|
||||
|
||||
if (total > 1) { // handle grouping
|
||||
if (typeof settings.current === "string") {
|
||||
$current.html(settings.current.replace('{current}', index + 1).replace('{total}', total)).show();
|
||||
}
|
||||
|
||||
$next[(settings.loop || index < total - 1) ? "show" : "hide"]().html(settings.next);
|
||||
$prev[(settings.loop || index) ? "show" : "hide"]().html(settings.previous);
|
||||
|
||||
prev = index ? $related[index - 1] : $related[total - 1];
|
||||
next = index < total - 1 ? $related[index + 1] : $related[0];
|
||||
|
||||
if (settings.slideshow) {
|
||||
$slideshow.show();
|
||||
}
|
||||
|
||||
// Preloads images within a rel group
|
||||
if (settings.preloading) {
|
||||
nextSrc = $.data(next, colorbox).href || next.href;
|
||||
prevSrc = $.data(prev, colorbox).href || prev.href;
|
||||
|
||||
nextSrc = $.isFunction(nextSrc) ? nextSrc.call(next) : nextSrc;
|
||||
prevSrc = $.isFunction(prevSrc) ? prevSrc.call(prev) : prevSrc;
|
||||
|
||||
if (isImage(nextSrc)) {
|
||||
$('<img/>')[0].src = nextSrc;
|
||||
}
|
||||
|
||||
if (isImage(prevSrc)) {
|
||||
$('<img/>')[0].src = prevSrc;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$groupControls.hide();
|
||||
}
|
||||
|
||||
if (settings.iframe) {
|
||||
iframe = $('<iframe/>').addClass(prefix + 'Iframe')[0];
|
||||
|
||||
if (settings.fastIframe) {
|
||||
complete();
|
||||
} else {
|
||||
$(iframe).one('load', complete);
|
||||
}
|
||||
iframe.name = prefix + (+new Date());
|
||||
iframe.src = settings.href;
|
||||
|
||||
if (!settings.scrolling) {
|
||||
iframe.scrolling = "no";
|
||||
}
|
||||
|
||||
if (isIE) {
|
||||
iframe.frameBorder = 0;
|
||||
iframe.allowTransparency = "true";
|
||||
}
|
||||
|
||||
$(iframe).appendTo($loaded).one(event_purge, function () {
|
||||
iframe.src = "//about:blank";
|
||||
});
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
||||
if (settings.transition === 'fade') {
|
||||
$box.fadeTo(speed, 1, removeFilter);
|
||||
} else {
|
||||
removeFilter();
|
||||
}
|
||||
};
|
||||
|
||||
if (settings.transition === 'fade') {
|
||||
$box.fadeTo(speed, 0, function () {
|
||||
publicMethod.position(0, callback);
|
||||
});
|
||||
} else {
|
||||
publicMethod.position(speed, callback);
|
||||
}
|
||||
};
|
||||
|
||||
publicMethod.load = function (launched) {
|
||||
var href, setResize, prep = publicMethod.prep;
|
||||
|
||||
active = true;
|
||||
|
||||
photo = false;
|
||||
|
||||
element = $related[index];
|
||||
|
||||
if (!launched) {
|
||||
makeSettings();
|
||||
}
|
||||
|
||||
trigger(event_purge);
|
||||
|
||||
trigger(event_load, settings.onLoad);
|
||||
|
||||
settings.h = settings.height ?
|
||||
setSize(settings.height, 'y') - loadedHeight - interfaceHeight :
|
||||
settings.innerHeight && setSize(settings.innerHeight, 'y');
|
||||
|
||||
settings.w = settings.width ?
|
||||
setSize(settings.width, 'x') - loadedWidth - interfaceWidth :
|
||||
settings.innerWidth && setSize(settings.innerWidth, 'x');
|
||||
|
||||
// Sets the minimum dimensions for use in image scaling
|
||||
settings.mw = settings.w;
|
||||
settings.mh = settings.h;
|
||||
|
||||
// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
|
||||
// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
|
||||
if (settings.maxWidth) {
|
||||
settings.mw = setSize(settings.maxWidth, 'x') - loadedWidth - interfaceWidth;
|
||||
settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
|
||||
}
|
||||
if (settings.maxHeight) {
|
||||
settings.mh = setSize(settings.maxHeight, 'y') - loadedHeight - interfaceHeight;
|
||||
settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
|
||||
}
|
||||
|
||||
href = settings.href;
|
||||
|
||||
loadingTimer = setTimeout(function () {
|
||||
$loadingOverlay.show();
|
||||
}, 100);
|
||||
|
||||
if (settings.inline) {
|
||||
// Inserts an empty placeholder where inline content is being pulled from.
|
||||
// An event is bound to put inline content back when ColorBox closes or loads new content.
|
||||
$div().hide().insertBefore($(href)[0]).one(event_purge, function () {
|
||||
$(this).replaceWith($loaded.children());
|
||||
});
|
||||
prep($(href));
|
||||
} else if (settings.iframe) {
|
||||
// IFrame element won't be added to the DOM until it is ready to be displayed,
|
||||
// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
|
||||
prep(" ");
|
||||
} else if (settings.html) {
|
||||
prep(settings.html);
|
||||
} else if (isImage(href)) {
|
||||
$(photo = new Image())
|
||||
.addClass(prefix + 'Photo')
|
||||
.error(function () {
|
||||
settings.title = false;
|
||||
prep($div('Error').text('This image could not be loaded'));
|
||||
})
|
||||
.load(function () {
|
||||
var percent;
|
||||
photo.onload = null; //stops animated gifs from firing the onload repeatedly.
|
||||
|
||||
if (settings.scalePhotos) {
|
||||
setResize = function () {
|
||||
photo.height -= photo.height * percent;
|
||||
photo.width -= photo.width * percent;
|
||||
};
|
||||
if (settings.mw && photo.width > settings.mw) {
|
||||
percent = (photo.width - settings.mw) / photo.width;
|
||||
setResize();
|
||||
}
|
||||
if (settings.mh && photo.height > settings.mh) {
|
||||
percent = (photo.height - settings.mh) / photo.height;
|
||||
setResize();
|
||||
}
|
||||
}
|
||||
|
||||
if (settings.h) {
|
||||
photo.style.marginTop = Math.max(settings.h - photo.height, 0) / 2 + 'px';
|
||||
}
|
||||
|
||||
if ($related[1] && (index < $related.length - 1 || settings.loop)) {
|
||||
photo.style.cursor = 'pointer';
|
||||
photo.onclick = function () {
|
||||
publicMethod.next();
|
||||
};
|
||||
}
|
||||
|
||||
if (isIE) {
|
||||
photo.style.msInterpolationMode = 'bicubic';
|
||||
}
|
||||
|
||||
setTimeout(function () { // A pause because Chrome will sometimes report a 0 by 0 size otherwise.
|
||||
prep(photo);
|
||||
}, 1);
|
||||
});
|
||||
|
||||
setTimeout(function () { // A pause because Opera 10.6+ will sometimes not run the onload function otherwise.
|
||||
photo.src = href;
|
||||
}, 1);
|
||||
} else if (href) {
|
||||
$loadingBay.load(href, settings.data, function (data, status, xhr) {
|
||||
prep(status === 'error' ? $div('Error').text('Request unsuccessful: ' + xhr.statusText) : $(this).contents());
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Navigates to the next page/image in a set.
|
||||
publicMethod.next = function () {
|
||||
if (!active && $related[1] && (index < $related.length - 1 || settings.loop)) {
|
||||
index = index < $related.length - 1 ? index + 1 : 0;
|
||||
publicMethod.load();
|
||||
}
|
||||
};
|
||||
|
||||
publicMethod.prev = function () {
|
||||
if (!active && $related[1] && (index || settings.loop)) {
|
||||
index = index ? index - 1 : $related.length - 1;
|
||||
publicMethod.load();
|
||||
}
|
||||
};
|
||||
|
||||
// Note: to use this within an iframe use the following format: parent.$.fn.colorbox.close();
|
||||
publicMethod.close = function () {
|
||||
if (open && !closing) {
|
||||
|
||||
closing = true;
|
||||
|
||||
open = false;
|
||||
|
||||
trigger(event_cleanup, settings.onCleanup);
|
||||
|
||||
$window.unbind('.' + prefix + ' .' + event_ie6);
|
||||
|
||||
$overlay.fadeTo(200, 0);
|
||||
|
||||
$box.stop().fadeTo(300, 0, function () {
|
||||
|
||||
$box.add($overlay).css({'opacity': 1, cursor: 'auto'}).hide();
|
||||
|
||||
trigger(event_purge);
|
||||
|
||||
$loaded.remove();
|
||||
|
||||
setTimeout(function () {
|
||||
closing = false;
|
||||
trigger(event_closed, settings.onClosed);
|
||||
}, 1);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// A method for fetching the current element ColorBox is referencing.
|
||||
// returns a jQuery object.
|
||||
publicMethod.element = function () {
|
||||
return $(element);
|
||||
};
|
||||
|
||||
publicMethod.settings = defaults;
|
||||
|
||||
// Bind the live event before DOM-ready for maximum performance in IE6 & 7.
|
||||
handler = function (e) {
|
||||
// checks to see if it was a non-left mouse-click and for clicks modified with ctrl, shift, or alt.
|
||||
if (!((e.button !== 0 && typeof e.button !== 'undefined') || e.ctrlKey || e.shiftKey || e.altKey)) {
|
||||
e.preventDefault();
|
||||
launch(this);
|
||||
}
|
||||
};
|
||||
|
||||
if ($.fn.delegate) {
|
||||
$(document).delegate('.' + boxElement, 'click', handler);
|
||||
} else {
|
||||
$('.' + boxElement).live('click', handler);
|
||||
}
|
||||
|
||||
// Initializes ColorBox when the DOM has loaded
|
||||
$(publicMethod.init);
|
||||
|
||||
}(jQuery, document, this));
|
||||
15
src/wp-content/plugins/post-types-order/css/cpt.css
Normal file
@ -0,0 +1,15 @@
|
||||
#sortable { list-style-type: none; margin: 10px 0 0; padding: 0; width: 100%; }
|
||||
#sortable ul { margin-left:20px; list-style: none; }
|
||||
#sortable li { padding: 2px 0px; margin: 4px 0px; border: 1px solid #DDDDDD; cursor: move; -moz-border-radius:6px}
|
||||
#sortable li span { display: block; background: #f7f7f7; padding: 5px; color:#808080; font-size: font-size:14px; font-weight:bold;}
|
||||
#sortable li.placeholder{border: dashed 2px #ccc;background-color:#FFF;height:20px;}
|
||||
|
||||
#icon-settings {background-image:url("../images/admin-icon-settings.gif");background-repeat:no-repeat;}
|
||||
h2.subtitle {font-size: 15px; font-style: italic; font-weight: bold}
|
||||
.wrap .example { color: #666666; font-size: 11px; font-weight: bold}
|
||||
|
||||
#cpt_info_box {padding: 0 10px; border: 1px dashed #21759B; background-color: #F1F1F1}
|
||||
#cpt_info_box p {font-size: 11px}
|
||||
#cpt_info_box #donate_form {float: right; padding: 10px 0 10px 10px}
|
||||
|
||||
.menu_pto {margin-bottom: -2px; display: inline; padding-right: 2px}
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
BIN
src/wp-content/plugins/post-types-order/images/menu-icon.gif
Normal file
|
After Width: | Height: | Size: 1016 B |
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
function userdata_get_user_level()
|
||||
{
|
||||
global $userdata;
|
||||
|
||||
$user_level = '';
|
||||
for ($i=10; $i >= 0;$i--)
|
||||
{
|
||||
if (current_user_can('level_' . $i) === TRUE)
|
||||
{
|
||||
$user_level = $i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return ($user_level);
|
||||
}
|
||||
|
||||
|
||||
function cpt_info_box()
|
||||
{
|
||||
?>
|
||||
<div id="cpt_info_box">
|
||||
<div id="donate_form">
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
||||
<input type="hidden" name="cmd" value="_s-xclick">
|
||||
<input type="hidden" name="hosted_button_id" value="CU22TFDKJMLAE">
|
||||
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
||||
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p>Did you found useful this plug-in? Please support our work with a donation or write an article about this plugin in your blog with a link to our site <strong>http://www.nsp-code.com/</strong>.</p>
|
||||
<h4>Did you know there is available a more advanced version of this plug-in? <a target="_blank" href="http://www.nsp-code.com/wordpress-plugins/post-types-order">Read more</a></h4>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
126
src/wp-content/plugins/post-types-order/include/options.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
|
||||
function cpt_plugin_options()
|
||||
{
|
||||
$options = get_option('cpto_options');
|
||||
|
||||
if (isset($_POST['form_submit']))
|
||||
{
|
||||
|
||||
$options['level'] = $_POST['level'];
|
||||
|
||||
$options['autosort'] = isset($_POST['autosort']) ? $_POST['autosort'] : '';
|
||||
$options['adminsort'] = isset($_POST['adminsort']) ? $_POST['adminsort'] : '';
|
||||
|
||||
echo '<div class="updated fade"><p>' . __('Settings Saved', 'cpt') . '</p></div>';
|
||||
|
||||
update_option('cpto_options', $options);
|
||||
update_option('CPT_configured', 'TRUE');
|
||||
|
||||
}
|
||||
|
||||
$queue_data = get_option('ce_queue');
|
||||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<div id="icon-settings" class="icon32"></div>
|
||||
<h2>General Settings</h2>
|
||||
|
||||
<?php cpt_info_box(); ?>
|
||||
|
||||
<form id="form_data" name="form" method="post">
|
||||
<br />
|
||||
<h2 class="subtitle">General</h2>
|
||||
<table class="form-table">
|
||||
<tbody>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row" style="text-align: right;"><label>Minimum Level to use this plugin</label></th>
|
||||
<td>
|
||||
<select id="role" name="level">
|
||||
<option value="0" <?php if ($options['level'] == "0") echo 'selected="selected"'?>><?php _e('Subscriber', 'cpt') ?></option>
|
||||
<option value="1" <?php if ($options['level'] == "1") echo 'selected="selected"'?>><?php _e('Contributor', 'cpt') ?></option>
|
||||
<option value="2" <?php if ($options['level'] == "2") echo 'selected="selected"'?>><?php _e('Author', 'cpt') ?></option>
|
||||
<option value="5" <?php if ($options['level'] == "5") echo 'selected="selected"'?>><?php _e('Editor', 'cpt') ?></option>
|
||||
<option value="8" <?php if ($options['level'] == "8") echo 'selected="selected"'?>><?php _e('Administrator', 'cpt') ?></option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row" style="text-align: right;"><label>Auto Sort</label></th>
|
||||
<td>
|
||||
<label for="users_can_register">
|
||||
<input type="checkbox" <?php if ($options['autosort'] == "1") {echo ' checked="checked"';} ?> value="1" name="autosort">
|
||||
<?php _e("If checked, the plug-in will automatically update the wp-queries to use the new order (<b>No code update is necessarily</b>).<br /> If you need more order customizations you will need to uncheck this and include 'menu_order' into your theme queries", 'cpt') ?>.</label>
|
||||
|
||||
<p><a href="javascript:;" onclick="jQuery('#example1').slideToggle();;return false;">Show Examples</a></p>
|
||||
<div id="example1" style="display: none">
|
||||
|
||||
<p class="example"><br /><?php _e('The following PHP code will still return the post in the set-up Order', 'cpt') ?>:</p>
|
||||
<pre class="example">
|
||||
$args = array(
|
||||
'post_type' => 'feature'
|
||||
);
|
||||
|
||||
$my_query = new WP_Query($args);
|
||||
while ($my_query->have_posts())
|
||||
{
|
||||
$my_query->the_post();
|
||||
(..your code..)
|
||||
}
|
||||
</pre>
|
||||
<p class="example"><br /><?php _e('Or', 'cpt') ?>:</p>
|
||||
<pre class="example">
|
||||
$posts = get_posts($args);
|
||||
foreach ($posts as $post)
|
||||
{
|
||||
(..your code..)
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p class="example"><br /><?php _e('If the Auto Sort is uncheck you will need to use the "orderby" and "order" parameters', 'cpt') ?>:</p>
|
||||
<pre class="example">
|
||||
$args = array(
|
||||
'post_type' => 'feature',
|
||||
'orderby' => 'menu_order',
|
||||
'order' => 'ASC'
|
||||
);
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<th scope="row" style="text-align: right;"><label>Admin Sort</label></th>
|
||||
<td>
|
||||
<label for="users_can_register">
|
||||
<input type="checkbox" <?php if ($options['adminsort'] == "1") {echo ' checked="checked"';} ?> value="1" name="adminsort">
|
||||
<?php _e("To affect the admin interface, to see the post types per your new sort, this need to be checked", 'cpt') ?>.</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p class="submit">
|
||||
<input type="submit" name="Submit" class="button-primary" value="<?php _e('Save Settings', 'cpt') ?>">
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="form_submit" value="true" />
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<br />
|
||||
|
||||
<?php
|
||||
echo '</div>';
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
95
src/wp-content/plugins/post-types-order/lang/cpt-pt_BR.po
Normal file
@ -0,0 +1,95 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Post Types Order\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2010-11-29 09:26-0300\n"
|
||||
"PO-Revision-Date: 2010-11-29 19:14-0300\n"
|
||||
"Last-Translator: Gabriel Reguly <gabriel@ppgr.com.br>\n"
|
||||
"Language-Team: http://ppgr.com.br/\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Poedit-KeywordsList: __;_e\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"X-Poedit-Language: Portuguese\n"
|
||||
"X-Poedit-Country: BRAZIL\n"
|
||||
"X-Poedit-SearchPath-0: post-types-order\n"
|
||||
|
||||
#: post-types-order/post-types-order.php:41
|
||||
msgid "Post Types Order"
|
||||
msgstr "Ordenar Posts"
|
||||
|
||||
#: post-types-order/post-types-order.php:176
|
||||
msgid "Invalid post type"
|
||||
msgstr "Type de post inválido"
|
||||
|
||||
#: post-types-order/post-types-order.php:216
|
||||
#: post-types-order/post-types-order.php:218
|
||||
msgid "Re-Order"
|
||||
msgstr "Reordenar"
|
||||
|
||||
#: post-types-order/post-types-order.php:229
|
||||
#, php-format
|
||||
msgid "%s - Re-order "
|
||||
msgstr "Reordenar %s"
|
||||
|
||||
#: post-types-order/post-types-order.php:233
|
||||
msgid "This plugin can't work without javascript, because it use drag and drop and AJAX."
|
||||
msgstr "Este plugin precisa de JavaScript para funcionar."
|
||||
|
||||
#: post-types-order/post-types-order.php:242
|
||||
msgid "Update"
|
||||
msgstr "Atualizar"
|
||||
|
||||
#: post-types-order/post-types-order.php:257
|
||||
msgid "Item order updated"
|
||||
msgstr "Ordem alterada"
|
||||
|
||||
#: post-types-order/post-types-order.php:263
|
||||
msgid "Did you found this plug-in useful? Please support our work with a donation."
|
||||
msgstr "Você considera útil este plugin? Por favor, faça uma doação para o autor."
|
||||
|
||||
#: post-types-order/post-types-order.php:283
|
||||
msgid "Pages"
|
||||
msgstr "Páginas"
|
||||
|
||||
#: post-types-order/include/options.php:6
|
||||
msgid "Settings Saved"
|
||||
msgstr "Configuração salva"
|
||||
|
||||
#: post-types-order/include/options.php:13
|
||||
msgid "General Setings"
|
||||
msgstr "Configuração geral"
|
||||
|
||||
#: post-types-order/include/options.php:16
|
||||
msgid "General"
|
||||
msgstr "Geral"
|
||||
|
||||
#: post-types-order/include/options.php:21
|
||||
msgid "Minimum Level to use this plugin"
|
||||
msgstr "Nível minimo para utilizar este plugin"
|
||||
|
||||
#: post-types-order/include/options.php:25
|
||||
msgid "Subscriber"
|
||||
msgstr "Assinante"
|
||||
|
||||
#: post-types-order/include/options.php:26
|
||||
msgid "Contributor"
|
||||
msgstr "Contribuidor"
|
||||
|
||||
#: post-types-order/include/options.php:27
|
||||
msgid "Author"
|
||||
msgstr "Author"
|
||||
|
||||
#: post-types-order/include/options.php:28
|
||||
msgid "Editor"
|
||||
msgstr "Editor"
|
||||
|
||||
#: post-types-order/include/options.php:29
|
||||
msgid "Administrator"
|
||||
msgstr "Administrador"
|
||||
|
||||
#: post-types-order/include/options.php:36
|
||||
msgid "Save Settings"
|
||||
msgstr "Salvar configuração"
|
||||
|
||||
534
src/wp-content/plugins/post-types-order/post-types-order.php
Normal file
@ -0,0 +1,534 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Post Types Order
|
||||
Plugin URI: http://www.nsp-code.com
|
||||
Description: Order Post Types Objects using a Drag and Drop Sortable javascript capability
|
||||
Author: NSP CODE
|
||||
Author URI: http://www.nsp-code.com
|
||||
Version: 1.4.6
|
||||
*/
|
||||
|
||||
define('CPTPATH', ABSPATH.'wp-content/plugins/post-types-order');
|
||||
define('CPTURL', get_option('siteurl').'/wp-content/plugins/post-types-order');
|
||||
|
||||
register_deactivation_hook(__FILE__, 'CPTO_deactivated');
|
||||
register_activation_hook(__FILE__, 'CPTO_activated');
|
||||
|
||||
function CPTO_activated()
|
||||
{
|
||||
//make sure the vars are set as default
|
||||
$options = get_option('cpto_options');
|
||||
if (!isset($options['autosort']))
|
||||
$options['autosort'] = '1';
|
||||
|
||||
if (!isset($options['adminsort']))
|
||||
$options['adminsort'] = '1';
|
||||
|
||||
if (!isset($options['level']))
|
||||
$options['level'] = 0;
|
||||
|
||||
update_option('cpto_options', $options);
|
||||
}
|
||||
|
||||
function CPTO_deactivated()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
include_once(CPTPATH . '/include/functions.php');
|
||||
|
||||
add_filter('pre_get_posts', 'CPTO_pre_get_posts');
|
||||
function CPTO_pre_get_posts($query)
|
||||
{
|
||||
|
||||
$options = get_option('cpto_options');
|
||||
if (is_admin())
|
||||
{
|
||||
//no need if it's admin interface
|
||||
return false;
|
||||
}
|
||||
//if auto sort
|
||||
if ($options['autosort'] == "1")
|
||||
{
|
||||
//remove the supresed filters;
|
||||
if (isset($query->query['suppress_filters']))
|
||||
$query->query['suppress_filters'] = FALSE;
|
||||
|
||||
if (isset($query->query_vars['suppress_filters']))
|
||||
$query->query_vars['suppress_filters'] = FALSE;
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
add_filter('posts_orderby', 'CPTOrderPosts');
|
||||
function CPTOrderPosts($orderBy)
|
||||
{
|
||||
global $wpdb;
|
||||
|
||||
$options = get_option('cpto_options');
|
||||
|
||||
if (is_admin())
|
||||
{
|
||||
if ($options['adminsort'] == "1")
|
||||
$orderBy = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($options['autosort'] == "1")
|
||||
$orderBy = "{$wpdb->posts}.menu_order, {$wpdb->posts}.post_date DESC";
|
||||
}
|
||||
|
||||
return($orderBy);
|
||||
}
|
||||
|
||||
$is_configured = get_option('CPT_configured');
|
||||
if ($is_configured == '')
|
||||
add_action( 'admin_notices', 'CPTO_admin_notices');
|
||||
|
||||
function CPTO_admin_notices()
|
||||
{
|
||||
if (isset($_POST['form_submit']))
|
||||
return;
|
||||
?>
|
||||
<div class="error fade">
|
||||
<p><strong>Post Types Order must be configured. Please go to <a href="<?php echo get_admin_url() ?>options-general.php?page=cpto-options">Settings Page</a> make the configuration and save</strong></p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
add_action( 'plugins_loaded', 'cpto_load_textdomain', 2 );
|
||||
function cpto_load_textdomain()
|
||||
{
|
||||
$locale = get_locale();
|
||||
$mofile = CPTPATH . '/lang/cpt-' . $locale . '.mo';
|
||||
if ( file_exists( $mofile ) ) {
|
||||
load_textdomain( 'cppt', $mofile );
|
||||
}
|
||||
}
|
||||
|
||||
add_action('admin_menu', 'cpto_plugin_menu');
|
||||
function cpto_plugin_menu()
|
||||
{
|
||||
include (CPTPATH . '/include/options.php');
|
||||
add_options_page('Post Types Order', '<img class="menu_pto" src="'. CPTURL .'/images/menu-icon.gif" alt="" />Post Types Order', 'manage_options', 'cpto-options', 'cpt_plugin_options');
|
||||
}
|
||||
|
||||
|
||||
add_action('wp_loaded', 'initCPTO' );
|
||||
function initCPTO()
|
||||
{
|
||||
global $custom_post_type_order, $userdata;
|
||||
|
||||
$options = get_option('cpto_options');
|
||||
|
||||
if (is_admin())
|
||||
{
|
||||
if (is_numeric($options['level']))
|
||||
{
|
||||
if (userdata_get_user_level() >= $options['level'])
|
||||
$custom_post_type_order = new CPTO();
|
||||
}
|
||||
else
|
||||
{
|
||||
$custom_post_type_order = new CPTO();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
add_filter('get_previous_post_where', 'cpto_get_previous_post_where');
|
||||
add_filter('get_previous_post_sort', 'cpto_get_previous_post_sort');
|
||||
add_filter('get_next_post_where', 'cpto_get_next_post_where');
|
||||
add_filter('get_next_post_sort', 'cpto_get_next_post_sort');
|
||||
function cpto_get_previous_post_where($where)
|
||||
{
|
||||
global $post, $wpdb;
|
||||
|
||||
if ( empty( $post ) )
|
||||
return $where;
|
||||
|
||||
$current_post_date = $post->post_date;
|
||||
|
||||
$join = '';
|
||||
$posts_in_ex_cats_sql = '';
|
||||
if ( $in_same_cat || !empty($excluded_categories) )
|
||||
{
|
||||
$join = " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
|
||||
|
||||
if ( $in_same_cat ) {
|
||||
$cat_array = wp_get_object_terms($post->ID, 'category', array('fields' => 'ids'));
|
||||
$join .= " AND tt.taxonomy = 'category' AND tt.term_id IN (" . implode(',', $cat_array) . ")";
|
||||
}
|
||||
|
||||
$posts_in_ex_cats_sql = "AND tt.taxonomy = 'category'";
|
||||
if ( !empty($excluded_categories) ) {
|
||||
$excluded_categories = array_map('intval', explode(' and ', $excluded_categories));
|
||||
if ( !empty($cat_array) ) {
|
||||
$excluded_categories = array_diff($excluded_categories, $cat_array);
|
||||
$posts_in_ex_cats_sql = '';
|
||||
}
|
||||
|
||||
if ( !empty($excluded_categories) ) {
|
||||
$posts_in_ex_cats_sql = " AND tt.taxonomy = 'category' AND tt.term_id NOT IN (" . implode($excluded_categories, ',') . ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
$current_menu_order = $post->menu_order;
|
||||
|
||||
//check if there are more posts with lower menu_order
|
||||
$query = "SELECT p.* FROM $wpdb->posts AS p
|
||||
WHERE p.menu_order < '".$current_menu_order."' AND p.post_type = '". $post->post_type ."' AND p.post_status = 'publish' $posts_in_ex_cats_sql";
|
||||
$results = $wpdb->get_results($query);
|
||||
|
||||
if (count($results) > 0)
|
||||
{
|
||||
$where = $wpdb->prepare("WHERE p.menu_order < '".$current_menu_order."' AND p.post_type = '". $post->post_type ."' AND p.post_status = 'publish' $posts_in_ex_cats_sql");
|
||||
}
|
||||
else
|
||||
{
|
||||
$where = $wpdb->prepare("WHERE p.post_date < '".$current_post_date."' AND p.post_type = '". $post->post_type ."' AND p.post_status = 'publish' AND p.ID != '". $post->ID ."' $posts_in_ex_cats_sql");
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
function cpto_get_previous_post_sort($sort)
|
||||
{
|
||||
global $post, $wpdb;
|
||||
|
||||
$current_menu_order = $post->menu_order;
|
||||
|
||||
$query = "SELECT p.* FROM $wpdb->posts AS p
|
||||
WHERE p.menu_order < '".$current_menu_order."' AND p.post_type = '". $post->post_type ."' AND p.post_status = 'publish' $posts_in_ex_cats_sql";
|
||||
$results = $wpdb->get_results($query);
|
||||
|
||||
if (count($results) > 0)
|
||||
{
|
||||
$sort = 'ORDER BY p.menu_order DESC, p.post_date ASC LIMIT 1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sort = 'ORDER BY p.post_date DESC LIMIT 1';
|
||||
}
|
||||
|
||||
return $sort;
|
||||
}
|
||||
|
||||
function cpto_get_next_post_where($where)
|
||||
{
|
||||
global $post, $wpdb;
|
||||
|
||||
if ( empty( $post ) )
|
||||
return null;
|
||||
|
||||
$current_post_date = $post->post_date;
|
||||
|
||||
$join = '';
|
||||
$posts_in_ex_cats_sql = '';
|
||||
if ( $in_same_cat || !empty($excluded_categories) )
|
||||
{
|
||||
$join = " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id";
|
||||
|
||||
if ( $in_same_cat ) {
|
||||
$cat_array = wp_get_object_terms($post->ID, 'category', array('fields' => 'ids'));
|
||||
$join .= " AND tt.taxonomy = 'category' AND tt.term_id IN (" . implode(',', $cat_array) . ")";
|
||||
}
|
||||
|
||||
$posts_in_ex_cats_sql = "AND tt.taxonomy = 'category'";
|
||||
if ( !empty($excluded_categories) ) {
|
||||
$excluded_categories = array_map('intval', explode(' and ', $excluded_categories));
|
||||
if ( !empty($cat_array) ) {
|
||||
$excluded_categories = array_diff($excluded_categories, $cat_array);
|
||||
$posts_in_ex_cats_sql = '';
|
||||
}
|
||||
|
||||
if ( !empty($excluded_categories) ) {
|
||||
$posts_in_ex_cats_sql = " AND tt.taxonomy = 'category' AND tt.term_id NOT IN (" . implode($excluded_categories, ',') . ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$current_menu_order = $post->menu_order;
|
||||
|
||||
//check if there are more posts with lower menu_order
|
||||
$query = "SELECT p.* FROM $wpdb->posts AS p
|
||||
WHERE p.menu_order > '".$current_menu_order."' AND p.post_type = '". $post->post_type ."' AND p.post_status = 'publish' $posts_in_ex_cats_sql";
|
||||
$results = $wpdb->get_results($query);
|
||||
|
||||
if (count($results) > 0)
|
||||
{
|
||||
$where = $wpdb->prepare("WHERE p.menu_order > '".$current_menu_order."' AND p.post_type = '". $post->post_type ."' AND p.post_status = 'publish' $posts_in_ex_cats_sql");
|
||||
}
|
||||
else
|
||||
{
|
||||
$where = $wpdb->prepare("WHERE p.post_date > '".$current_post_date."' AND p.post_type = '". $post->post_type ."' AND p.post_status = 'publish' AND p.ID != '". $post->ID ."' $posts_in_ex_cats_sql");
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
function cpto_get_next_post_sort($sort)
|
||||
{
|
||||
global $post, $wpdb;
|
||||
|
||||
$current_menu_order = $post->menu_order;
|
||||
|
||||
$query = "SELECT p.* FROM $wpdb->posts AS p
|
||||
WHERE p.menu_order > '".$current_menu_order."' AND p.post_type = '". $post->post_type ."' AND p.post_status = 'publish' $posts_in_ex_cats_sql";
|
||||
$results = $wpdb->get_results($query);
|
||||
if (count($results) > 0)
|
||||
{
|
||||
$sort = 'ORDER BY p.menu_order ASC, p.post_date DESC LIMIT 1';
|
||||
}
|
||||
else
|
||||
{
|
||||
$sort = 'ORDER BY p.post_date ASC LIMIT 1';
|
||||
}
|
||||
|
||||
return $sort;
|
||||
}
|
||||
|
||||
|
||||
class Post_Types_Order_Walker extends Walker
|
||||
{
|
||||
|
||||
var $db_fields = array ('parent' => 'post_parent', 'id' => 'ID');
|
||||
|
||||
|
||||
function start_lvl(&$output, $depth) {
|
||||
$indent = str_repeat("\t", $depth);
|
||||
$output .= "\n$indent<ul class='children'>\n";
|
||||
}
|
||||
|
||||
|
||||
function end_lvl(&$output, $depth) {
|
||||
$indent = str_repeat("\t", $depth);
|
||||
$output .= "$indent</ul>\n";
|
||||
}
|
||||
|
||||
|
||||
function start_el(&$output, $page, $depth, $args) {
|
||||
if ( $depth )
|
||||
$indent = str_repeat("\t", $depth);
|
||||
else
|
||||
$indent = '';
|
||||
|
||||
extract($args, EXTR_SKIP);
|
||||
|
||||
$output .= $indent . '<li id="item_'.$page->ID.'"><span>'.apply_filters( 'the_title', $page->post_title, $page->ID ).'</span>';
|
||||
}
|
||||
|
||||
|
||||
function end_el(&$output, $page, $depth) {
|
||||
$output .= "</li>\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
class CPTO
|
||||
{
|
||||
var $current_post_type = null;
|
||||
|
||||
function CPTO()
|
||||
{
|
||||
add_action( 'admin_init', array(&$this, 'registerFiles'), 11 );
|
||||
add_action( 'admin_init', array(&$this, 'checkPost'), 10 );
|
||||
add_action( 'admin_menu', array(&$this, 'addMenu') );
|
||||
|
||||
|
||||
|
||||
add_action( 'wp_ajax_update-custom-type-order', array(&$this, 'saveAjaxOrder') );
|
||||
}
|
||||
|
||||
function registerFiles()
|
||||
{
|
||||
if ( $this->current_post_type != null )
|
||||
{
|
||||
wp_enqueue_script('jQuery');
|
||||
wp_enqueue_script('jquery-ui-sortable');
|
||||
}
|
||||
|
||||
wp_register_style('CPTStyleSheets', CPTURL . '/css/cpt.css');
|
||||
wp_enqueue_style( 'CPTStyleSheets');
|
||||
}
|
||||
|
||||
function checkPost()
|
||||
{
|
||||
if ( isset($_GET['page']) && substr($_GET['page'], 0, 17) == 'order-post-types-' )
|
||||
{
|
||||
$this->current_post_type = get_post_type_object(str_replace( 'order-post-types-', '', $_GET['page'] ));
|
||||
if ( $this->current_post_type == null)
|
||||
{
|
||||
wp_die('Invalid post type');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function saveAjaxOrder()
|
||||
{
|
||||
global $wpdb;
|
||||
|
||||
parse_str($_POST['order'], $data);
|
||||
|
||||
if (is_array($data))
|
||||
foreach($data as $key => $values )
|
||||
{
|
||||
if ( $key == 'item' )
|
||||
{
|
||||
foreach( $values as $position => $id )
|
||||
{
|
||||
$wpdb->update( $wpdb->posts, array('menu_order' => $position, 'post_parent' => 0), array('ID' => $id) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach( $values as $position => $id )
|
||||
{
|
||||
$wpdb->update( $wpdb->posts, array('menu_order' => $position, 'post_parent' => str_replace('item_', '', $key)), array('ID' => $id) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function addMenu()
|
||||
{
|
||||
global $userdata;
|
||||
//put a menu for all custom_type
|
||||
$post_types = get_post_types();
|
||||
foreach( $post_types as $post_type_name )
|
||||
{
|
||||
if ($post_type_name == 'page')
|
||||
continue;
|
||||
|
||||
if ($post_type_name == 'post')
|
||||
add_submenu_page('edit.php', 'Re-Order', 'Re-Order', userdata_get_user_level(), 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
|
||||
else
|
||||
{
|
||||
if (!is_post_type_hierarchical($post_type_name))
|
||||
add_submenu_page('edit.php?post_type='.$post_type_name, 'Re-Order', 'Re-Order', userdata_get_user_level(), 'order-post-types-'.$post_type_name, array(&$this, 'SortPage') );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function SortPage()
|
||||
{
|
||||
?>
|
||||
<div class="wrap">
|
||||
<div class="icon32" id="icon-edit"><br></div>
|
||||
<h2><?php echo $this->current_post_type->labels->singular_name . ' - Re-order '?></h2>
|
||||
|
||||
<?php cpt_info_box(); ?>
|
||||
|
||||
<div id="ajax-response"></div>
|
||||
|
||||
<noscript>
|
||||
<div class="error message">
|
||||
<p>This plugin can't work without javascript, because it's use drag and drop and AJAX.</p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<div id="order-post-type">
|
||||
<ul id="sortable">
|
||||
<?php $this->listPages('hide_empty=0&title_li=&post_type='.$this->current_post_type->name); ?>
|
||||
</ul>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<p class="submit">
|
||||
<a href="#" id="save-order" class="button-primary">Update</a>
|
||||
</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#sortable").sortable({
|
||||
'tolerance':'intersect',
|
||||
'cursor':'pointer',
|
||||
'items':'li',
|
||||
'placeholder':'placeholder',
|
||||
'nested': 'ul'
|
||||
});
|
||||
|
||||
jQuery("#sortable").disableSelection();
|
||||
jQuery("#save-order").bind( "click", function() {
|
||||
jQuery.post( ajaxurl, { action:'update-custom-type-order', order:jQuery("#sortable").sortable("serialize") }, function() {
|
||||
jQuery("#ajax-response").html('<div class="message updated fade"><p>Items Order Updates</p></div>');
|
||||
jQuery("#ajax-response div").delay(3000).hide("slow");
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
function listPages($args = '')
|
||||
{
|
||||
$defaults = array(
|
||||
'depth' => 0, 'show_date' => '',
|
||||
'date_format' => get_option('date_format'),
|
||||
'child_of' => 0, 'exclude' => '',
|
||||
'title_li' => __('Pages'), 'echo' => 1,
|
||||
'authors' => '', 'sort_column' => 'menu_order',
|
||||
'link_before' => '', 'link_after' => '', 'walker' => ''
|
||||
);
|
||||
|
||||
$r = wp_parse_args( $args, $defaults );
|
||||
extract( $r, EXTR_SKIP );
|
||||
|
||||
$output = '';
|
||||
|
||||
$r['exclude'] = preg_replace('/[^0-9,]/', '', $r['exclude']);
|
||||
$exclude_array = ( $r['exclude'] ) ? explode(',', $r['exclude']) : array();
|
||||
$r['exclude'] = implode( ',', apply_filters('wp_list_pages_excludes', $exclude_array) );
|
||||
|
||||
// Query pages.
|
||||
$r['hierarchical'] = 0;
|
||||
$args = array(
|
||||
'sort_column' => 'menu_order',
|
||||
'post_type' => $post_type,
|
||||
'posts_per_page' => -1,
|
||||
'orderby' => 'menu_order',
|
||||
'order' => 'ASC'
|
||||
);
|
||||
|
||||
$the_query = new WP_Query($args);
|
||||
$pages = $the_query->posts;
|
||||
|
||||
if ( !empty($pages) ) {
|
||||
if ( $r['title_li'] )
|
||||
$output .= '<li class="pagenav intersect">' . $r['title_li'] . '<ul>';
|
||||
|
||||
$output .= $this->walkTree($pages, $r['depth'], $r);
|
||||
|
||||
if ( $r['title_li'] )
|
||||
$output .= '</ul></li>';
|
||||
}
|
||||
|
||||
$output = apply_filters('wp_list_pages', $output, $r);
|
||||
|
||||
if ( $r['echo'] )
|
||||
echo $output;
|
||||
else
|
||||
return $output;
|
||||
}
|
||||
|
||||
function walkTree($pages, $depth, $r)
|
||||
{
|
||||
if ( empty($r['walker']) )
|
||||
$walker = new Post_Types_Order_Walker;
|
||||
else
|
||||
$walker = $r['walker'];
|
||||
|
||||
$args = array($pages, $depth, $r);
|
||||
return call_user_func_array(array(&$walker, 'walk'), $args);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
96
src/wp-content/plugins/post-types-order/readme.txt
Normal file
@ -0,0 +1,96 @@
|
||||
=== Post Types Order ===
|
||||
Contributors: Nsp Code
|
||||
Donate link: http://www.nsp-code.com/donate.php
|
||||
Tags: post type order, custom post type order, post types order, pages order, posts order, admin posts order
|
||||
Requires at least: 2.8
|
||||
Tested up to: 3.1
|
||||
Stable tag: 1.4.6
|
||||
|
||||
Order Post Types Objects (posts, pages, custom post types) using a Drag and Drop Sortable javascript capability
|
||||
|
||||
== Description ==
|
||||
|
||||
Order Post Types Objects using a Drag and Drop Sortable javascript capability
|
||||
It allow to reorder the posts for any custom post types you defined, including the default Posts and Pages. Also you can have the admin posts interface sorted per your new sort.
|
||||
<br />This plugin it's developed by <a target="_blank" href="http://www.nsp-code.com">Nsp-Code</a>
|
||||
|
||||
== Installation ==
|
||||
|
||||
1. Upload `post-types-order` folder to your `/wp-content/plugins/` directory.
|
||||
2. Activate the plugin from Admin > Plugins menu.
|
||||
3. Once activated you should check with Settings > Post Types Order
|
||||
4. Use Re-Order link which appear into each post type section to make your sort.
|
||||
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif).
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
Feel free to contact me at electronice_delphi@yahoo.com
|
||||
|
||||
= I have no PHP knowledge at all, i will still be able to use this plugin? =
|
||||
|
||||
Yes you can. There's an option to autoupdate the wordpress queries so the posts will be returned in the required order. Anyway this can be turned off to allow customized code usage.
|
||||
|
||||
= What kind of posts/pages this plugin allow me to sort? =
|
||||
|
||||
You can sort ALL post types that you have defined into your wordpress. Posts, Pages, Movies, Reviews, Data etc..
|
||||
|
||||
= Ok, i understand about the template post types order, how about the admin interface? =
|
||||
|
||||
There's a option you can trigger, to see the post types as you defined in the sort list.
|
||||
|
||||
= There is a feature that i want it implemented, can you do something about it? =
|
||||
|
||||
All ideas are welcome and i put them on my list to be implemented into the new versions. Anyway this may take time, but if you are in a rush, please consider a small donation and we can arrange something.
|
||||
|
||||
== Change Log ==
|
||||
|
||||
= 1.4.6
|
||||
- Get Previous / Next Posts Update
|
||||
|
||||
= 1.4.3
|
||||
- Small improvments
|
||||
|
||||
= 1.4.1
|
||||
- Re-Order Menu Item Appearance fix for update versions
|
||||
|
||||
= 1.3.9 =
|
||||
- Re-Order Menu Item Appearance fix
|
||||
|
||||
= 1.3.8 =
|
||||
- Another Plugin conflict fix (thanks Steve Reed)
|
||||
- Multiple Improvments (thanks for support Video Geek - bestpocketvideocams.com)
|
||||
- Localisation Update (thanks Gabriel Reguly - ppgr.com.br/wordpress/)
|
||||
|
||||
= 1.1.2 =
|
||||
- Bug Fix
|
||||
|
||||
= 1.0.9 =
|
||||
- Admin will set the roles which can use the plugins (thanks for support Nick - peerpressurecreative.com)
|
||||
|
||||
= 1.0.2 =
|
||||
- Default order used if no sort occour
|
||||
|
||||
= 1.0.1 =
|
||||
- Post order support implemented
|
||||
|
||||
= 1.0 =
|
||||
- First stable version (thanks for support Andrew - PageLines.com)
|
||||
|
||||
= 0.9. =
|
||||
- Initial Release
|
||||
|
||||
|
||||
== Upgrade Notice ==
|
||||
|
||||
Make sure you get the latest version
|
||||
|
||||
|
||||
== Localization ==
|
||||
|
||||
Currently only available in English and Brazilian Portuguese.
|
||||
Want to contribute with a translation to your language? Please contact me at electronice_delphi@yahoo.com
|
||||
http://www.nsp-code.com
|
||||
BIN
src/wp-content/plugins/post-types-order/screenshot-1.png
Normal file
|
After Width: | Height: | Size: 134 KiB |
@ -34,7 +34,7 @@
|
||||
$description = get_the_content();
|
||||
$attrib = array('title' => $title);
|
||||
?>
|
||||
<a rel="lightbox" href="<?php echo $large_image_url[0]; ?>" title="<?php echo $description; ?>" class="size-<?php echo $image_size; ?>">
|
||||
<a rel="lightbox-<?php echo $count; ?>" href="<?php echo $large_image_url[0]; ?>" title="<?php echo $description; ?>" class="size-<?php echo $image_size; ?>">
|
||||
<span></span>
|
||||
<?php echo the_post_thumbnail($thumb_size, $attrib); ?>
|
||||
</a>
|
||||
@ -60,7 +60,7 @@
|
||||
} else {
|
||||
?>
|
||||
|
||||
<div <?php post_class(); ?>>
|
||||
<div class="post_container">
|
||||
<p><?php _e( 'Sorry, no posts matched your criteria.', 'woothemes' ); ?></p>
|
||||
</div><!-- /.post -->
|
||||
|
||||
|
||||
@ -23,8 +23,8 @@
|
||||
#cboxContent{background:#000; margin-top:20px;}
|
||||
#cboxBottomCenter{height:30px; background:#000;}
|
||||
#cboxLoadedContent{background:#000; padding:5px;}
|
||||
#cboxTitle{position:absolute; bottom:-25px; left:5px; color:#ccc;}
|
||||
#cboxCurrent{position:absolute; bottom:-25px; right:35px; color:#ccc;}
|
||||
#cboxTitle{position:absolute; bottom:-25px; left:5px; color:#ccc; background:#000; width: 95%;}
|
||||
#cboxCurrent{position:absolute; bottom:-25px; right:35px; color:#ccc; }
|
||||
#cboxSlideshow{position:absolute; top:-20px; right:90px; color:#fff;}
|
||||
#cboxPrevious{position:absolute; top:50%; left:5px; margin-top:-41px; background-image: url(data:image/gif;base64,AAAA); width:49%; height:100%; text-indent:-9999px;}
|
||||
#cboxPrevious.hover{background-position:bottom left; background:url(images/prevblack.png) top left no-repeat;}
|
||||
|
||||
BIN
src/wp-content/uploads/2011/07/acro1-150x150.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
src/wp-content/uploads/2011/07/acro1-300x199.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
src/wp-content/uploads/2011/07/acro1-45x29.jpg
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/wp-content/uploads/2011/07/acro1-95x63.jpg
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/wp-content/uploads/2011/07/acro1.jpg
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
src/wp-content/uploads/2011/07/acro2-150x150.jpg
Normal file
|
After Width: | Height: | Size: 7.1 KiB |
BIN
src/wp-content/uploads/2011/07/acro2-300x180.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/wp-content/uploads/2011/07/acro2-45x27.jpg
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/wp-content/uploads/2011/07/acro2-95x57.jpg
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
src/wp-content/uploads/2011/07/acro2.jpg
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
src/wp-content/uploads/2011/07/lamparas-150x150.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
src/wp-content/uploads/2011/07/lamparas-300x227.jpg
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
src/wp-content/uploads/2011/07/lamparas-45x34.jpg
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/wp-content/uploads/2011/07/lamparas-95x71.jpg
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
src/wp-content/uploads/2011/07/lamparas.jpg
Normal file
|
After Width: | Height: | Size: 96 KiB |