Plugin Directory

Changeset 1895523


Ignore:
Timestamp:
06/20/2018 05:16:01 AM (8 years ago)
Author:
mythemes
Message:

Sections Improvements for Gourmand Light Plugin

Location:
gourmand-light/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • gourmand-light/trunk/configs/customize/content/call-action.php

    r1892718 r1895523  
    6868        ),
    6969        'front-page-content-call-action-title-text' => array(
    70             'default'   => sprintf( __( 'Gourmand %1s', 'gourmand-light' ), '<span class="accent-color">' . __( 'Premium', 'gourmand-light' ) . '</span>' ),
     70            'default'   => sprintf( __( 'Gourmand %1s', 'gourmand-light' ), '<span class="accent-color">' . __( 'Pro', 'gourmand-light' ) . '</span>' ),
    7171            'sanitize'  => array( 'gourmand_esc', 'editor' )
    7272        ),
     
    8686        ),
    8787        'front-page-content-call-action-subtitle-text' => array(
    88             'default'   => __( 'WordPress Food Solution', 'gourmand-light' ),
     88            'default'   => __( 'WordPress Food Solutions', 'gourmand-light' ),
    8989            'sanitize'  => array( 'gourmand_esc', 'text' )
    9090        ),
     
    112112        ),
    113113        'front-page-content-call-action-desc-max-width' => array(
    114             'default'   => gourmand_mod::get( 'front-page-content-descs-max-width' ),
     114            'default'   => 400,
    115115            'sanitize'  => array( 'gourmand_esc', 'natural' )
    116116        ),
  • gourmand-light/trunk/configs/customize/content/features.php

    r1892718 r1895523  
    160160        ),
    161161        'front-page-content-features-1-icon' => array(
    162             'default'   => 'gourmand-icon-looped-square-interest',
     162            'default'   => 'gourmand-icon-sliders',
    163163            'sanitize'  => array( 'gourmand_esc', 'attr' )
    164164        ),
     
    204204        ),
    205205        'front-page-content-features-3-desc' => array(
    206             'default'   => __( 'With Gourmand WordPress Theme you do not need to re-invest in a new theme whenever you want to implement new ideas.', 'gourmand-light' ),
     206            'default'   => __( 'With Gourmand Theme you do not need to re-invest in a new theme whenever you want to implement new ideas.', 'gourmand-light' ),
    207207            'sanitize'  => array( 'gourmand_esc', 'editor' )
    208208        ),
     
    222222        ),
    223223        'front-page-content-features-4-desc' => array(
    224             'default'   => __( 'Gourmand WordPress Theme allow you focus on generating new ideas for your business. Take a break from the daily routine.', 'gourmand-light' ),
     224            'default'   => __( 'Gourmand Theme allow you focus on generating new ideas for your business. Take a break from the daily routine.', 'gourmand-light' ),
     225            'sanitize'  => array( 'gourmand_esc', 'editor' )
     226        ),
     227
     228        // Feature 5
     229        'front-page-content-features-5' => array(
     230            'default'   => true,
     231            'sanitize'  => array( 'gourmand_esc', 'logic' )
     232        ),
     233        'front-page-content-features-5-icon' => array(
     234            'default'   => 'gourmand-icon-paper-plane-empty',
     235            'sanitize'  => array( 'gourmand_esc', 'attr' )
     236        ),
     237        'front-page-content-features-5-title' => array(
     238            'default'   => __( 'Responsive Layout', 'gourmand-light' ),
     239            'sanitize'  => array( 'gourmand_esc', 'text' )
     240        ),
     241        'front-page-content-features-5-desc' => array(
     242            'default'   => __( 'We haven’t forgotten about responsive layout. With Gourmand you can create a website with full mobile support.', 'gourmand-light' ),
     243            'sanitize'  => array( 'gourmand_esc', 'editor' )
     244        ),
     245
     246        // Feature 6
     247        'front-page-content-features-6' => array(
     248            'default'   => true,
     249            'sanitize'  => array( 'gourmand_esc', 'logic' )
     250        ),
     251        'front-page-content-features-6-icon' => array(
     252            'default'   => 'gourmand-icon-star',
     253            'sanitize'  => array( 'gourmand_esc', 'attr' )
     254        ),
     255        'front-page-content-features-6-title' => array(
     256            'default'   => __( 'Easy to Use', 'gourmand-light' ),
     257            'sanitize'  => array( 'gourmand_esc', 'text' )
     258        ),
     259        'front-page-content-features-6-desc' => array(
     260            'default'   => __( 'Gourmand propose you Solutions with a lot of ready one click Setup Custom Sections and many others Features.', 'gourmand-light' ),
    225261            'sanitize'  => array( 'gourmand_esc', 'editor' )
    226262        )
  • gourmand-light/trunk/configs/customize/content/testimonials.php

    r1892718 r1895523  
    161161            'sanitize'  => array( 'gourmand_esc', 'url' )
    162162        ),
    163         /*'front-page-content-testimonials-1-author-email' => array(
    164             'default'   => ,
     163        'front-page-content-testimonials-1-author-email' => array(
     164            'default'   => null,
    165165            'sanitize'  => array( 'gourmand_esc', 'email' )
    166         ),*/
    167         /*'front-page-content-testimonials-1-author-image' => array(
    168             'default'   => ,
    169             'sanitize'  => array( 'gourmand_esc', 'url' )
    170         ),*/
     166        ),
     167        'front-page-content-testimonials-1-author-image' => array(
     168            'default'   => get_template_directory_uri() . '/assets/skins/default/img/ts-1.jpg',
     169            'sanitize'  => array( 'gourmand_esc', 'url' )
     170        ),
    171171        'front-page-content-testimonials-1-author-name' => array(
    172172            'default'   => __( 'Alexei Vakulovsky', 'gourmand-light' ),
     
    199199            'sanitize'  => array( 'gourmand_esc', 'url' )
    200200        ),
    201         /*'front-page-content-testimonials-2-author-email' => array(
    202             'default'   => ,
     201        'front-page-content-testimonials-2-author-email' => array(
     202            'default'   => null,
    203203            'sanitize'  => array( 'gourmand_esc', 'email' )
    204         ),*/
    205         /*'front-page-content-testimonials-2-author-image' => array(
    206             'default'   => ,
    207             'sanitize'  => array( 'gourmand_esc', 'url' )
    208         ),*/
     204        ),
     205        'front-page-content-testimonials-2-author-image' => array(
     206            'default'   => get_template_directory_uri() . '/assets/skins/default/img/ts-2.jpg',
     207            'sanitize'  => array( 'gourmand_esc', 'url' )
     208        ),
    209209        'front-page-content-testimonials-2-author-name' => array(
    210210            'default'   => __( 'Robert Grouwsky', 'gourmand-light' ),
     
    238238            'sanitize'  => array( 'gourmand_esc', 'url' )
    239239        ),
    240         /*'front-page-content-testimonials-3-author-email' => array(
    241             'default'   => ,
     240        'front-page-content-testimonials-3-author-email' => array(
     241            'default'   => null,
    242242            'sanitize'  => array( 'gourmand_esc', 'email' )
    243         ),*/
    244         /*'front-page-content-testimonials-3-author-image' => array(
    245             'default'   => ,
    246             'sanitize'  => array( 'gourmand_esc', 'url' )
    247         ),*/
     243        ),
     244        'front-page-content-testimonials-3-author-image' => array(
     245            'default'   => get_template_directory_uri() . '/assets/skins/default/img/ts-3.jpg',
     246            'sanitize'  => array( 'gourmand_esc', 'url' )
     247        ),
    248248        'front-page-content-testimonials-3-author-name' => array(
    249249            'default'   => __( 'Gabriela Pozzo', 'gourmand-light' ),
  • gourmand-light/trunk/configs/customize/header.php

    r1892718 r1895523  
    215215        ),
    216216        'header-small-title-text'   => array(
    217             'default'   => __( 'Food WordPress Solutions', 'gourmand-light' ),
     217            'default'   => __( 'WordPress Food Solutions', 'gourmand-light' ),
    218218            'sanitize'  => array( 'gourmand_esc', 'text' )
    219219        ),
     
    310310        ),
    311311        'header-btn-1-bkg-color'    => array(
    312             'default'   => '#ef4836',
     312            'default'   => gourmand_mod::get( 'accent-color' ),
    313313            'sanitize'  => array( 'gourmand_esc', 'color' )
    314314        ),
     
    318318        ),
    319319        'header-btn-1-bordered-color'   => array(
    320             'default'   => '#ef4836',
     320            'default'   => gourmand_mod::get( 'accent-color' ),
    321321            'sanitize'  => array( 'gourmand_esc', 'color' )
    322322        ),
     
    364364        ),
    365365        'header-btn-2-bkg-color'    => array(
    366             'default'   => '#ef4836',
     366            'default'   => gourmand_mod::get( 'accent-color' ),
    367367            'sanitize'  => array( 'gourmand_esc', 'color' )
    368368        ),
     
    372372        ),
    373373        'header-btn-2-bordered-color'   => array(
    374             'default'   => '#ef4836',
     374            'default'   => gourmand_mod::get( 'accent-color' ),
    375375            'sanitize'  => array( 'gourmand_esc', 'color' )
    376376        ),
     
    418418        ),
    419419        'header-btn-3-bkg-color'    => array(
    420             'default'   => '#ef4836',
     420            'default'   => gourmand_mod::get( 'accent-color' ),
    421421            'sanitize'  => array( 'gourmand_esc', 'color' )
    422422        ),
     
    426426        ),
    427427        'header-btn-3-bordered-color'   => array(
    428             'default'   => '#ef4836',
     428            'default'   => gourmand_mod::get( 'accent-color' ),
    429429            'sanitize'  => array( 'gourmand_esc', 'color' )
    430430        ),
  • gourmand-light/trunk/gourmand-light.php

    r1892718 r1895523  
    44    Plugin URI: http://mythem.es/item/gourmand/
    55    Description: This is a GPL 2 WordPress plugin. This plugin extend Gourmand free WordPress theme Core Features with many extra features and also Front Page Custom Sections.
    6     Version: 0.0.5
     6    Version: 0.0.6
    77    Author: myThem.es
    88    Author URI: http://mythem.es/
  • gourmand-light/trunk/readme.txt

    r1892729 r1895523  
    66Requires at least: 4.6
    77Tested up to: 4.9
    8 Stable tag: 0.0.5
     8Stable tag: 0.0.6
    99License: GPLv2
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838== Changelog ==
    3939
     40= 0.0.6 =
     41* Improvements for Customizer › Front Page ( Content ) › Features Section
     42* Improvements for Customizer › Front Page ( Content ) › About Section
     43* Improvements for Customizer › Front Page ( Content ) › Testimonials Section
     44* Improvements for Customizer › Front Page ( Content ) › Services Section
     45
    4046= 0.0.5 =
    4147* Improvements for Customizer › Front Page ( Content ) › Call Action Section
  • gourmand-light/trunk/templates/body/prepend.php

    r1892718 r1895523  
    11<?php
    2     $display = is_single() && gourmand_mod::get( 'post-comments' ) || is_page() && gourmand_mod::get( 'page-comments' );
     2    if( is_single() ){
     3        $display = gourmand_mod::get( 'post-comments' ) || is_page() && gourmand_mod::get( 'page-comments' );
    34
    4     if( comments_open() && $display && 'facebook' == gourmand_mod::get( 'comments-type' ) ){
     5        if( comments_open() && $display && 'facebook' == gourmand_mod::get( 'comments-type' ) ){
    56
    6         if( $appid = gourmand_mod::get( 'fb-app-id' ) && empty( $appid ) )
    7             $appid = '252156114891794';
    8 ?>
    9         <script>
    10             (function(d, s, id) {
    11                 var js, fjs = d.getElementsByTagName(s)[0];
    12                 if (d.getElementById(id)) return;
    13                 js = d.createElement(s); js.id = id;
    14                 js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=<?php echo esc_attr( $appid ); ?>&version=v2.3";
    15                 fjs.parentNode.insertBefore(js, fjs);
    16             }(document, 'script', 'facebook-jssdk'));
    17         </script>
    18 <?php
     7            if( $appid = gourmand_mod::get( 'fb-app-id' ) && empty( $appid ) )
     8                $appid = '252156114891794';
     9    ?>
     10            <script>
     11                (function(d, s, id) {
     12                    var js, fjs = d.getElementsByTagName(s)[0];
     13                    if (d.getElementById(id)) return;
     14                    js = d.createElement(s); js.id = id;
     15                    js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=<?php echo esc_attr( $appid ); ?>&version=v2.3";
     16                    fjs.parentNode.insertBefore(js, fjs);
     17                }(document, 'script', 'facebook-jssdk'));
     18            </script>
     19    <?php
     20        }
    1921    }
    2022?>
  • gourmand-light/trunk/templates/content/sections/about.php

    r1892718 r1895523  
    6565
    6666                    <?php if( gourmand_mod::get( 'front-page-content-about-col-2' ) ) : ?>
     67                        <?php
     68                            //gourmand-540
     69                            $src        = gourmand_mod::get( "front-page-content-about-col-2-image" );
     70                            $id         = gourmand_mod::get( "front-page-content-about-col-2-image-id" );
    6771
     72                            if( $id ){
     73                                $thumb      = get_post( $id );
     74                                $is_attach  = isset( $thumb -> ID ) && wp_attachment_is( 'image', $thumb );
     75
     76                                if( $is_attach ){
     77                                    $params = gourmand_image::attachment( $thumb -> ID, 'gourmand-540' );
     78                                    $src    = esc_url( $params[ 'src' ] );
     79                                }
     80                            }
     81                        ?>
    6882                        <div class="about item-col">
    69                             <?php if( ($src = gourmand_mod::get( 'front-page-content-about-col-2-image' )) && !empty( $src ) ) : ?>
     83                            <?php if( !empty( $src ) ) : ?>
    7084                                <img src="<?php echo esc_url( $src ); ?>" title="<?php echo esc_attr( gourmand_mod::get( 'front-page-content-about-col-2-title-text' ) ); ?>"/>
    7185                            <?php endif; ?>
     
    98112                    <?php if( gourmand_mod::get( 'front-page-content-about-col-3' ) ) : ?>
    99113
     114                        <?php
     115                            //gourmand-540
     116                            $src        = gourmand_mod::get( "front-page-content-about-col-3-image" );
     117                            $id         = gourmand_mod::get( "front-page-content-about-col-3-image-id" );
     118
     119                            if( $id ){
     120                                $thumb      = get_post( $id );
     121                                $is_attach  = isset( $thumb -> ID ) && wp_attachment_is( 'image', $thumb );
     122
     123                                if( $is_attach ){
     124                                    $params = gourmand_image::attachment( $thumb -> ID, 'gourmand-540' );
     125                                    $src    = esc_url( $params[ 'src' ] );
     126                                }
     127                            }
     128                        ?>
     129
    100130                        <div class="about item-col">
    101                             <?php if( ($src = gourmand_mod::get( 'front-page-content-about-col-3-image' )) && !empty( $src ) ) : ?>
     131                            <?php if( !empty( $src ) ) : ?>
    102132                                <img src="<?php echo esc_url( $src ); ?>" title="<?php echo esc_attr( gourmand_mod::get( 'front-page-content-about-col-3-title-text' ) ); ?>"/>
    103133                            <?php endif; ?>
  • gourmand-light/trunk/templates/content/sections/call-action.php

    r1892718 r1895523  
    7373
    7474                <?php
     75                    $media      = gourmand_mod::get( 'front-page-content-call-action-media' );
    7576                    $media_id   = gourmand_mod::get( 'front-page-content-call-action-media-id' );
    7677                    $media_url  = gourmand_mod::get( 'front-page-content-call-action-media-url' );
    7778
    78                     if( !(empty( $media_id ) && empty( $media_url )) ){
     79                    if( !( empty($media) && empty( $media_id ) && empty( $media_url ) ) ){
    7980                ?>
    8081
     
    8283
    8384                            <?php
     85                                $title          = strip_tags( gourmand_mod::get( 'front-page-content-call-action-title-editor' ) );
     86                                $subtitle       = gourmand_mod::get( 'front-page-content-call-action-subtitle-text' );
     87                                $url            = gourmand_mod::get( 'front-page-content-call-action-media-nav-url' );
     88                                $target         = gourmand_mod::get( 'front-page-content-call-action-media-nav-target' );
     89                                $blank          = '';
     90
     91                                if( $target )
     92                                    $blank = 'target="_blank"';
     93
    8494                                // Self Hosted Video
    8595                                if( absint( $media_id ) && gourmand_video::is_uploaded( $media_id ) ){
     
    8999                                // Responsive Image
    90100                                else if( absint( $media_id ) ) {
    91 
    92                                     $title          = strip_tags( gourmand_mod::get( 'front-page-content-call-action-title-editor' ) );
    93                                     $subtitle       = gourmand_mod::get( 'front-page-content-call-action-subtitle-text' );
    94                                     $url            = gourmand_mod::get( 'front-page-content-call-action-media-nav-url' );
    95                                     $target         = gourmand_mod::get( 'front-page-content-call-action-media-nav-target' );
    96                                     $blank          = '';
    97101
    98102                                    $image_markup   = gourmand_image::picture( absint( $media_id ), array(
     
    107111
    108112                                    if( !empty( $url ) ){
    109                                         if( $target )
    110                                             $blank = 'target="_blank"';
    111 
    112113                                        echo '<a href="' . esc_url( $url ) . '" title="' . esc_attr( $title . ' - ' . $subtitle ) . '" ' . $blank . '>' . $image_markup . '</a>';
    113114                                    }
     
    122123                                    gourmand_video::url( $media_url );
    123124                                }
     125
     126                                else if( !empty( $media ) ){
     127                                    if( !empty( $url ) ){
     128                                        echo '<a href="' . esc_url( $url ) . '" title="' . esc_attr( $title . ' - ' . $subtitle ) . '" ' . $blank . '>';
     129                                        echo '<img src="' . esc_url( $media ) . '" alt="' . esc_attr( $title . ' - ' . $subtitle ) . '"/>';
     130                                        echo '</a>';
     131                                    }
     132
     133                                    else{
     134                                        echo '<img src="' . esc_url( $media ) . '" alt="' . esc_attr( $title . ' - ' . $subtitle ) . '"/>';
     135                                    }
     136                                }
    124137                            ?>
    125138                        </div>
  • gourmand-light/trunk/templates/content/sections/services.php

    r1892718 r1895523  
    4343                                <?php $url = gourmand_mod::get( "front-page-content-services-{$i}-url" ); ?>
    4444
    45                                 <?php if( ($src = gourmand_mod::get( "front-page-content-services-{$i}-image" )) && !empty( $src ) ) : ?>
     45                                <?php
     46                                    $src        = gourmand_mod::get( "front-page-content-services-{$i}-image" );
     47                                    $id         = gourmand_mod::get( "front-page-content-services-{$i}-image-id" );
     48
     49                                    if( $id ){
     50                                        $thumb      = get_post( $id );
     51                                        $is_attach  = isset( $thumb -> ID ) && wp_attachment_is( 'image', $thumb );
     52
     53                                        if( $is_attach ){
     54                                            $params = gourmand_image::attachment( $thumb -> ID, 'gourmand-225' );
     55                                            $src    = esc_url( $params[ 'src' ] );
     56                                        }
     57                                    }
     58                                ?>
     59
     60                                <?php if( !empty( $src ) ) : ?>
    4661
    4762                                    <?php if( !empty( $url ) ) : ?>
  • gourmand-light/trunk/templates/content/sections/testimonials.php

    r1892718 r1895523  
    3838                                'author-email',
    3939                                'author-image',
     40                                'author-image-id',
    4041                                'author-name',
    4142                                'author-desc'
     
    7374                                </div>
    7475
    75                                 <div class="testimonial-identity">
    76                                     <div class="avatar">
     76                                <?php
     77                                    $src        = esc_url( $mods[ 'author-image' ] );
     78                                    $id         = absint( $mods[ 'author-image-id' ] );
    7779
    78                                         <?php if( !empty( $mods[ 'author-url' ] ) ) : ?>
    79                                             <a href="<?php echo esc_url( $mods[ 'author-url' ] ); ?>" target="_blank" title="<?php echo esc_attr( $author ); ?>">
    80                                                 <?php if( !empty( $mods[ 'author-image' ] ) ) : ?>
    81                                                     <img src="<?php echo esc_url( $mods[ 'author-image' ] ); ?>" alt="<?php echo esc_attr( $author ); ?>"/>
     80                                    if( $id ){
     81                                        $thumb      = get_post( $id );
     82                                        $is_attach  = isset( $thumb -> ID ) && wp_attachment_is( 'image', $thumb );
     83
     84                                        if( $is_attach ){
     85                                            $params = gourmand_image::attachment( $thumb -> ID, 'icon' );
     86                                            $src    = esc_url( $params[ 'src' ] );
     87                                        }
     88                                    }
     89
     90                                    $has_avatar = !empty( $mods[ 'author-email' ] ) && is_email( $mods[ 'author-email' ] ) || !empty( $src );
     91
     92                                    $classes = '';
     93
     94                                    if( $has_avatar )
     95                                        $classes = 'has-avatar';
     96                                ?>
     97
     98                                <div class="testimonial-identity <?php echo esc_attr( $classes ); ?>">
     99
     100                                    <?php if( $has_avatar ) : ?>
     101                                        <div class="avatar">
     102
     103                                            <?php if( !empty( $mods[ 'author-url' ] ) ) : ?>
     104                                                <a href="<?php echo esc_url( $mods[ 'author-url' ] ); ?>" target="_blank" title="<?php echo esc_attr( $author ); ?>">
     105                                                    <?php if( !empty( $src ) ) : ?>
     106                                                        <img src="<?php echo esc_url( $src ); ?>" alt="<?php echo esc_attr( $author ); ?>"/>
     107                                                    <?php else : ?>
     108                                                        <?php echo get_avatar( $mods[ 'author-email' ], 66, get_template_directory_uri() . '/assets/skins/default/img/default-avatar.png' ); ?>
     109                                                    <?php endif; ?>
     110                                                </a>
     111                                            <?php else : ?>
     112                                                <?php if( !empty( $src ) ) : ?>
     113                                                    <img src="<?php echo esc_url( $src ); ?>" alt="<?php echo esc_attr( $author ); ?>"/>
    82114                                                <?php else : ?>
    83115                                                    <?php echo get_avatar( $mods[ 'author-email' ], 66, get_template_directory_uri() . '/assets/skins/default/img/default-avatar.png' ); ?>
    84116                                                <?php endif; ?>
    85                                             </a>
    86                                         <?php else : ?>
    87                                             <?php if( !empty( $mods[ 'author-image' ] ) ) : ?>
    88                                                 <img src="<?php echo esc_url( $mods[ 'author-image' ] ); ?>" alt="<?php echo esc_attr( $author ); ?>"/>
    89                                             <?php else : ?>
    90                                                 <?php echo get_avatar( $mods[ 'author-email' ], 66, get_template_directory_uri() . '/assets/skins/default/img/default-avatar.png' ); ?>
    91117                                            <?php endif; ?>
    92                                         <?php endif; ?>
    93                                     </div>
     118
     119                                        </div>
     120                                    <?php endif; ?>
    94121
    95122                                    <cite id="front-page-content-testimonials-<?php echo absint( $i ); ?>-author-name">
  • gourmand-light/trunk/templates/header/banners/media/singular.php

    r1892718 r1895523  
    1414
    1515    $post_args      = gourmand_light_header::singular_media_args( $post );
    16     $has_post_media = gourmand_light_header::has_image( $post_args ) || gourmand_header::has_video( $post_args );
     16    $has_post_media = gourmand_light_header::has_image( $post_args ) || gourmand_light_header::has_video( $post_args );
    1717
    1818    // Header Markup
Note: See TracChangeset for help on using the changeset viewer.