Plugin Directory

Changeset 1046936


Ignore:
Timestamp:
12/17/2014 11:31:47 AM (11 years ago)
Author:
captaintheme
Message:

1.0.5

Location:
recipe-hero
Files:
248 added
15 edited

Legend:

Unmodified
Added
Removed
  • recipe-hero/trunk/README.txt

    r1044462 r1046936  
    55Requires at least: 3.8.0
    66Tested up to: 4.1.0
    7 Stable tag: 1.0.4
     7Stable tag: 1.0.5
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2626>
    2727> - [Recipe Hero Labels](https://wordpress.org/plugins/recipe-hero-labels/)<br />
     28> - [Recipe Hero Print](http://recipehero.in/extensions/print/)<br />
    2829> - [Recipe Hero Video](http://recipehero.in/extensions/video/)<br />
    2930> - [Recipe Hero Likes](http://recipehero.in/extensions/likes/)<br />
     
    134135== Changelog ==
    135136
     137= 1.0.5 =
     138* Bug Fix: Add lightbox gallery class to featured image regardless of gallery
     139* Bug Fix: Storefront compatible styles
     140* Bug Fix: Twenty Fifteen (2015) compatible styles
     141* Template Change: single/photo.php
     142* Template Change: global/wrapper-start.php
     143* Template Change: global/wrapper-end.php
     144* Template Change: single-recipe-reviews.php
     145* RH: Notice that shows after a while asking you to maybe review the plugin - please do! :)
     146
    136147= 1.0.4 =
    137148* Bug Fix: Fix 404s & other errors due to custom queries
     
    141152* Bug Fix: Include recipe_hero_enable_review_rating option in uninstall.php
    142153* Bug Fix: RH_Query class missing a public var - added it!
    143 * Buf Fix: Ingredients undefined index error
     154* Bug Fix: Ingredients undefined index error
    144155* Template Change: single/ingredients.php
    145156* Template Change: review.php / rating.php / single-recipe-reviews.php
  • recipe-hero/trunk/assets/frontend/css/rh-styles.css

    r1043378 r1046936  
    7171    padding-top: 0; }
    7272
     73.twentyfifteen .page-title {
     74  margin: 0 8.3333%;
     75  margin-bottom: 40px; }
     76.twentyfifteen article,
     77.twentyfifteen .hentry.has-post-thumbnail {
     78  padding: 8.3333% 50px 50px; }
     79.twentyfifteen h1.recipe-single-title,
     80.twentyfifteen h1.recipe-archive-title {
     81  margin-bottom: 0.4em; }
     82.twentyfifteen .recipe-single-meta,
     83.twentyfifteen .recipe-archive-meta {
     84  margin-bottom: 15px; }
     85
    7386/*
    7487Single / Archive Template
     
    135148    .recipe-hero article.recipe .recipe-archive-meta {
    136149      margin-top: 10px; }
    137       .recipe-hero article.recipe .recipe-single-meta .date, .recipe-hero article.recipe .recipe-single-meta .author, .recipe-hero article.recipe .recipe-single-meta .dashicons-testimonial, .recipe-hero article.recipe .recipe-single-meta .edit-link,
     150      .recipe-hero article.recipe .recipe-single-meta .date, .recipe-hero article.recipe .recipe-single-meta .author, .recipe-hero article.recipe .recipe-single-meta .recipe-hero-recipe-rating, .recipe-hero article.recipe .recipe-single-meta .edit-link,
    138151      .recipe-hero article.recipe .recipe-archive-meta .date,
    139152      .recipe-hero article.recipe .recipe-archive-meta .author,
    140       .recipe-hero article.recipe .recipe-archive-meta .dashicons-testimonial,
     153      .recipe-hero article.recipe .recipe-archive-meta .recipe-hero-recipe-rating,
    141154      .recipe-hero article.recipe .recipe-archive-meta .edit-link {
    142155        display: inline-block;
     
    145158        font-size: 14px;
    146159        margin-top: 0;
    147         line-height: 1.5; }
    148         .recipe-hero article.recipe .recipe-single-meta .date .dashicons, .recipe-hero article.recipe .recipe-single-meta .author .dashicons, .recipe-hero article.recipe .recipe-single-meta .dashicons-testimonial .dashicons, .recipe-hero article.recipe .recipe-single-meta .edit-link .dashicons,
     160        margin-bottom: 10px;
     161        line-height: 1.4; }
     162        .recipe-hero article.recipe .recipe-single-meta .date:before, .recipe-hero article.recipe .recipe-single-meta .author:before, .recipe-hero article.recipe .recipe-single-meta .recipe-hero-recipe-rating:before, .recipe-hero article.recipe .recipe-single-meta .edit-link:before,
     163        .recipe-hero article.recipe .recipe-archive-meta .date:before,
     164        .recipe-hero article.recipe .recipe-archive-meta .author:before,
     165        .recipe-hero article.recipe .recipe-archive-meta .recipe-hero-recipe-rating:before,
     166        .recipe-hero article.recipe .recipe-archive-meta .edit-link:before {
     167          display: none; }
     168        .recipe-hero article.recipe .recipe-single-meta .date .dashicons, .recipe-hero article.recipe .recipe-single-meta .author .dashicons, .recipe-hero article.recipe .recipe-single-meta .recipe-hero-recipe-rating .dashicons, .recipe-hero article.recipe .recipe-single-meta .edit-link .dashicons,
    149169        .recipe-hero article.recipe .recipe-archive-meta .date .dashicons,
    150170        .recipe-hero article.recipe .recipe-archive-meta .author .dashicons,
    151         .recipe-hero article.recipe .recipe-archive-meta .dashicons-testimonial .dashicons,
     171        .recipe-hero article.recipe .recipe-archive-meta .recipe-hero-recipe-rating .dashicons,
    152172        .recipe-hero article.recipe .recipe-archive-meta .edit-link .dashicons {
    153173          font-size: 16px;
    154174          vertical-align: bottom;
    155175          line-height: 1.35; }
    156         .recipe-hero article.recipe .recipe-single-meta .date a, .recipe-hero article.recipe .recipe-single-meta .author a, .recipe-hero article.recipe .recipe-single-meta .dashicons-testimonial a, .recipe-hero article.recipe .recipe-single-meta .edit-link a,
     176        .recipe-hero article.recipe .recipe-single-meta .date a, .recipe-hero article.recipe .recipe-single-meta .author a, .recipe-hero article.recipe .recipe-single-meta .recipe-hero-recipe-rating a, .recipe-hero article.recipe .recipe-single-meta .edit-link a,
    157177        .recipe-hero article.recipe .recipe-archive-meta .date a,
    158178        .recipe-hero article.recipe .recipe-archive-meta .author a,
    159         .recipe-hero article.recipe .recipe-archive-meta .dashicons-testimonial a,
     179        .recipe-hero article.recipe .recipe-archive-meta .recipe-hero-recipe-rating a,
    160180        .recipe-hero article.recipe .recipe-archive-meta .edit-link a {
    161181          float: none;
  • recipe-hero/trunk/assets/frontend/css/rh-styles.scss

    r1043378 r1046936  
    2929            }
    3030        }
     31    }
     32}
     33
     34// Twenty Fifteen
     35.twentyfifteen {
     36    .page-title {
     37        margin: 0 8.3333%;
     38        margin-bottom: 40px;
     39    }
     40    article,
     41    .hentry.has-post-thumbnail {
     42        padding: 8.3333% 50px 50px;
     43    }
     44    h1.recipe-single-title,
     45    h1.recipe-archive-title {
     46        margin-bottom: 0.4em;
     47    }
     48    .recipe-single-meta,
     49    .recipe-archive-meta {
     50        margin-bottom: 15px;
    3151    }
    3252}
     
    107127        .recipe-archive-meta {
    108128            margin-top: 10px;
    109             .date, .author, .dashicons-testimonial, .edit-link {
     129            .date, .author, .recipe-hero-recipe-rating, .edit-link {
    110130                display: inline-block;
    111131                vertical-align: bottom;
     
    113133                font-size: 14px;
    114134                margin-top: 0;
    115                 line-height: 1.5;
     135                margin-bottom: 10px;
     136                line-height: 1.4;
     137                &:before {
     138                    display: none;
     139                }
    116140                .dashicons {
    117141                    font-size: 16px;
  • recipe-hero/trunk/includes/admin/settings/class-rh-settings-integrations.php

    r1038648 r1046936  
    88 * @link      http://captaintheme.com
    99 * @copyright 2014 Captain Theme
    10  * @since     1.0.0
     10 * @since     1.0.5
    1111 */
    1212
     
    6262        }
    6363
    64         return apply_filters( 'recipe_heroget_sections_' . $this->id, $sections );
     64        return apply_filters( 'recipe_hero_get_sections_' . $this->id, $sections );
    6565    }
    6666
  • recipe-hero/trunk/includes/class-rh-install.php

    r1038648 r1046936  
    88 * @link      http://captaintheme.com
    99 * @copyright 2014 Captain Theme
     10 * @since     1.0.5
    1011 */
    1112
     
    3031        add_filter( 'plugin_action_links_' . RH_PLUGIN_BASENAME, array( $this, 'plugin_action_links' ) );
    3132        add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
     33
     34        add_action( 'plugins_loaded', array( $this, 'rating_reminder' ) );
    3235    }
    3336
     
    98101        // Update version
    99102        update_option( 'recipe_hero_version', RecipeHero::$version );
     103
     104        // Rating Reminder
     105        self::install_date();
    100106
    101107        // Flush rules after install
     
    185191    }
    186192
     193    /**
     194     * Rating Reminder (7 days after install)
     195     */
     196
     197    public function rating_reminder() {
     198
     199        // Admin notice hide catch
     200        add_action( 'admin_init', array( $this, 'catch_hide_notice' ) );
     201
     202        // Is admin notice hidden?
     203        $current_user = wp_get_current_user();
     204        $hide_notice  = get_user_meta( $current_user->ID, 'recipe_hero_hide_rating_reminder', true );
     205
     206        if ( current_user_can( 'install_plugins' ) && $hide_notice == '' ) {
     207            // Get installation date
     208            $datetime_install = $this->get_install_date();
     209            $datetime_past    = new DateTime( '-7 days' );
     210
     211            if ( $datetime_past >= $datetime_install ) {
     212                // 10 or more days ago, show admin notice
     213                add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
     214            }
     215        }
     216
     217    }
     218
     219    /**
     220     * Install Date
     221     */
     222
     223    private static function install_date() {
     224
     225        $datetime_now = new DateTime();
     226        $date_string  = $datetime_now->format( 'Y-m-d' );
     227        update_option( 'recipe_hero_install_date', $date_string );
     228
     229        return $date_string;
     230
     231    }
     232
     233    /**
     234     * Get Install Date
     235     */
     236
     237    private function get_install_date() {
     238
     239        $date_string = get_option( 'recipe_hero_install_date', '' );
     240        if ( $date_string == '' ) {
     241            // There is no install date, plugin was installed before version 1.2.0. Add it now.
     242            $date_string = self::install_date();
     243        }
     244
     245        return new DateTime( $date_string );
     246
     247    }
     248
     249    /**
     250     * Get the admin query string array
     251     */
     252
     253    private function get_admin_querystring_array() {
     254        parse_str( $_SERVER['QUERY_STRING'], $params );
     255
     256        return $params;
     257    }
     258
     259    /**
     260     * Catch / Hide Notice
     261     */
     262
     263    public function catch_hide_notice() {
     264        if ( isset( $_GET['recipe_hero_hide_rating_reminder'] ) && current_user_can( 'install_plugins' ) ) {
     265            // Add user meta
     266            global $current_user;
     267            add_user_meta( $current_user->ID, 'recipe_hero_hide_rating_reminder', '1', true );
     268
     269            // Build redirect URL
     270            $query_params = $this->get_admin_querystring_array();
     271            unset( $query_params['recipe_hero_hide_rating_reminder'] );
     272            $query_string = http_build_query( $query_params );
     273            if ( $query_string != '' ) {
     274                $query_string = '?' . $query_string;
     275            }
     276
     277            $redirect_url = 'http';
     278            if ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) {
     279                $redirect_url .= 's';
     280            }
     281            $redirect_url .= '://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . $query_string;
     282
     283            // Redirect
     284            wp_redirect( $redirect_url );
     285            exit;
     286        }
     287    }
     288
     289    /**
     290     * Display the admin notice
     291     */
     292
     293    public function display_admin_notice() {
     294
     295        $query_params = $this->get_admin_querystring_array();
     296        $query_string = '?' . http_build_query( array_merge( $query_params, array( 'recipe_hero_hide_rating_reminder' => '1' ) ) );
     297
     298        echo '<div class="updated"><p>';
     299        printf( __( 'You\'ve been using <b>Recipe Hero</b> for some time now, would you please consider reviewing on wordpress.org? :) <br /><br /> <a href="%s" target="_blank">Yes, take me there!</a> - <a href="%s">I\'ve already done this!</a>', 'recipe-hero' ), 'http://wordpress.org/support/view/plugin-reviews/recipe-hero', $query_string );
     300        echo "</p></div>";
     301
     302    }
     303
    187304}
    188305
  • recipe-hero/trunk/includes/class-rh-integrations.php

    r1038648 r1046936  
    1010 * @link      http://captaintheme.com
    1111 * @copyright 2014 Captain Theme
    12  * @since     1.0.0
     12 * @since     1.0.5
    1313 */
    1414class RH_Integrations {
    1515
    1616    /** @var array Array of integration classes */
    17     var $integrations = array();
     17    public $integrations = array();
    1818
    1919    /**
     
    3737
    3838        }
     39       
    3940
    4041    }
  • recipe-hero/trunk/languages/recipe-hero.pot

    r1043378 r1046936  
    22msgstr ""
    33"Project-Id-Version: Recipe Hero\n"
    4 "POT-Creation-Date: 2014-12-12 18:27+0700\n"
    5 "PO-Revision-Date: 2014-12-12 18:27+0700\n"
     4"POT-Creation-Date: 2014-12-15 00:33+0700\n"
     5"PO-Revision-Date: 2014-12-15 00:33+0700\n"
    66"Last-Translator: Bryce <[email protected]>\n"
    77"Language-Team: Recipe Hero <[email protected]>\n"
     
    1818
    1919#: ../includes/abstracts/abstract-rh-recipe.php:275
    20 #: ../templates/single/rating.php:38
     20#: ../templates/single/rating.php:39
    2121#, php-format
    2222msgid "Rated %s out of 5"
     
    2424
    2525#: ../includes/abstracts/abstract-rh-recipe.php:277
    26 #: ../templates/single/rating.php:40
     26#: ../templates/single/rating.php:41
    2727msgid "out of 5"
    2828msgstr ""
     
    4545#: ../includes/admin/class-rh-admin-menus.php:42
    4646#: ../includes/admin/class-rh-admin-welcome.php:217
    47 #: ../includes/class-rh-install.php:161
     47#: ../includes/class-rh-install.php:167
    4848msgid "Settings"
    4949msgstr ""
     
    253253
    254254#: ../includes/admin/class-rh-admin-welcome.php:218
    255 #: ../includes/class-rh-install.php:177
     255#: ../includes/class-rh-install.php:183
    256256msgid "Docs"
    257257msgstr ""
     
    456456
    457457#: ../includes/admin/rh-columns.php:35 ../includes/rh-fields.php:122
    458 #: ../templates/single/ingredients.php:22
     458#: ../templates/single/ingredients.php:23
    459459msgid "Ingredients"
    460460msgstr ""
     
    503503msgstr ""
    504504
    505 #: ../includes/admin/rh-help-tab.php:81 ../includes/class-rh-install.php:178
     505#: ../includes/admin/rh-help-tab.php:81 ../includes/class-rh-install.php:184
    506506msgid "Support"
    507507msgstr ""
     
    658658msgstr ""
    659659
    660 #: ../includes/class-rh-install.php:161
     660#: ../includes/class-rh-install.php:167
    661661msgid "View Recipe Hero Settings"
    662662msgstr ""
    663663
    664 #: ../includes/class-rh-install.php:177
     664#: ../includes/class-rh-install.php:183
    665665msgid "View Recipe Hero Documentation"
    666666msgstr ""
    667667
    668 #: ../includes/class-rh-install.php:178
     668#: ../includes/class-rh-install.php:184
    669669msgid "Get Support for Recipe Hero"
     670msgstr ""
     671
     672#: ../includes/class-rh-install.php:299
     673#, php-format
     674msgid ""
     675"You've been using <b>Recipe Hero</b> for some time now, would you please "
     676"consider reviewing on wordpress.org? :) <br /><br /> <a href=\"%s\" target="
     677"\"_blank\">Yes, take me there!</a> - <a href=\"%s\">I've already done this!</"
     678"a>"
    670679msgstr ""
    671680
     
    793802msgstr ""
    794803
    795 #: ../includes/class-rh-post-types.php:143 ../templates/archive/meta.php:35
     804#: ../includes/class-rh-post-types.php:143 ../templates/archive/meta.php:33
    796805#: ../templates/single/meta.php:34
    797806msgid "Edit Recipe"
     
    13081317msgstr ""
    13091318
    1310 #: ../templates/archive/meta.php:29
    1311 msgid "0 Reviews"
    1312 msgstr ""
    1313 
    1314 #: ../templates/archive/meta.php:29
    1315 msgid "1 Review"
    1316 msgstr ""
    1317 
    1318 #: ../templates/archive/meta.php:29
    1319 msgid "% Reviews"
    1320 msgstr ""
    1321 
    13221319#: ../templates/loop/no-recipes-found.php:12
    13231320msgid "Sorry, there are no recipes to show!"
     
    14041401msgstr ""
    14051402
    1406 #: ../templates/single/rating.php:22 ../templates/single/rating.php:35
     1403#: ../templates/single/rating.php:24 ../templates/single/rating.php:36
    14071404#, php-format
    14081405msgid "%s Review"
  • recipe-hero/trunk/recipe-hero.php

    r1044462 r1046936  
    1212 * Plugin URI:        http://recipehero.in/
    1313 * Description:       The last recipe plugin you'll ever need.
    14  * Version:           1.0.4
     14 * Version:           1.0.5
    1515 * Author:            Bryce Adams
    1616 * Author URI:        http://bryce.se/
     
    3737 *
    3838 * @class RecipeHero
    39  * @version 1.0.4
     39 * @version 1.0.5
    4040 */
    4141
     
    4545     * Plugin version, used for cache-busting of style and script file references.
    4646     *
    47      * @since   1.0.4
     47     * @since   1.0.5
    4848     *
    4949     * @var     string
    5050     */
    51     public static $version = '1.0.4';
     51    public static $version = '1.0.5';
    5252
    5353    /**
     
    198198        // Abstract Classes
    199199        include_once( 'includes/abstracts/abstract-rh-recipe.php' );
     200        include_once( 'includes/abstracts/abstract-rh-settings-api.php' );
     201        include_once( 'includes/abstracts/abstract-rh-integration.php' );
    200202
    201203        // Query Class
  • recipe-hero/trunk/templates/global/wrapper-end.php

    r948102 r1046936  
    88 * @link      http://captaintheme.com
    99 * @copyright 2014 Captain Theme
     10 * @version   1.0.5
    1011 */
    1112
     
    2930        get_sidebar( 'content' );
    3031        break;
     32    case 'twentyfifteen' :
     33        echo '</div></div>';
     34        break;
     35    case 'storefront' :
     36        echo '</main></div>';
     37        break;
    3138    default :
    3239        echo '</div></div>';
  • recipe-hero/trunk/templates/global/wrapper-start.php

    r1040292 r1046936  
    88 * @link      http://captaintheme.com
    99 * @copyright 2014 Captain Theme
    10  * @version   1.0.0
     10 * @version   1.0.5
    1111 */
    1212
     
    3131        echo '<div id="primary" class="content-area"><div id="content" class="site-content twentyfourteen"><div class="tfrh">';
    3232        break;
     33    case 'twentyfifteen' :
     34        echo '<div id="primary" role="main" class="content-area twentyfifteen"><div id="main" class="site-main t15wc">';
     35        break;
     36    case 'storefront' :
     37        echo '<div id="primary" class="content-area"><main id="main" class="site-main" role="main">';
     38        break;
    3339    default :
    3440        echo '<div id="container"><div id="content" class="content';
  • recipe-hero/trunk/templates/single-recipe-reviews.php

    r1043378 r1046936  
    2020?>
    2121<div id="reviews">
    22     <div id="comments">
     22    <div id="comments" class="comments-area">
    2323        <h2><?php
    2424            if ( get_option( 'recipe_hero_enable_review_rating' ) === 'yes' && ( $count = $recipe->get_rating_count() ) )
     
    5252    </div>
    5353
    54     <div id="review_form_wrapper">
     54    <div id="review_form_wrapper" class="comments-area">
    5555        <div id="review_form">
    5656            <?php
  • recipe-hero/trunk/templates/single/photo.php

    r1038648 r1046936  
    55 * @package   Recipe Hero
    66 * @author    Captain Theme <[email protected]>
    7  * @version       0.8.0
     7 * @version   1.0.5
    88 */
    99
     
    3232            $attachment_count = count( $recipe->get_gallery_attachment_ids() );
    3333
    34             if ( $attachment_count > 0 ) {
    35                 $gallery = 'recipe-gallery';
    36             } else {
    37                 $gallery = '';
    38             }
     34            $gallery = 'recipe-gallery';
    3935
    4036            echo apply_filters( 'recipe_hero_single_recipe_image_html', sprintf( '<a href="%s" itemprop="image" class="recipe-hero-main-image zoom ' . $gallery . '" title="%s">%s</a>', $image_link, $image_title, $image ), $post->ID );
  • recipe-hero/trunk/templates/single/rating.php

    r1044356 r1046936  
    2222
    2323    if ( comments_open() ) : ?>
     24    <span class="recipe-hero-recipe-rating">
    2425        <span class="dashicons dashicons-testimonial"></span> <a href="<?php echo $link; ?>" rel="nofollow"><?php printf( _n( '%s Review', '%s Reviews', $count, 'recipe-hero' ), '<span itemprop="ratingCount" class="count">' . $count . '</span>' ); ?></a>
     26    </span>
    2527    <?php endif;
    2628
Note: See TracChangeset for help on using the changeset viewer.