Merging 0.9.5 to master
This commit is contained in:
commit
120df5808a
4 changed files with 122 additions and 12 deletions
4
.gitmodules
vendored
4
.gitmodules
vendored
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
[submodule "openphoto-php"]
|
||||
path = openphoto-php
|
||||
url = git@github.com:openphoto/openphoto-php
|
||||
url = https://github.com/photo/openphoto-php.git
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
Contributors: randyjensen,randyhoyt
|
||||
Tags: openphoto,media
|
||||
Requires at least: 3.2
|
||||
Tested up to: 3.3
|
||||
Stable tag: 0.9.4.2
|
||||
Tested up to: 3.5
|
||||
Stable tag: %VERSION_NUMBER%
|
||||
|
||||
Insert photos from your OpenPhoto installation into your WordPress content through the media manager.
|
||||
|
||||
|
@ -26,6 +26,9 @@ Find the project on [GitHub](https://github.com/openphoto/openphoto-wordpress "O
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 0.9.5 =
|
||||
* Fix Insert Into Post button in WP 3.5
|
||||
|
||||
= 0.9.4.2 =
|
||||
* Reverting parameter name to "generate"
|
||||
|
||||
|
|
100
deploy.sh
Normal file
100
deploy.sh
Normal file
|
@ -0,0 +1,100 @@
|
|||
#! /bin/bash
|
||||
#
|
||||
# Script to deploy from Github to WordPress.org Plugin Repository
|
||||
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
|
||||
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
|
||||
# Source: https://github.com/thenbrent/multisite-user-management/blob/master/deploy.sh
|
||||
|
||||
# Configure these values for each plugin.
|
||||
GITSLUG="openphoto-wordpress"
|
||||
MAINFILE="openphoto-wordpress.php"
|
||||
SVNSLUG="openphoto"
|
||||
SVNUSER="randyhoyt"
|
||||
|
||||
# ###### Do not modify below this point. ######
|
||||
|
||||
# Set up Git repository configuration.
|
||||
GITPATH=`pwd`
|
||||
GITFOLDER='plugins/'$GITSLUG
|
||||
|
||||
# Prompt for the new version number
|
||||
echo "What is the new version number?"
|
||||
read NEWVERSION
|
||||
|
||||
# Update version number, tag the version, push everything to master.
|
||||
echo "Tagging new version in Git."
|
||||
CURRENTVERSION=`grep "^Stable tag:" $GITPATH/readme.txt | awk -F' ' '{print $NF}'`
|
||||
sed -c -i 's/Stable tag: '$CURRENTVERSION'/Stable tag: '${NEWVERSION}'/g' ${GITPATH}/readme.txt
|
||||
CURRENTVERSION=`grep "^Version:" $GITPATH/$MAINFILE | awk -F' ' '{print $NF}'`
|
||||
sed -c -i 's/Version: '$CURRENTVERSION'/Version: '${NEWVERSION}'/g' ${GITPATH}/${MAINFILE}
|
||||
git add readme.txt
|
||||
git add ${GITPATH}/${MAINFILE}
|
||||
git commit -m "Tagging version $NEWVERSION"
|
||||
git tag -a "$NEWVERSION" -m "Tagging version $NEWVERSION"
|
||||
git checkout master
|
||||
git merge dev
|
||||
git add *
|
||||
git commit -m "Merging version $NEWVERSION to master"
|
||||
git push
|
||||
git push --tags
|
||||
git checkout dev
|
||||
<<<<<<< HEAD
|
||||
NEWVERSION=`grep "^Stable tag:" $GITPATH/readme.txt | awk -F' ' '{print $NF}'`
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
sed -c -i 's/Stable tag: '$NEWVERSION'/Stable tag: 'VERSION_NUMBER/g' ${GITPATH}/readme.txt
|
||||
NEWVERSION=`grep "^Version:" $GITPATH/$MAINFILE | awk -F' ' '{print $NF}'`
|
||||
sed -c -i 's/Version: '$NEWVERSION'/Version: 'VERSION_NUMBER/g' ${GITPATH}/${MAINFILE}
|
||||
=======
|
||||
sed -c -i 's/Stable tag: '$NEWVERSION'/Stable tag: %VERSION_NUMBER%/g' ${GITPATH}/readme.txt
|
||||
NEWVERSION=`grep "^Version:" $GITPATH/$MAINFILE | awk -F' ' '{print $NF}'`
|
||||
sed -c -i 's/Version: '$NEWVERSION'/Version: %VERSION_NUMBER%/g' ${GITPATH}/${MAINFILE}
|
||||
>>>>>>> dev
|
||||
=======
|
||||
sed -c -i 's/Stable tag: '$NEWVERSION'/Stable tag: VERSION_NUMBER/g' ${GITPATH}/readme.txt
|
||||
NEWVERSION=`grep "^Version:" $GITPATH/$MAINFILE | awk -F' ' '{print $NF}'`
|
||||
sed -c -i 's/Version: '$NEWVERSION'/Version: VERSION_NUMBER/g' ${GITPATH}/${MAINFILE}
|
||||
>>>>>>> dev
|
||||
git add readme.txt
|
||||
git add ${GITPATH}/${MAINFILE}
|
||||
git commit -m "Tagging version $NEWVERSION"
|
||||
git push
|
||||
=======
|
||||
>>>>>>> dev
|
||||
|
||||
# Set up Subversion repository configuration.
|
||||
SVNFOLDER='svn/'$SVNSLUG
|
||||
SVNPATH=${GITPATH/$GITFOLDER/$SVNFOLDER}
|
||||
SVNURL="http://plugins.svn.wordpress.org/$SVNSLUG"
|
||||
|
||||
# Remove any folders in the current Subversion folder and checkout the repository afresh.
|
||||
rm -r -f $SVNPATH
|
||||
|
||||
echo "Creating local copy of the Subversion repository."
|
||||
svn co $SVNURL $SVNPATH
|
||||
|
||||
echo "Ignoring github specific files and deployment script."
|
||||
svn propset svn:ignore "deploy.sh
|
||||
README.md
|
||||
.git
|
||||
.gitignore" "$SVNPATH/trunk/"
|
||||
|
||||
echo "Exporting from Git to Subversion trunk."
|
||||
git checkout-index -a -f --prefix=$SVNPATH/trunk/
|
||||
|
||||
|
||||
|
||||
echo "Switching to Subversion directory and committing."
|
||||
cd $SVNPATH/trunk/
|
||||
svn commit --username=$SVNUSER -m "Committing version $NEWVERSIONTXT"
|
||||
|
||||
|
||||
cd $GITPATH
|
||||
NEWVERSION=`grep "^Stable tag:" $GITPATH/readme.txt | awk -F' ' '{print $NF}'`
|
||||
sed -c -i 's/Stable tag: '$NEWVERSION'/Stable tag: %VERSION_NUMBER%/g' ${GITPATH}/readme.txt
|
||||
NEWVERSION=`grep "^Version:" $GITPATH/$MAINFILE | awk -F' ' '{print $NF}'`
|
||||
sed -c -i 's/Version: '$NEWVERSION'/Version: %VERSION_NUMBER%/g' ${GITPATH}/${MAINFILE}
|
||||
git add readme.txt
|
||||
git add ${GITPATH}/${MAINFILE}
|
||||
git commit -m "Tagging version $NEWVERSION"
|
||||
git push
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
/*
|
||||
Plugin Name: OpenPhoto for WordPress
|
||||
Version: 0.9.4.2
|
||||
Version: 0.9.5
|
||||
Plugin URI: https://github.com/openphoto/openphoto-wordpress
|
||||
Author: Randy Hoyt, Randy Jensen
|
||||
Author URI: http://cultivatr.com/
|
||||
Author URI: http://amesburyweb.com/
|
||||
Description: Connects a WordPress installation to an OpenPhoto installation.
|
||||
*/
|
||||
|
||||
|
@ -30,7 +30,12 @@ class WP_OpenPhoto {
|
|||
}
|
||||
|
||||
function media_render_openphoto_tab() {
|
||||
media_upload_header();
|
||||
|
||||
if ( $wp_version >= 3.5 ) {
|
||||
// do nothing
|
||||
} else {
|
||||
media_upload_header();
|
||||
}
|
||||
|
||||
$post_id = intval($_REQUEST['post_id']);
|
||||
$m = trim($_REQUEST['m']);
|
||||
|
@ -44,7 +49,7 @@ class WP_OpenPhoto {
|
|||
$sizes['thumbnail']['h'] = get_option('thumbnail_size_h');
|
||||
$sizes['thumbnail']['crop'] = get_option('thumbnail_crop');
|
||||
$sizes['thumbnail'] = $sizes['thumbnail']['w'] . 'x' . $sizes['thumbnail']['h'];
|
||||
if ($sizes['thumbnail']['crop']==1) $sizes['thumbnail'] .= 'xCR';
|
||||
if (isset($sizes['thumbnail']['crop']) && $sizes['thumbnail']['crop']==1) $sizes['thumbnail'] .= 'xCR';
|
||||
$sizes['medium']['w'] = get_option('medium_size_w');
|
||||
$sizes['medium']['h'] = get_option('medium_size_h');
|
||||
$sizes['medium'] = $sizes['medium']['w'] . 'x' . $sizes['medium']['h'];
|
||||
|
@ -77,11 +82,11 @@ class WP_OpenPhoto {
|
|||
caption_text = parent_el.find('.caption-text').val();
|
||||
caption_text.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>');
|
||||
url_text = parent_el.find('.url-text').val();
|
||||
alignment = parent_el.find('.alignment-area input[type="radio"]]:checked').val();
|
||||
size = parent_el.find('.size-area input[type="radio"]]:checked').val();
|
||||
size_height = parent_el.find('.size-area input[type="radio"]]:checked').attr('data-image-height');
|
||||
size_width = parent_el.find('.size-area input[type="radio"]]:checked').attr('data-image-width');
|
||||
size_alt = parent_el.find('.size-area input[type="radio"]]:checked').attr('alt');
|
||||
alignment = parent_el.find('.alignment-area input[type="radio"]:checked').val();
|
||||
size = parent_el.find('.size-area input[type="radio"]:checked').val();
|
||||
size_height = parent_el.find('.size-area input[type="radio"]:checked').attr('data-image-height');
|
||||
size_width = parent_el.find('.size-area input[type="radio"]:checked').attr('data-image-width');
|
||||
size_alt = parent_el.find('.size-area input[type="radio"]:checked').attr('alt');
|
||||
size_class = 'size-' + size;
|
||||
height = size_height;
|
||||
width = size_width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue