Plugin Directory

Changeset 729102


Ignore:
Timestamp:
06/20/2013 10:34:03 PM (13 years ago)
Author:
szaleq
Message:

uploading version 0.4.4

Location:
easy-watermark
Files:
5 edited
17 copied

Legend:

Unmodified
Added
Removed
  • easy-watermark/tags/0.4.4/index.php

    r715745 r729102  
    33Plugin Name:    Easy Watermark
    44Description:    This plugin can automatically add image and text watermark to pictures as they are uploaded to wordpress media library. You can also watermark existing images manually (all at once or an every single image). Watermark image can be a png, gif (alpha channel supported in both cases) or jpg. It's also possibile to set watermark opacity (doesn't apply to png with alpha channel). For text watermark you can select font, set color, size, angel and opacity.
    5 Version:    0.4.3
     5Version:    0.4.4
    66Author:     Wojtek Szałkiewicz
    77Author URI: http://szalkiewicz.pl/
  • easy-watermark/tags/0.4.4/languages/easy-watermark-pl_PL.po

    r715971 r729102  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2013-05-16 19:39+0100\n"
    6 "PO-Revision-Date: 2013-05-17 20:37+0100\n"
     6"PO-Revision-Date: 2013-05-26 12:17+0100\n"
    77"Last-Translator: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
    88"Language-Team: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
  • easy-watermark/tags/0.4.4/lib/EasyWatermarkPlugin.php

    r714327 r729102  
    333333    public function wp_generate_attachment_metadata($metadata, $id){
    334334        if($this->watermark_uploaded && $this->uploaded_id == $id){
    335             $this->watermark_single($id, true);
     335            $this->watermark_single($id, false, $metadata);
    336336
    337337            $this->watermark_uploaded = false;
     
    348348     * @return boolean
    349349     */
    350     private function watermark_single($id, $checkMime = false){
     350    private function watermark_single($id, $checkMime = false, $meta = array()){
    351351        if($this->isGDEnabled()) :
    352352
     
    362362            }
    363363
    364             return $this->create_watermark($post);
     364            return $this->create_watermark($post, $meta);
    365365        }
    366366        else {
     
    420420     * @return boolean
    421421     */
    422     public function create_watermark($post){
    423         $meta = get_post_meta($post->ID, '_wp_attachment_metadata');
    424         $meta = $meta[0];
    425         $images = $meta['sizes'];
    426         $images['full'] = array(
     422    public function create_watermark($post, $meta = array()){
     423
     424        if(empty($meta)){
     425            $meta = get_post_meta($post->ID, '_wp_attachment_metadata');
     426            $meta = $meta[0];
     427        }
     428
     429        $sizes = $meta['sizes'];
     430        $sizes['full'] = array(
    427431            'file' => $meta['file'],
    428432            'mime-type' => $post->post_mime_type
     
    435439
    436440        $return = true;
    437         foreach($images as $size => $img){
     441        foreach($sizes as $size => $img){
    438442            if(in_array($size, $allowedSizes)){
    439443                $imgFile = str_replace($filebasename, wp_basename($img['file']), $filepath);
  • easy-watermark/tags/0.4.4/readme.txt

    r716816 r729102  
    55Requires at least: 3.3
    66Tested up to: 3.5.1
    7 Stable tag: 0.4.3
     7Stable tag: 0.4.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8181
    8282= 0.4.3 =
     83* repaired issue with auto-watermark option
     84
     85= 0.4.3 =
    8386* added support for additional image sizes registered by some templates or plugins (e.g. 'post-thumbnail')
    8487
  • easy-watermark/trunk/index.php

    r715745 r729102  
    33Plugin Name:    Easy Watermark
    44Description:    This plugin can automatically add image and text watermark to pictures as they are uploaded to wordpress media library. You can also watermark existing images manually (all at once or an every single image). Watermark image can be a png, gif (alpha channel supported in both cases) or jpg. It's also possibile to set watermark opacity (doesn't apply to png with alpha channel). For text watermark you can select font, set color, size, angel and opacity.
    5 Version:    0.4.3
     5Version:    0.4.4
    66Author:     Wojtek Szałkiewicz
    77Author URI: http://szalkiewicz.pl/
  • easy-watermark/trunk/languages/easy-watermark-pl_PL.po

    r715971 r729102  
    44"Report-Msgid-Bugs-To: \n"
    55"POT-Creation-Date: 2013-05-16 19:39+0100\n"
    6 "PO-Revision-Date: 2013-05-17 20:37+0100\n"
     6"PO-Revision-Date: 2013-05-26 12:17+0100\n"
    77"Last-Translator: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
    88"Language-Team: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
  • easy-watermark/trunk/lib/EasyWatermarkPlugin.php

    r714327 r729102  
    333333    public function wp_generate_attachment_metadata($metadata, $id){
    334334        if($this->watermark_uploaded && $this->uploaded_id == $id){
    335             $this->watermark_single($id, true);
     335            $this->watermark_single($id, false, $metadata);
    336336
    337337            $this->watermark_uploaded = false;
     
    348348     * @return boolean
    349349     */
    350     private function watermark_single($id, $checkMime = false){
     350    private function watermark_single($id, $checkMime = false, $meta = array()){
    351351        if($this->isGDEnabled()) :
    352352
     
    362362            }
    363363
    364             return $this->create_watermark($post);
     364            return $this->create_watermark($post, $meta);
    365365        }
    366366        else {
     
    420420     * @return boolean
    421421     */
    422     public function create_watermark($post){
    423         $meta = get_post_meta($post->ID, '_wp_attachment_metadata');
    424         $meta = $meta[0];
    425         $images = $meta['sizes'];
    426         $images['full'] = array(
     422    public function create_watermark($post, $meta = array()){
     423
     424        if(empty($meta)){
     425            $meta = get_post_meta($post->ID, '_wp_attachment_metadata');
     426            $meta = $meta[0];
     427        }
     428
     429        $sizes = $meta['sizes'];
     430        $sizes['full'] = array(
    427431            'file' => $meta['file'],
    428432            'mime-type' => $post->post_mime_type
     
    435439
    436440        $return = true;
    437         foreach($images as $size => $img){
     441        foreach($sizes as $size => $img){
    438442            if(in_array($size, $allowedSizes)){
    439443                $imgFile = str_replace($filebasename, wp_basename($img['file']), $filepath);
  • easy-watermark/trunk/readme.txt

    r716816 r729102  
    55Requires at least: 3.3
    66Tested up to: 3.5.1
    7 Stable tag: 0.4.3
     7Stable tag: 0.4.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8181
    8282= 0.4.3 =
     83* repaired issue with auto-watermark option
     84
     85= 0.4.3 =
    8386* added support for additional image sizes registered by some templates or plugins (e.g. 'post-thumbnail')
    8487
Note: See TracChangeset for help on using the changeset viewer.