WordPress.org

Plugin Directory

Changeset 1437340


Ignore:
Timestamp:
06/15/16 20:59:23 (18 months ago)
Author:
BriniA
Message:

v1.9.6

Location:
awesome-filterable-portfolio
Files:
56 added
3 edited

Legend:

Unmodified
Added
Removed
  • awesome-filterable-portfolio/trunk/afp.php

    r1408229 r1437340  
    33/* 
    44Plugin Name: Awesome Filterable Portfolio 
    5 Plugin URI: http://brinidesigner.com/wordpress-plugins/awesome-filterable-portfolio/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP 
     5Plugin URI: https://brinidesigner.com/wordpress-plugins/awesome-filterable-portfolio/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP 
    66Description: Awesome Filterable Portfolio allows you to create a portfolio that you can filter its elements using smooth animations. 
    7 Version: 1.9.5 
     7Version: 1.9.6 
    88Author: BriniA 
    9 Author URI: http://brinidesigner.com/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP 
     9Author URI: https://brinidesigner.com/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP 
    1010 
    1111Copyright 2012-2016  BriniA 
     
    3636//Registering Scripts & Styles for the Admin 
    3737function afp_enqeue_scripts(){ 
    38     if (get_current_screen()->id == 'portfolio-items_page_afp_add_new_portfolio_item'){ 
     38 
     39    wp_register_style( 'afp-admin-css', plugin_dir_url(__FILE__) . 
     40        'css/afp-admin-style.css'); 
     41    wp_enqueue_style( 'afp-admin-css' ); 
     42 
     43    if (get_current_screen()->id == 'portfolio-items_page_afp_options_page') { 
     44        wp_register_script('afp-admin-options', plugin_dir_url(__FILE__) . 
     45            'js/afp-admin-options.js'); 
     46        wp_enqueue_script('afp-admin-options'); 
     47    } 
     48 
     49    else if (get_current_screen()->id == 
     50        'portfolio-items_page_afp_add_new_portfolio_item'){ 
    3951        wp_register_style('datepicker-style', plugin_dir_url(__FILE__) . 'css/jquery-ui-datepicker.css'); 
    4052        wp_enqueue_style('datepicker-style'); 
     
    200212                <?php _e('This is the image that will be displayed when you show the project details.', 'awesome-filterable-portfolio'); ?> 
    201213                </span> </p> 
     214                <div id="js-image-container"></div> 
    202215              <p> 
    203216                <label for="thumbnail"><b> 
     
    328341                <?php _e('This is the image that will be displayed when you show the project details.', 'awesome-filterable-portfolio'); ?> 
    329342                </span> </p> 
    330               <p> 
     343                <div id="js-image-container"></div> 
     344                <p> 
    331345                <label for="thumbnail"><b> 
    332346                  <?php _e('Thumbnail', 'awesome-filterable-portfolio'); ?> 
     
    679693            </span></h3> 
    680694          <div class="inside"> 
    681             <form action="#" method="post" enctype="multipart/form-data"> 
    682               <table cellpadding="3"> 
     695            <form action="#" method="post" enctype="multipart/form-data" 
     696                  id="js-afp-options-form"> 
     697              <table cellpadding="3" class="afp-options-table"> 
    683698                <tr> 
    684699                  <td style="width:140px;"><b> 
     
    715730                </tr> 
    716731              </table> 
    717               <br /> 
    718               <table cellpadding="3"> 
     732              <table cellpadding="3" class="afp-options-table"> 
    719733                <tr> 
    720734                  <td style="width:140px;" valign="top"><b> 
     
    735749                </tr> 
    736750              </table> 
    737               <br /> 
    738               <table cellpadding="3"> 
     751              <table cellpadding="3" class="afp-options-table"> 
    739752                <tr> 
    740753                  <td style="width:140px;" valign="top"><b> 
     
    833846                    </select></td> 
    834847                </tr> 
    835  
     848              </table> 
     849                <table cellpadding="3" class="afp-options-table"> 
    836850                  <tr> 
    837                       <td valign="top"><b> 
     851                      <td style="width:140px;" valign="top"><b> 
    838852                              <?php _e('Display categories', 'awesome-filterable-portfolio'); ?> 
    839853                          </b></td> 
     
    868882                  <tr> 
    869883                      <td valign="top"><b> 
     884                              <?php _e('Crop thumbnails', 'awesome-filterable-portfolio') 
     885                              ; ?> 
     886                          </b></td> 
     887                      <td> 
     888                          <input type="hidden" name="cropThumbnails" value="0" /> 
     889                          <input type="checkbox" name="cropThumbnails" 
     890                                 id="cropThumbnails" 
     891                                 value="1" 
     892                              <?php if ($afpOptions['cropThumbnails'] == 1) 
     893                              { 
     894                                  echo 'checked="checked"'; 
     895                              } ?> /> 
     896                          <label for="cropThumbnails"> 
     897                              <?php _e('Crop thumbnails to the size'); ?> 
     898                          </label> 
     899                      </td> 
     900                  </tr> 
     901                  <tr id="afp-options-form-height"> 
     902                      <td valign="top"><b> 
    870903                              <?php _e('Thumbnail height', 'awesome-filterable-portfolio') 
    871904                              ; ?> 
     
    876909                          ?>" 
    877910                                 style="width: 50px;" /> px<BR> 
    878                           <?php _e('Same as width, 300 as default', 
     911                          <?php _e('Same as width, 250 as default', 
    879912                              'awesome-filterable-portfolio'); ?> 
    880913                      </td> 
     
    938971    } 
    939972    if (!$afpOptions['thumbnailHeight']) { 
    940         $afpOptions['thumbnailHeight'] = 300; 
     973        $afpOptions['thumbnailHeight'] = 250; 
    941974    } 
    942975 
     
    9681001 
    9691002    $image = wp_get_image_editor($imageUrl); 
    970     $image->resize($afpOptions['thumbnailWidth'], $afpOptions['thumbnailHeight']); 
     1003    $height = $afpOptions['cropThumbnails'] == 1 
     1004        ? $afpOptions['thumbnailHeight'] : 10000; 
     1005    $image->resize($afpOptions['thumbnailWidth'], $height, $afpOptions['cropThumbnails']); 
    9711006    $image->save($thumbnailAbsPath); 
    9721007 
     
    11791214    $thumbnailWidth = $_POST['thumbnailWidth']; 
    11801215    $thumbnailHeight = $_POST['thumbnailHeight']; 
     1216    $cropThumbnails = $_POST['cropThumbnails']; 
    11811217    $afpOptions = array( 
    11821218        'sort_cat'        => $sort_cat, 
     
    11901226        'thumbnailWidth'  => $thumbnailWidth, 
    11911227        'thumbnailHeight' => $thumbnailHeight, 
     1228        'cropThumbnails'  => $cropThumbnails, 
    11921229    ); 
    11931230    update_option( 'afpOptions', $afpOptions ); 
     
    12481285        'hoverFX' => 'normal', 
    12491286        'displayCat'=> '0', 
    1250         'thumbnailHeight'=>300, 
     1287        'thumbnailHeight'=>250, 
    12511288        'thumbnailWidth'=>300, 
    12521289    ); 
  • awesome-filterable-portfolio/trunk/js/afp-admin-functions.js

    r1408229 r1437340  
    11/* MEDIA UPLOADER */ 
    22jQuery(document).ready(function($){ 
    3     $('#thumbnail').click(function(e) { 
     3 
     4    $('#thumbnail').click(function (e) { 
    45        e.preventDefault(); 
    5         var thumb = wp.media({  
    6             title: 'Upload Thumbnail', 
     6        var thumb = wp.media({ 
     7            title:    'Upload Thumbnail', 
    78            multiple: false 
    8         }).open().on('select', function(e){ 
     9        }).open().on('select', function (e) { 
    910            var thumb_url = thumb.state().get('selection').first().toJSON().url; 
    1011            $('#thumbnail_adr').val(thumb_url); 
    11             }); 
     12            showCurrentImage(); 
     13        }); 
    1214        return false; 
    1315    }); 
    14      
    15     $('#image').click(function(e) { 
     16 
     17    $('#image').click(function (e) { 
    1618        e.preventDefault(); 
    17         var image = wp.media({  
    18             title: 'Upload Image', 
     19        var image = wp.media({ 
     20            title:    'Upload Image', 
    1921            multiple: false 
    20         }).open().on('select', function(e){ 
     22        }).open().on('select', function (e) { 
    2123            var image_url = image.state().get('selection').first().toJSON().url; 
    2224            $('#image_adr').val(image_url); 
    23             }); 
    2425            $('#thumbnail_adr').val(''); 
     26            showCurrentImage(); 
     27        }); 
    2528        return false; 
    2629    }); 
    27      
     30 
     31    /** 
     32     * Show current image in item form 
     33     */ 
     34    var showCurrentImage = function () { 
     35        var src = $('#image_adr').val(); 
     36        src && $('#js-image-container').empty().append( 
     37            '<a class="afp-item-form-image-preview" href="' + 
     38            src + 
     39            '" target="_blank"><img src="'+src+'" /></a>' 
     40        ); 
     41    }; 
     42    showCurrentImage(); 
    2843}); 
    2944 
     
    3247    $('#date').datepicker({ showAnim: 'fadeIn' }); 
    3348}); 
     49 
  • awesome-filterable-portfolio/trunk/readme.txt

    r1409869 r1437340  
    22Contributors: BriniA 
    33Plugin Name: Awesome Filterable Portfolio 
    4 Plugin URI: http://brinidesigner.com/wordpress-plugins/awesome-filterable-portfolio/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP 
     4Plugin URI: https://brinidesigner.com/wordpress-plugins/awesome-filterable-portfolio/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP 
    55Tags: portfolio, filterable portfolio, simple portfolio, wordpress portfolio, portfolio wordpress, photo portfolio, portfolio plugin, gallery portfolio, sortable portfolio, wp portfolio, image portfolio, best portfolio plugin, awesome portfolio, awesome filterable portfolio, portfolio shortcode, filterable, filter, categorized, category, categories, sort, sortable, photos, clients, project, projects, showcase, work, thumbnails, jquery, animation, jquery animation, jquery effects 
    66Requires at least: 3.5 
    7 Tested up to: 4.5.1 
    8 Stable tag: 1.9.5 
     7Tested up to: 4.5.2 
     8Stable tag: 1.9.6 
    99License: GPL 
    10 Donate link: http://brinidesigner.com/wordpress-plugins/awesome-filterable-portfolio/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP 
     10Donate link: https://brinidesigner.com/wordpress-plugins/awesome-filterable-portfolio/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP 
    1111 
    1212Awesome Filterable Portfolio allows you to create a very modern and outstanding portfolio which filters instantly using jQuery animations. 
     
    2525* Unlimited items/categories 
    2626* Easy to use and customize 
    27 * Available in 8 languages (there's more coming) 
    28 * New <a href="http://brinidesigner.com/wordpress-plugins/awesome-filterable-portfolio/video/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP">video tutorial</a> to help you get started with Filterable Portfolio 
     27* Available in 8 languages (and there's more coming) 
     28* New <a href="https://www.youtube.com/watch?v=VcTPaA1wYEY">video tutorial</a> to help you get started with Filterable Portfolio 
    2929 
    3030<h4>How to use it?</h4> 
     
    4040 
    4141<h4>Documentation</h4> 
    42 <a href="http://brinidesigner.com/wordpress-plugins/awesome-filterable-portfolio/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP">Awesome Filterable Portfolio Documentation</a> 
     42<a href="https://brinidesigner.com/wordpress-plugins/awesome-filterable-portfolio/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP">Awesome Filterable Portfolio Documentation</a> 
    4343 
    4444<h4>Now available in the following languages</h4> 
     
    5252* Polish  (Thanks to <a href="http://michalsmolinski.pl/">Michal Smolinski</a>) 
    5353 
    54 Please feel free to <a href="http://brinidesigner.com/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP">contact me</a> if you have a better translation or to contribute by adding a new language. 
     54Please feel free to <a href="https://brinidesigner.com/?utm_source=AFP&utm_medium=AFP&utm_campaign=AFP">contact me</a> if you have a better translation or to contribute by adding a new language. 
    5555 
    5656<em>If you like the Awesome Filterable Portfolio plugin, please give it a good rating :)</em> 
     
    147147* @mavlutovr joined me in developing the plugin and helped with many bug fixes 
    148148 
     149= 1.9.6 = 
     150* Replace deprecated functions 
     151* Add image crop function 
     152 
    149153== Upgrade Notice == 
    150154 
Note: See TracChangeset for help on using the changeset viewer.