Plugin Directory

Changeset 1043378


Ignore:
Timestamp:
12/12/2014 11:43:35 AM (11 years ago)
Author:
captaintheme
Message:

1.0.2

Location:
recipe-hero
Files:
253 added
3 deleted
29 edited

Legend:

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

    r1041276 r1043378  
    55Requires at least: 3.8.0
    66Tested up to: 4.1.0
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    134134
    135135= 1.0.2 =
    136 * Bug Fix: Servings Type setting field made a bit bigger
     136* New: Recipe Reviews / Ratings
     137* New: Rating schema.org markup
     138* Bug Fix: 'Servings type' setting field made a bit bigger
     139* Bug Fix: Ingredients list style fixes
     140* Bug Fix: Template Engine improvements
     141* Bug Fix: Extension Page Styling
     142* Bug Fix: Shortcode style / comment fixes
    137143* i18n: Couple translation fixes and .pot files used now
    138144
  • recipe-hero/trunk/assets/admin/css/admin.css

    r1038648 r1043378  
    232232    display: inline-block;
    233233    margin: 0 10px 10px 0 !important;
    234     padding: 0;
     234    padding: 0 0 36px;
    235235    vertical-align: top;
    236     width: 250px;
     236    width: 280px;
    237237    border: 1px solid #ddd;
    238238    -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
     
    250250      background: #fff;
    251251      border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
    252     .recipe_hero_extensions_wrap .products li h2 {
     252      .recipe_hero_extensions_wrap .products li img:hover {
     253        opacity: 0.8; }
     254    .recipe_hero_extensions_wrap .products li h3 {
    253255      margin: 0 !important;
    254256      padding: 10px 10px !important;
     
    259261      text-align: center;
    260262      position: absolute;
    261       width: 230px;
    262       top: 0;
     263      width: 260px;
     264      bottom: 0;
    263265      left: 0;
    264266      font-size: 16px;
  • recipe-hero/trunk/assets/admin/css/admin.scss

    r1038648 r1043378  
    278278            display: inline-block;
    279279            margin: 0 10px 10px 0 !important;
    280             padding: 0;
     280            padding: 0 0 36px;
    281281            vertical-align: top;
    282             width: 250px;
     282            width: 280px;
    283283            border: 1px solid #ddd;
    284284            -webkit-box-shadow:
     
    301301                background: #fff;
    302302                border-bottom: 1px solid rgba(0,0,0,0.1);
    303             }
    304             h2 {
     303                &:hover {
     304                    opacity: 0.8;
     305                }
     306            }
     307            h3 {
    305308                margin: 0 !important;
    306309                padding: 10px 10px !important;
     
    311314                text-align: center;
    312315                position: absolute;
    313                 width: 230px;
    314                 top: 0;
     316                width: 260px;
     317                bottom: 0;
    315318                left: 0;
    316319                font-size: 16px;
  • recipe-hero/trunk/assets/frontend/css/rh-styles.css

    r1040292 r1043378  
    116116        color: #8a7e88; }
    117117
    118 article.recipe {
    119   line-height: 1.4; }
    120   article.recipe h4 {
    121     font-size: 23px;
    122     margin-bottom: 18px;
    123     font-weight: 600; }
    124   article.recipe .recipe-single-title,
    125   article.recipe .recipe-archive-title {
    126     font-size: 35px; }
    127   article.recipe .recipe-single-meta,
    128   article.recipe .recipe-archive-meta {
    129     margin-top: 10px; }
    130     article.recipe .recipe-single-meta .date, article.recipe .recipe-single-meta .author, article.recipe .recipe-single-meta .comments-link, article.recipe .recipe-single-meta .edit-link,
    131     article.recipe .recipe-archive-meta .date,
    132     article.recipe .recipe-archive-meta .author,
    133     article.recipe .recipe-archive-meta .comments-link,
    134     article.recipe .recipe-archive-meta .edit-link {
     118.recipe-hero {
     119    /**
     120   * Reviews
     121   */
     122  /**
     123   * Star ratings
     124   */ }
     125  .recipe-hero article.recipe {
     126    line-height: 1.4; }
     127    .recipe-hero article.recipe h4 {
     128      font-size: 23px;
     129      margin-bottom: 18px;
     130      font-weight: 600; }
     131    .recipe-hero article.recipe .recipe-single-title,
     132    .recipe-hero article.recipe .recipe-archive-title {
     133      font-size: 35px; }
     134    .recipe-hero article.recipe .recipe-single-meta,
     135    .recipe-hero article.recipe .recipe-archive-meta {
     136      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,
     138      .recipe-hero article.recipe .recipe-archive-meta .date,
     139      .recipe-hero article.recipe .recipe-archive-meta .author,
     140      .recipe-hero article.recipe .recipe-archive-meta .dashicons-testimonial,
     141      .recipe-hero article.recipe .recipe-archive-meta .edit-link {
     142        display: inline-block;
     143        vertical-align: bottom;
     144        padding-left: 15px;
     145        font-size: 14px;
     146        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,
     149        .recipe-hero article.recipe .recipe-archive-meta .date .dashicons,
     150        .recipe-hero article.recipe .recipe-archive-meta .author .dashicons,
     151        .recipe-hero article.recipe .recipe-archive-meta .dashicons-testimonial .dashicons,
     152        .recipe-hero article.recipe .recipe-archive-meta .edit-link .dashicons {
     153          font-size: 16px;
     154          vertical-align: bottom;
     155          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,
     157        .recipe-hero article.recipe .recipe-archive-meta .date a,
     158        .recipe-hero article.recipe .recipe-archive-meta .author a,
     159        .recipe-hero article.recipe .recipe-archive-meta .dashicons-testimonial a,
     160        .recipe-hero article.recipe .recipe-archive-meta .edit-link a {
     161          float: none;
     162          font-size: 14px; }
     163      .recipe-hero article.recipe .recipe-single-meta .date,
     164      .recipe-hero article.recipe .recipe-archive-meta .date {
     165        padding-left: 0; }
     166      .recipe-hero article.recipe .recipe-single-meta .comments-link a:before,
     167      .recipe-hero article.recipe .recipe-archive-meta .comments-link a:before {
     168        content: none; }
     169    .recipe-hero article.recipe .images {
     170      margin-bottom: 10px; }
     171      .recipe-hero article.recipe .images .thumbnails {
     172        margin-top: 5px;
     173        *zoom: 1; }
     174        .recipe-hero article.recipe .images .thumbnails:before, .recipe-hero article.recipe .images .thumbnails:after {
     175          content: " ";
     176          display: table; }
     177        .recipe-hero article.recipe .images .thumbnails:after {
     178          clear: both; }
     179        .recipe-hero article.recipe .images .thumbnails a {
     180          float: left; }
     181          .recipe-hero article.recipe .images .thumbnails a.columns-3 {
     182            width: 30.75%;
     183            margin-right: 3.8%; }
     184          .recipe-hero article.recipe .images .thumbnails a.columns-4 {
     185            width: 22.85%;
     186            margin-right: 2.55%; }
     187          .recipe-hero article.recipe .images .thumbnails a.columns-5 {
     188            width: 17.45%;
     189            margin-right: 2.2%; }
     190          .recipe-hero article.recipe .images .thumbnails a.columns-6 {
     191            width: 14.2%;
     192            margin-right: 2.8%; }
     193          .recipe-hero article.recipe .images .thumbnails a img {
     194            display: block;
     195            width: 100%;
     196            margin-bottom: 10px;
     197            height: auto; }
     198        .recipe-hero article.recipe .images .thumbnails a.last {
     199          margin-right: 0; }
     200        .recipe-hero article.recipe .images .thumbnails a.first {
     201          clear: both; }
     202      .recipe-hero article.recipe .images .recipe-schema-thumb {
     203        display: none; }
     204    .recipe-hero article.recipe .recipe-single-tax .cuisine,
     205    .recipe-hero article.recipe .recipe-single-tax .course,
     206    .recipe-hero article.recipe .recipe-archive-tax .cuisine,
     207    .recipe-hero article.recipe .recipe-archive-tax .course {
    135208      display: inline-block;
    136       vertical-align: bottom;
    137       padding-left: 15px;
     209      padding-right: 15px; }
     210      .recipe-hero article.recipe .recipe-single-tax .cuisine strong,
     211      .recipe-hero article.recipe .recipe-single-tax .course strong,
     212      .recipe-hero article.recipe .recipe-archive-tax .cuisine strong,
     213      .recipe-hero article.recipe .recipe-archive-tax .course strong {
     214        font-size: 16px; }
     215        .recipe-hero article.recipe .recipe-single-tax .cuisine strong:after,
     216        .recipe-hero article.recipe .recipe-single-tax .course strong:after,
     217        .recipe-hero article.recipe .recipe-archive-tax .cuisine strong:after,
     218        .recipe-hero article.recipe .recipe-archive-tax .course strong:after {
     219          content: ':'; }
     220      .recipe-hero article.recipe .recipe-single-tax .cuisine ul,
     221      .recipe-hero article.recipe .recipe-single-tax .course ul,
     222      .recipe-hero article.recipe .recipe-archive-tax .cuisine ul,
     223      .recipe-hero article.recipe .recipe-archive-tax .course ul {
     224        display: inline-block;
     225        list-style-type: none;
     226        margin-left: 5px;
     227        margin-bottom: 0; }
     228        .recipe-hero article.recipe .recipe-single-tax .cuisine ul li,
     229        .recipe-hero article.recipe .recipe-single-tax .course ul li,
     230        .recipe-hero article.recipe .recipe-archive-tax .cuisine ul li,
     231        .recipe-hero article.recipe .recipe-archive-tax .course ul li {
     232          display: inline-block;
     233          padding: 3px 8px;
     234          margin: 0 5px 0 0;
     235          background: #fff;
     236          border: 1px solid #ddd;
     237          -moz-transition: all 200ms ease;
     238          -o-transition: all 200ms ease;
     239          -webkit-transition: all 200ms ease;
     240          -ms-transition: all 200ms ease;
     241          transition: all 200ms ease; }
     242          .recipe-hero article.recipe .recipe-single-tax .cuisine ul li a,
     243          .recipe-hero article.recipe .recipe-single-tax .course ul li a,
     244          .recipe-hero article.recipe .recipe-archive-tax .cuisine ul li a,
     245          .recipe-hero article.recipe .recipe-archive-tax .course ul li a {
     246            text-decoration: none; }
     247          .recipe-hero article.recipe .recipe-single-tax .cuisine ul li:hover,
     248          .recipe-hero article.recipe .recipe-single-tax .course ul li:hover,
     249          .recipe-hero article.recipe .recipe-archive-tax .cuisine ul li:hover,
     250          .recipe-hero article.recipe .recipe-archive-tax .course ul li:hover {
     251            background: #fbfbfb; }
     252    .recipe-hero article.recipe .recipe-single-tax .cuisine,
     253    .recipe-hero article.recipe .recipe-archive-tax .cuisine {
     254      border-right: 1px solid #ddd;
     255      padding-right: 15px;
     256      margin-right: 15px; }
     257    .recipe-hero article.recipe .recipe-single-details,
     258    .recipe-hero article.recipe .recipe-archive-details {
     259      margin-top: 20px; }
     260      .recipe-hero article.recipe .recipe-single-details > div,
     261      .recipe-hero article.recipe .recipe-archive-details > div {
     262        margin-bottom: 5px; }
     263      .recipe-hero article.recipe .recipe-single-details strong,
     264      .recipe-hero article.recipe .recipe-archive-details strong {
     265        font-size: 16px;
     266        display: block;
     267        margin-bottom: 5px; }
     268      .recipe-hero article.recipe .recipe-single-details .serves, .recipe-hero article.recipe .recipe-single-details .equipment, .recipe-hero article.recipe .recipe-single-details .prep-time, .recipe-hero article.recipe .recipe-single-details .cook-time, .recipe-hero article.recipe .recipe-single-details .total-time,
     269      .recipe-hero article.recipe .recipe-archive-details .serves,
     270      .recipe-hero article.recipe .recipe-archive-details .equipment,
     271      .recipe-hero article.recipe .recipe-archive-details .prep-time,
     272      .recipe-hero article.recipe .recipe-archive-details .cook-time,
     273      .recipe-hero article.recipe .recipe-archive-details .total-time {
     274        font-size: 14px; }
     275      .recipe-hero article.recipe .recipe-single-details .prep-time span, .recipe-hero article.recipe .recipe-single-details .cook-time span,
     276      .recipe-hero article.recipe .recipe-archive-details .prep-time span,
     277      .recipe-hero article.recipe .recipe-archive-details .cook-time span {
     278        font-size: 17px;
     279        vertical-align: middle; }
     280      .recipe-hero article.recipe .recipe-single-details .total-time,
     281      .recipe-hero article.recipe .recipe-archive-details .total-time {
     282        font-weight: bold; }
     283    .recipe-hero article.recipe .recipe-archive-details > div {
     284      margin-bottom: 15px; }
     285    .recipe-hero article.recipe .recipe-single-content {
     286      font-size: 16px;
     287      margin-top: 25px;
     288      line-height: 1.6; }
     289      .recipe-hero article.recipe .recipe-single-content p {
     290        margin-bottom: 12px; }
     291    .recipe-hero article.recipe .recipe-archive-content {
     292      font-size: 16px;
     293      line-height: 1.6; }
     294      .recipe-hero article.recipe .recipe-archive-content p {
     295        margin-bottom: 12px; }
     296      .recipe-hero article.recipe .recipe-archive-content .sharedaddy {
     297        margin-top: 15px; }
     298    .recipe-hero article.recipe .recipe-single-ingredients h4 {
     299      margin-top: 25px; }
     300    .recipe-hero article.recipe .recipe-single-ingredients ul.ingredients-list {
     301      margin-left: 0;
     302      padding-left: 0;
    138303      font-size: 14px;
    139       margin-top: 0;
    140       line-height: 1.5; }
    141       article.recipe .recipe-single-meta .date .dashicons, article.recipe .recipe-single-meta .author .dashicons, article.recipe .recipe-single-meta .comments-link .dashicons, article.recipe .recipe-single-meta .edit-link .dashicons,
    142       article.recipe .recipe-archive-meta .date .dashicons,
    143       article.recipe .recipe-archive-meta .author .dashicons,
    144       article.recipe .recipe-archive-meta .comments-link .dashicons,
    145       article.recipe .recipe-archive-meta .edit-link .dashicons {
    146         font-size: 16px;
    147         vertical-align: bottom;
    148         line-height: 1.35; }
    149       article.recipe .recipe-single-meta .date a, article.recipe .recipe-single-meta .author a, article.recipe .recipe-single-meta .comments-link a, article.recipe .recipe-single-meta .edit-link a,
    150       article.recipe .recipe-archive-meta .date a,
    151       article.recipe .recipe-archive-meta .author a,
    152       article.recipe .recipe-archive-meta .comments-link a,
    153       article.recipe .recipe-archive-meta .edit-link a {
    154         float: none;
    155         font-size: 14px; }
    156     article.recipe .recipe-single-meta .date,
    157     article.recipe .recipe-archive-meta .date {
    158       padding-left: 0; }
    159     article.recipe .recipe-single-meta .comments-link a:before,
    160     article.recipe .recipe-archive-meta .comments-link a:before {
    161       content: none; }
    162   article.recipe .images {
    163     margin-bottom: 10px; }
    164     article.recipe .images .thumbnails {
    165       margin-top: 5px;
    166       *zoom: 1; }
    167       article.recipe .images .thumbnails:before, article.recipe .images .thumbnails:after {
    168         content: " ";
    169         display: table; }
    170       article.recipe .images .thumbnails:after {
    171         clear: both; }
    172       article.recipe .images .thumbnails a {
    173         float: left; }
    174         article.recipe .images .thumbnails a.columns-3 {
    175           width: 30.75%;
    176           margin-right: 3.8%; }
    177         article.recipe .images .thumbnails a.columns-4 {
    178           width: 22.85%;
    179           margin-right: 2.55%; }
    180         article.recipe .images .thumbnails a.columns-5 {
    181           width: 17.45%;
    182           margin-right: 2.2%; }
    183         article.recipe .images .thumbnails a.columns-6 {
    184           width: 14.2%;
    185           margin-right: 2.8%; }
    186         article.recipe .images .thumbnails a img {
    187           display: block;
    188           width: 100%;
    189           margin-bottom: 10px;
    190           height: auto; }
    191       article.recipe .images .thumbnails a.last {
    192         margin-right: 0; }
    193       article.recipe .images .thumbnails a.first {
    194         clear: both; }
    195     article.recipe .images .recipe-schema-thumb {
    196       display: none; }
    197   article.recipe .recipe-single-tax .cuisine,
    198   article.recipe .recipe-single-tax .course,
    199   article.recipe .recipe-archive-tax .cuisine,
    200   article.recipe .recipe-archive-tax .course {
    201     display: inline-block;
    202     padding-right: 15px; }
    203     article.recipe .recipe-single-tax .cuisine strong,
    204     article.recipe .recipe-single-tax .course strong,
    205     article.recipe .recipe-archive-tax .cuisine strong,
    206     article.recipe .recipe-archive-tax .course strong {
    207       font-size: 16px; }
    208       article.recipe .recipe-single-tax .cuisine strong:after,
    209       article.recipe .recipe-single-tax .course strong:after,
    210       article.recipe .recipe-archive-tax .cuisine strong:after,
    211       article.recipe .recipe-archive-tax .course strong:after {
    212         content: ':'; }
    213     article.recipe .recipe-single-tax .cuisine ul,
    214     article.recipe .recipe-single-tax .course ul,
    215     article.recipe .recipe-archive-tax .cuisine ul,
    216     article.recipe .recipe-archive-tax .course ul {
     304      list-style: none; }
     305      .recipe-hero article.recipe .recipe-single-ingredients ul.ingredients-list li.ingredients-item {
     306        padding-bottom: 5px;
     307        margin-left: 0; }
     308        .recipe-hero article.recipe .recipe-single-ingredients ul.ingredients-list li.ingredients-item label {
     309          display: inline-block; }
     310        .recipe-hero article.recipe .recipe-single-ingredients ul.ingredients-list li.ingredients-item .amount {
     311          text-align: right;
     312          min-width: 20%;
     313          display: inline-block;
     314          font-weight: bold;
     315          vertical-align: top; }
     316        .recipe-hero article.recipe .recipe-single-ingredients ul.ingredients-list li.ingredients-item .name {
     317          text-align: left;
     318          display: inline-block;
     319          padding-left: 5px;
     320          vertical-align: top; }
     321    .recipe-hero article.recipe .recipe-single-instructions h4 {
     322      margin-top: 25px; }
     323    .recipe-hero article.recipe .recipe-single-instructions ol.steps-list {
     324      list-style-type: decimal; }
     325      .recipe-hero article.recipe .recipe-single-instructions ol.steps-list li.steps-item {
     326        margin-bottom: 30px; }
     327        .recipe-hero article.recipe .recipe-single-instructions ol.steps-list li.steps-item p {
     328          margin-bottom: 15px;
     329          font-size: 14px;
     330          line-height: 1.6; }
     331        .recipe-hero article.recipe .recipe-single-instructions ol.steps-list li.steps-item img.step-image {
     332          max-width: 100%; }
     333    .recipe-hero article.recipe .recipe-single-nutrition {
     334      font-size: 14px;
     335      line-height: 1.6;
     336      margin-bottom: 15px; }
     337  .recipe-hero #reviews h2 small {
     338    float: right;
     339    color: #515151;
     340    font-size: 15px;
     341    margin: 10px 0 0 0; }
     342    .recipe-hero #reviews h2 small a {
     343      text-decoration: none;
     344      color: #515151; }
     345  .recipe-hero #reviews h3 {
     346    margin: 0; }
     347  .recipe-hero #reviews #respond {
     348    margin: 0;
     349    border: 0;
     350    padding: 0; }
     351  .recipe-hero #reviews #comment {
     352    height: 75px; }
     353  .recipe-hero #reviews #comments .add_review {
     354    *zoom: 1; }
     355    .recipe-hero #reviews #comments .add_review:before, .recipe-hero #reviews #comments .add_review:after {
     356      content: " ";
     357      display: table; }
     358    .recipe-hero #reviews #comments .add_review:after {
     359      clear: both; }
     360  .recipe-hero #reviews #comments h2 {
     361    clear: none; }
     362  .recipe-hero #reviews #comments ol.commentlist {
     363    *zoom: 1;
     364    margin: 0;
     365    width: 100%;
     366    background: none;
     367    list-style: none;
     368    margin-top: 25px; }
     369    .recipe-hero #reviews #comments ol.commentlist:before, .recipe-hero #reviews #comments ol.commentlist:after {
     370      content: " ";
     371      display: table; }
     372    .recipe-hero #reviews #comments ol.commentlist:after {
     373      clear: both; }
     374    .recipe-hero #reviews #comments ol.commentlist li {
     375      padding: 0;
     376      margin: 0 0 20px;
     377      border: 0;
     378      position: relative;
     379      background: 0;
     380      border: 0; }
     381      .recipe-hero #reviews #comments ol.commentlist li .meta {
     382        color: #515151;
     383        font-size: 0.75em; }
     384      .recipe-hero #reviews #comments ol.commentlist li img.avatar {
     385        float: left;
     386        position: absolute;
     387        top: 0;
     388        left: 0;
     389        padding: 2px;
     390        width: 32px;
     391        height: auto;
     392        background: #ebe9eb;
     393        border: 1px solid #e4e1e3;
     394        margin: 0;
     395        box-shadow: none;
     396        border-radius: 100%; }
     397      .recipe-hero #reviews #comments ol.commentlist li .comment-text {
     398        margin: 0 0 0 50px;
     399        border: 1px solid #e4e1e3;
     400        border-radius: 2px;
     401        padding: 1em 1em 0;
     402        *zoom: 1; }
     403        .recipe-hero #reviews #comments ol.commentlist li .comment-text:before, .recipe-hero #reviews #comments ol.commentlist li .comment-text:after {
     404          content: " ";
     405          display: table; }
     406        .recipe-hero #reviews #comments ol.commentlist li .comment-text:after {
     407          clear: both; }
     408        .recipe-hero #reviews #comments ol.commentlist li .comment-text p {
     409          margin: 0 0 1em; }
     410        .recipe-hero #reviews #comments ol.commentlist li .comment-text p.meta {
     411          font-size: 0.83em; }
     412          .recipe-hero #reviews #comments ol.commentlist li .comment-text p.meta .time {
     413            color: #888; }
     414    .recipe-hero #reviews #comments ol.commentlist ul.children {
     415      list-style: none outside;
     416      margin: 20px 0 0 50px; }
     417      .recipe-hero #reviews #comments ol.commentlist ul.children .star-rating {
     418        display: none; }
     419    .recipe-hero #reviews #comments ol.commentlist #respond {
     420      border: 1px solid #e4e1e3;
     421      border-radius: 4px;
     422      padding: 1em 1em 0;
     423      margin: 20px 0 0 50px; }
     424  .recipe-hero #reviews #comments .commentlist > li:before {
     425    content: ""; }
     426  .recipe-hero .star-rating {
     427    float: right;
     428    position: relative;
     429    height: 1em;
     430    line-height: 1;
     431    font-size: 1em;
     432    width: 8.4em; }
     433    .recipe-hero .star-rating .dashicons {
     434      color: #e3cf7a; }
     435      .recipe-hero .star-rating .dashicons.dashicons-star-empty {
     436        color: #ccc; }
     437  .recipe-hero #review_form #respond {
     438    *zoom: 1;
     439    position: static;
     440    margin: 0;
     441    width: auto;
     442    padding: 0 0 0;
     443    background: transparent none;
     444    border: 0; }
     445    .recipe-hero #review_form #respond:before, .recipe-hero #review_form #respond:after {
     446      content: " ";
     447      display: table; }
     448    .recipe-hero #review_form #respond:after {
     449      clear: both; }
     450    .recipe-hero #review_form #respond p {
     451      margin: 0 0 15px; }
     452    .recipe-hero #review_form #respond .form-submit input {
     453      left: auto; }
     454    .recipe-hero #review_form #respond textarea {
     455      -webkit-box-sizing: border-box;
     456      /* Safari/Chrome, other WebKit */
     457      -moz-box-sizing: border-box;
     458      /* Firefox, other Gecko */
     459      box-sizing: border-box;
     460      /* Opera/IE 8+ */
     461      width: 100%; }
     462  .recipe-hero p.stars {
     463    position: relative;
     464    font-size: 1em; }
     465    .recipe-hero p.stars a {
    217466      display: inline-block;
    218       list-style-type: none;
    219       margin-left: 5px;
    220       margin-bottom: 0; }
    221       article.recipe .recipe-single-tax .cuisine ul li,
    222       article.recipe .recipe-single-tax .course ul li,
    223       article.recipe .recipe-archive-tax .cuisine ul li,
    224       article.recipe .recipe-archive-tax .course ul li {
    225         display: inline-block;
    226         padding: 3px 8px;
    227         margin: 0 5px 0 0;
    228         background: #fff;
    229         border: 1px solid #ddd;
    230         -moz-transition: all 200ms ease;
    231         -o-transition: all 200ms ease;
    232         -webkit-transition: all 200ms ease;
    233         -ms-transition: all 200ms ease;
    234         transition: all 200ms ease; }
    235         article.recipe .recipe-single-tax .cuisine ul li a,
    236         article.recipe .recipe-single-tax .course ul li a,
    237         article.recipe .recipe-archive-tax .cuisine ul li a,
    238         article.recipe .recipe-archive-tax .course ul li a {
    239           text-decoration: none; }
    240         article.recipe .recipe-single-tax .cuisine ul li:hover,
    241         article.recipe .recipe-single-tax .course ul li:hover,
    242         article.recipe .recipe-archive-tax .cuisine ul li:hover,
    243         article.recipe .recipe-archive-tax .course ul li:hover {
    244           background: #fbfbfb; }
    245   article.recipe .recipe-single-tax .cuisine,
    246   article.recipe .recipe-archive-tax .cuisine {
    247     border-right: 1px solid #ddd;
    248     padding-right: 15px;
    249     margin-right: 15px; }
    250   article.recipe .recipe-single-details,
    251   article.recipe .recipe-archive-details {
    252     margin-top: 20px; }
    253     article.recipe .recipe-single-details > div,
    254     article.recipe .recipe-archive-details > div {
    255       margin-bottom: 5px; }
    256     article.recipe .recipe-single-details strong,
    257     article.recipe .recipe-archive-details strong {
    258       font-size: 16px;
    259       display: block;
    260       margin-bottom: 5px; }
    261     article.recipe .recipe-single-details .serves, article.recipe .recipe-single-details .equipment, article.recipe .recipe-single-details .prep-time, article.recipe .recipe-single-details .cook-time, article.recipe .recipe-single-details .total-time,
    262     article.recipe .recipe-archive-details .serves,
    263     article.recipe .recipe-archive-details .equipment,
    264     article.recipe .recipe-archive-details .prep-time,
    265     article.recipe .recipe-archive-details .cook-time,
    266     article.recipe .recipe-archive-details .total-time {
    267       font-size: 14px; }
    268     article.recipe .recipe-single-details .prep-time span, article.recipe .recipe-single-details .cook-time span,
    269     article.recipe .recipe-archive-details .prep-time span,
    270     article.recipe .recipe-archive-details .cook-time span {
    271       font-size: 17px;
    272       vertical-align: middle; }
    273     article.recipe .recipe-single-details .total-time,
    274     article.recipe .recipe-archive-details .total-time {
    275       font-weight: bold; }
    276   article.recipe .recipe-archive-details > div {
    277     margin-bottom: 15px; }
    278   article.recipe .recipe-single-content {
    279     font-size: 16px;
    280     margin-top: 25px;
    281     line-height: 1.6; }
    282     article.recipe .recipe-single-content p {
    283       margin-bottom: 12px; }
    284   article.recipe .recipe-archive-content {
    285     font-size: 16px;
    286     line-height: 1.6; }
    287     article.recipe .recipe-archive-content p {
    288       margin-bottom: 12px; }
    289     article.recipe .recipe-archive-content .sharedaddy {
    290       margin-top: 15px; }
    291   article.recipe .recipe-single-ingredients h4 {
    292     margin-top: 25px; }
    293   article.recipe .recipe-single-ingredients ul.ingredients-list {
    294     margin-left: 0;
    295             /*column-count: 2;
    296            column-gap: 20px;
    297            -moz-column-count: 2;
    298            -moz-column-gap: 20px;
    299            -webkit-column-count: 2;
    300            -webkit-column-gap : 20px;*/
    301     font-size: 14px;
    302     list-style: none; }
    303     article.recipe .recipe-single-ingredients ul.ingredients-list li.ingredients-item {
    304       padding-bottom: 5px;
    305       margin-left: 0; }
    306       article.recipe .recipe-single-ingredients ul.ingredients-list li.ingredients-item .amount {
    307         text-align: right;
    308         min-width: 20%;
    309         display: inline-block;
    310         font-weight: bold; }
    311       article.recipe .recipe-single-ingredients ul.ingredients-list li.ingredients-item .name {
    312         text-align: left;
    313         display: inline-block;
    314         padding-left: 5px; }
    315   article.recipe .recipe-single-instructions h4 {
    316     margin-top: 25px; }
    317   article.recipe .recipe-single-instructions ol.steps-list {
    318     list-style-type: decimal; }
    319     article.recipe .recipe-single-instructions ol.steps-list li.steps-item {
    320       margin-bottom: 30px; }
    321       article.recipe .recipe-single-instructions ol.steps-list li.steps-item p {
    322         margin-bottom: 15px;
    323         font-size: 14px;
    324         line-height: 1.6; }
    325       article.recipe .recipe-single-instructions ol.steps-list li.steps-item img.step-image {
    326         max-width: 100%; }
    327   article.recipe .recipe-single-nutrition {
    328     font-size: 14px;
    329     line-height: 1.6;
    330     margin-bottom: 15px; }
    331   article.recipe hr.recipe-single-seperator {
    332     background: #ddd; }
     467      font-weight: 700;
     468      margin-right: 1em;
     469      text-indent: -9999px;
     470      position: relative;
     471      border-bottom: 0 !important;
     472      outline: 0; }
     473      .recipe-hero p.stars a:last-child {
     474        border-right: 0; }
     475      .recipe-hero p.stars a.star-1, .recipe-hero p.stars a.star-2, .recipe-hero p.stars a.star-3, .recipe-hero p.stars a.star-4, .recipe-hero p.stars a.star-5 {
     476        border-right: 1px solid #ccc; }
     477        .recipe-hero p.stars a.star-1:after, .recipe-hero p.stars a.star-2:after, .recipe-hero p.stars a.star-3:after, .recipe-hero p.stars a.star-4:after, .recipe-hero p.stars a.star-5:after {
     478          font-family: "dashicons";
     479          text-indent: 0;
     480          position: absolute;
     481          top: 0;
     482          left: 0;
     483          color: #ccc; }
     484        .recipe-hero p.stars a.star-1:hover:after, .recipe-hero p.stars a.star-1.active:after, .recipe-hero p.stars a.star-2:hover:after, .recipe-hero p.stars a.star-2.active:after, .recipe-hero p.stars a.star-3:hover:after, .recipe-hero p.stars a.star-3.active:after, .recipe-hero p.stars a.star-4:hover:after, .recipe-hero p.stars a.star-4.active:after, .recipe-hero p.stars a.star-5:hover:after, .recipe-hero p.stars a.star-5.active:after {
     485          color: #e3cf7a; }
     486      .recipe-hero p.stars a.star-1 {
     487        width: 2em; }
     488        .recipe-hero p.stars a.star-1:after {
     489          content: "\f154"; }
     490        .recipe-hero p.stars a.star-1:hover:after, .recipe-hero p.stars a.star-1.active:after {
     491          content: "\f155"; }
     492      .recipe-hero p.stars a.star-2 {
     493        width: 3em; }
     494        .recipe-hero p.stars a.star-2:after {
     495          content: "\f154\f154"; }
     496        .recipe-hero p.stars a.star-2:hover:after, .recipe-hero p.stars a.star-2.active:after {
     497          content: "\f155\f155"; }
     498      .recipe-hero p.stars a.star-3 {
     499        width: 4em; }
     500        .recipe-hero p.stars a.star-3:after {
     501          content: "\f154\f154\f154"; }
     502        .recipe-hero p.stars a.star-3:hover:after, .recipe-hero p.stars a.star-3.active:after {
     503          content: "\f155\f155\f155"; }
     504      .recipe-hero p.stars a.star-4 {
     505        width: 5em; }
     506        .recipe-hero p.stars a.star-4:after {
     507          content: "\f154\f154\f154\f154"; }
     508        .recipe-hero p.stars a.star-4:hover:after, .recipe-hero p.stars a.star-4.active:after {
     509          content: "\f155\f155\f155\f155"; }
     510      .recipe-hero p.stars a.star-5 {
     511        width: 6em;
     512        border: 0; }
     513        .recipe-hero p.stars a.star-5:after {
     514          content: "\f154\f154\f154\f154\f154"; }
     515        .recipe-hero p.stars a.star-5:hover:after, .recipe-hero p.stars a.star-5.active:after {
     516          content: "\f155\f155\f155\f155\f155"; }
    333517
    334518@media all and (max-width: 799px) {
  • recipe-hero/trunk/assets/frontend/css/rh-styles.scss

    r1040292 r1043378  
    9292}
    9393
    94 article.recipe {
    95     line-height: 1.4;
    96     h4 {
    97         font-size: 23px;
    98         margin-bottom: 18px;
    99         font-weight: 600;
    100     }
    101     .recipe-single-title,
    102     .recipe-archive-title {
    103         font-size: 35px;
    104     }
    105     .recipe-single-meta,
    106     .recipe-archive-meta {
    107         margin-top: 10px;
    108         .date, .author, .comments-link, .edit-link {
    109             display: inline-block;
    110             vertical-align: bottom;
    111             padding-left: 15px;
    112             font-size: 14px;
    113             margin-top: 0;
    114             line-height: 1.5;
    115             .dashicons {
    116                 font-size: 16px;
     94.recipe-hero {
     95    article.recipe {
     96        line-height: 1.4;
     97        h4 {
     98            font-size: 23px;
     99            margin-bottom: 18px;
     100            font-weight: 600;
     101        }
     102        .recipe-single-title,
     103        .recipe-archive-title {
     104            font-size: 35px;
     105        }
     106        .recipe-single-meta,
     107        .recipe-archive-meta {
     108            margin-top: 10px;
     109            .date, .author, .dashicons-testimonial, .edit-link {
     110                display: inline-block;
    117111                vertical-align: bottom;
    118                 line-height: 1.35;
    119             }
    120             a {
    121                 float: none;
     112                padding-left: 15px;
    122113                font-size: 14px;
    123             }
    124         }
    125         .date {
    126             padding-left: 0;
    127         }
    128         .comments-link a:before {
    129             content: none;
    130         }
    131     }
    132     .images {
    133         margin-bottom: 10px;
    134         .thumbnails {
    135             margin-top: 5px;
    136             @include clearfix();
    137             a {
    138                 float:left;
    139                 &.columns-3 {
    140                     width: 30.75%;
    141                     margin-right: 3.8%;
    142                 }
    143                 &.columns-4 {
    144                     width: 22.85%;
    145                     margin-right: 2.55%;
    146                 }
    147                 &.columns-5 {
    148                     width: 17.45%;
    149                     margin-right: 2.2%;
    150                 }
    151                 &.columns-6 {
    152                     width: 14.2%;
    153                     margin-right: 2.8%;
    154                 }
    155                 img {
    156                     display: block;
    157                     width: 100%;
    158                     margin-bottom: 10px;
    159                     height: auto;
    160                 }
    161             }
    162             a.last {
    163                 margin-right: 0;
    164             }
    165             a.first {
    166                 clear:both;
    167             }
    168         }
    169         .recipe-schema-thumb {
    170             display: none;
    171         }
    172     }
    173     .recipe-single-tax,
    174     .recipe-archive-tax {
    175         .cuisine,
    176         .course {
    177             display: inline-block;
    178             padding-right: 15px;
     114                margin-top: 0;
     115                line-height: 1.5;
     116                .dashicons {
     117                    font-size: 16px;
     118                    vertical-align: bottom;
     119                    line-height: 1.35;
     120                }
     121                a {
     122                    float: none;
     123                    font-size: 14px;
     124                }
     125            }
     126            .date {
     127                padding-left: 0;
     128            }
     129            .comments-link a:before {
     130                content: none;
     131            }
     132        }
     133        .images {
     134            margin-bottom: 10px;
     135            .thumbnails {
     136                margin-top: 5px;
     137                @include clearfix();
     138                a {
     139                    float:left;
     140                    &.columns-3 {
     141                        width: 30.75%;
     142                        margin-right: 3.8%;
     143                    }
     144                    &.columns-4 {
     145                        width: 22.85%;
     146                        margin-right: 2.55%;
     147                    }
     148                    &.columns-5 {
     149                        width: 17.45%;
     150                        margin-right: 2.2%;
     151                    }
     152                    &.columns-6 {
     153                        width: 14.2%;
     154                        margin-right: 2.8%;
     155                    }
     156                    img {
     157                        display: block;
     158                        width: 100%;
     159                        margin-bottom: 10px;
     160                        height: auto;
     161                    }
     162                }
     163                a.last {
     164                    margin-right: 0;
     165                }
     166                a.first {
     167                    clear:both;
     168                }
     169            }
     170            .recipe-schema-thumb {
     171                display: none;
     172            }
     173        }
     174        .recipe-single-tax,
     175        .recipe-archive-tax {
     176            .cuisine,
     177            .course {
     178                display: inline-block;
     179                padding-right: 15px;
     180                strong {
     181                    font-size: 16px;
     182                    &:after {
     183                        content: ':';
     184                    }
     185                }
     186                ul {
     187                    display: inline-block;
     188                    list-style-type: none;
     189                    margin-left: 5px;
     190                    margin-bottom: 0;
     191                    li {
     192                        display: inline-block;
     193                        padding: 3px 8px;
     194                        margin: 0 5px 0 0;
     195                        background: #fff;
     196                        border: 1px solid #ddd;
     197                        @include transition(all, 200ms, ease);
     198                        a {
     199                            text-decoration: none;
     200                        }
     201                        &:hover {
     202                            background: #fbfbfb;
     203
     204                        }
     205                    }
     206                }
     207            }
     208            .cuisine {
     209                border-right: 1px solid #ddd;
     210                padding-right: 15px;
     211                margin-right: 15px;
     212            }
     213        }
     214        .recipe-single-details,
     215        .recipe-archive-details {
     216            margin-top: 20px;
     217            > div {
     218                margin-bottom: 5px;
     219            }
    179220            strong {
    180221                font-size: 16px;
     222                display: block;
     223                margin-bottom: 5px;
     224            }
     225            .serves, .equipment, .prep-time, .cook-time, .total-time {
     226                font-size: 14px;
     227            }
     228            .serves {
     229            }
     230            .equipment {
     231                .equipment-item {
     232                }
     233            }
     234            .prep-time {
     235            }
     236            .cook-time {
     237            }
     238            .prep-time, .cook-time {
     239                span {
     240                    font-size: 17px;
     241                    vertical-align: middle;
     242                }
     243            }
     244            .total-time {
     245                font-weight: bold;
     246            }
     247
     248        }
     249        .recipe-archive-details {
     250            > div {
     251                margin-bottom: 15px;
     252            }
     253        }
     254        .recipe-single-content {
     255            font-size: 16px;
     256            margin-top: 25px;
     257            line-height: 1.6;
     258            p {
     259                margin-bottom: 12px;
     260            }
     261        }
     262        .recipe-archive-content {
     263            font-size: 16px;
     264            line-height: 1.6;
     265            p {
     266                margin-bottom: 12px;
     267            }
     268            .sharedaddy {
     269                margin-top: 15px;
     270            }
     271        }
     272        .recipe-single-ingredients {
     273            h4 {
     274                margin-top: 25px;
     275            }
     276            ul.ingredients-list {
     277                margin-left: 0;
     278                padding-left: 0;
     279                font-size: 14px;
     280                list-style: none;
     281                li.ingredients-item {
     282                    padding-bottom: 5px;
     283                    margin-left: 0;
     284                    label {
     285                        display: inline-block;
     286                    }
     287                    .amount {
     288                        text-align: right;
     289                        min-width: 20%;
     290                        display: inline-block;
     291                        font-weight: bold;
     292                        vertical-align: top;
     293                    }
     294                    .name {
     295                        text-align: left;
     296                        display: inline-block;
     297                        padding-left: 5px;
     298                        vertical-align: top;
     299                    }
     300                }
     301            }
     302        }
     303        .recipe-single-instructions {
     304            h4 {
     305                margin-top: 25px;
     306            }
     307            ol.steps-list {
     308                list-style-type: decimal;
     309                li.steps-item {
     310                    margin-bottom: 30px;
     311                    p {
     312                        margin-bottom: 15px;
     313                        font-size: 14px;
     314                        line-height: 1.6;
     315                    }
     316                    img.step-image {
     317                        max-width: 100%;
     318                    }
     319                }
     320            }
     321        }
     322        .recipe-single-nutrition {
     323            font-size: 14px;
     324            line-height: 1.6;
     325            margin-bottom: 15px;
     326        }
     327    }
     328        /**
     329     * Reviews
     330     */
     331    #reviews {
     332        h2 small {
     333            float: right;
     334            color: $secondarytext;
     335            font-size: 15px;
     336            margin: 10px 0 0 0;
     337
     338            a {
     339                text-decoration: none;
     340                color: $secondarytext;
     341            }
     342        }
     343
     344        h3 {
     345            margin: 0;
     346        }
     347
     348        #respond {
     349            margin: 0;
     350            border: 0;
     351            padding: 0;
     352        }
     353
     354        #comment {
     355            height: 75px;
     356        }
     357
     358        #comments {
     359            .add_review {
     360                @include clearfix();
     361            }
     362
     363            h2 {
     364                clear: none;
     365            }
     366
     367            ol.commentlist {
     368                @include clearfix();
     369                margin: 0;
     370                width: 100%;
     371                background: none;
     372                list-style: none;
     373                margin-top: 25px;
     374
     375                li {
     376                    padding: 0;
     377                    margin: 0 0 20px;
     378                    border: 0;
     379                    position: relative;
     380                    background: 0;
     381                    border: 0;
     382
     383                    .meta {
     384                        color: $secondarytext;
     385                        font-size: 0.75em;
     386                    }
     387
     388                    img.avatar {
     389                        float: left;
     390                        position: absolute;
     391                        top: 0;
     392                        left: 0;
     393                        padding: 2px;
     394                        width: 32px;
     395                        height: auto;
     396                        background: $secondary;
     397                        border: 1px solid darken( $secondary, 3% );
     398                        margin: 0;
     399                        box-shadow: none;
     400                        border-radius: 100%;
     401                    }
     402
     403                    .comment-text {
     404                        margin: 0 0 0 50px;
     405                        border: 1px solid darken( $secondary, 3% );
     406                        border-radius: 2px;
     407                        padding: 1em 1em 0;
     408                        @include clearfix();
     409
     410                        p {
     411                            margin: 0 0 1em;
     412                        }
     413
     414                        p.meta {
     415                            font-size: 0.83em;
     416                            .time {
     417                                color: #888;
     418                            }
     419                        }
     420                    }
     421                }
     422
     423                ul.children {
     424                    list-style: none outside;
     425                    margin: 20px 0 0 50px;
     426
     427                    .star-rating {
     428                        display: none;
     429                    }
     430                }
     431
     432                #respond {
     433                    border: 1px solid darken( $secondary, 3% );
     434                    border-radius: 4px;
     435                    padding: 1em 1em 0;
     436                    margin: 20px 0 0 50px;
     437                }
     438            }
     439
     440            .commentlist > li:before {
     441                content: "";
     442            }
     443        }
     444    }
     445
     446    /**
     447     * Star ratings
     448     */
     449    .star-rating {
     450        float: right;
     451        position: relative;
     452        height: 1em;
     453        line-height: 1;
     454        font-size: 1em;
     455        width: 8.4em;
     456       
     457        .dashicons {
     458            color: #e3cf7a;
     459            &.dashicons-star-empty {
     460                color: #ccc;
     461            }
     462        }
     463
     464    }
     465
     466    #review_form {
     467        #respond {
     468            @include clearfix();
     469            position: static;
     470            margin: 0;
     471            width: auto;
     472            padding: 0 0 0;
     473            background: transparent none;
     474            border: 0;
     475            p {
     476                margin: 0 0 15px;
     477            }
     478            .form-submit {
     479                input {
     480                    left: auto;
     481                }
     482            }
     483            textarea {
     484                -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
     485                -moz-box-sizing: border-box;    /* Firefox, other Gecko */
     486                box-sizing: border-box;         /* Opera/IE 8+ */
     487                width: 100%;
     488            }
     489        }
     490    }
     491
     492    p.stars {
     493        position: relative;
     494        font-size: 1em;
     495
     496        a {
     497            display: inline-block;
     498            font-weight: 700;
     499            margin-right: 1em;
     500            text-indent: -9999px;
     501            position: relative;
     502            border-bottom: 0 !important;
     503            outline: 0;
     504
     505            &:last-child {
     506                border-right:0;
     507            }
     508
     509            &.star-1,
     510            &.star-2,
     511            &.star-3,
     512            &.star-4,
     513            &.star-5 {
     514                border-right:1px solid #ccc;
     515
    181516                &:after {
    182                     content: ':';
    183                 }
    184             }
    185             ul {
    186                 display: inline-block;
    187                 list-style-type: none;
    188                 margin-left: 5px;
    189                 margin-bottom: 0;
    190                 li {
    191                     display: inline-block;
    192                     padding: 3px 8px;
    193                     margin: 0 5px 0 0;
    194                     background: #fff;
    195                     border: 1px solid #ddd;
    196                     @include transition(all, 200ms, ease);
    197                     a {
    198                         text-decoration: none;
    199                     }
    200                     &:hover {
    201                         background: #fbfbfb;
    202 
    203                     }
    204                 }
    205             }
    206         }
    207         .cuisine {
    208             border-right: 1px solid #ddd;
    209             padding-right: 15px;
    210             margin-right: 15px;
    211         }
    212     }
    213     .recipe-single-details,
    214     .recipe-archive-details {
    215         margin-top: 20px;
    216         > div {
    217             margin-bottom: 5px;
    218         }
    219         strong {
    220             font-size: 16px;
    221             display: block;
    222             margin-bottom: 5px;
    223         }
    224         .serves, .equipment, .prep-time, .cook-time, .total-time {
    225             font-size: 14px;
    226         }
    227         .serves {
    228         }
    229         .equipment {
    230             .equipment-item {
    231             }
    232         }
    233         .prep-time {
    234         }
    235         .cook-time {
    236         }
    237         .prep-time, .cook-time {
    238             span {
    239                 font-size: 17px;
    240                 vertical-align: middle;
    241             }
    242         }
    243         .total-time {
    244             font-weight: bold;
    245         }
    246 
    247     }
    248     .recipe-archive-details {
    249         > div {
    250             margin-bottom: 15px;
    251         }
    252     }
    253     .recipe-single-content {
    254         font-size: 16px;
    255         margin-top: 25px;
    256         line-height: 1.6;
    257         p {
    258             margin-bottom: 12px;
    259         }
    260     }
    261     .recipe-archive-content {
    262         font-size: 16px;
    263         line-height: 1.6;
    264         p {
    265             margin-bottom: 12px;
    266         }
    267         .sharedaddy {
    268             margin-top: 15px;
    269         }
    270     }
    271     .recipe-single-ingredients {
    272         h4 {
    273             margin-top: 25px;
    274         }
    275         ul.ingredients-list {
    276             margin-left: 0;
    277             /*column-count: 2;
    278             column-gap: 20px;
    279             -moz-column-count: 2;
    280             -moz-column-gap: 20px;
    281             -webkit-column-count: 2;
    282             -webkit-column-gap : 20px;*/
    283             font-size: 14px;
    284             list-style: none;
    285             li.ingredients-item {
    286                 padding-bottom: 5px;
    287                 margin-left: 0;
    288                 .amount {
    289                     text-align: right;
    290                     min-width: 20%;
    291                     display: inline-block;
    292                     font-weight: bold;
    293                 }
    294                 .name {
    295                     text-align: left;
    296                     display: inline-block;
    297                     padding-left: 5px;
    298                 }
    299             }
    300         }
    301     }
    302     .recipe-single-instructions {
    303         h4 {
    304             margin-top: 25px;
    305         }
    306         ol.steps-list {
    307             list-style-type: decimal;
    308             li.steps-item {
    309                 margin-bottom: 30px;
    310                 p {
    311                     margin-bottom: 15px;
    312                     font-size: 14px;
    313                     line-height: 1.6;
    314                 }
    315                 img.step-image {
    316                     max-width: 100%;
    317                 }
    318             }
    319         }
    320     }
    321     .recipe-single-nutrition {
    322         font-size: 14px;
    323         line-height: 1.6;
    324         margin-bottom: 15px;
    325     }
    326     hr.recipe-single-seperator {
    327         background: #ddd;
    328     }
     517                    font-family: "dashicons";
     518                    text-indent: 0;
     519                    position: absolute;
     520                    top: 0;
     521                    left: 0;
     522                    color: #ccc;
     523                }
     524
     525                &:hover:after,
     526                &.active:after {
     527                    color: #e3cf7a;
     528                }
     529
     530            }
     531
     532            &.star-1 {
     533                width: 2em;
     534
     535                &:after {
     536                    content: "\f154";
     537                }
     538
     539                &:hover:after,
     540                &.active:after {
     541                    content: "\f155";
     542                }
     543            }
     544
     545            &.star-2 {
     546                width: 3em;
     547
     548                &:after {
     549                    content: "\f154\f154";
     550                }
     551
     552                &:hover:after,
     553                &.active:after {
     554                    content: "\f155\f155";
     555                }
     556            }
     557
     558            &.star-3 {
     559                width: 4em;
     560
     561                &:after {
     562                    content: "\f154\f154\f154";
     563                }
     564
     565                &:hover:after,
     566                &.active:after {
     567                    content: "\f155\f155\f155";
     568                }
     569            }
     570
     571            &.star-4 {
     572                width: 5em;
     573
     574                &:after {
     575                    content: "\f154\f154\f154\f154";
     576                }
     577
     578                &:hover:after,
     579                &.active:after {
     580                    content: "\f155\f155\f155\f155";
     581                }
     582            }
     583
     584            &.star-5 {
     585                width: 6em;
     586                border: 0;
     587
     588                &:after {
     589                    content: "\f154\f154\f154\f154\f154";
     590                }
     591
     592                &:hover:after,
     593                &.active:after {
     594                    content: "\f155\f155\f155\f155\f155";
     595                }
     596            }
     597        }
     598    }
     599
    329600}
     601
    330602
    331603@media all and (max-width: 799px) {
  • recipe-hero/trunk/assets/frontend/js/min/rh-scripts-min.js

    r1040292 r1043378  
    1 !function($){"use strict";$(".ingredient-checkbox").click(function(){var t=$(this);t.is(":checked")?$(this).nextAll("div").css("text-decoration","line-through"):$(this).nextAll("div").css("text-decoration","none")})}(jQuery);
     1!function($){"use strict";$(".ingredient-checkbox").click(function(){var s=$(this);s.is(":checked")?$(this).nextAll("div").css("text-decoration","line-through"):$(this).nextAll("div").css("text-decoration","none")}),$("#rating").hide().before('<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a></span></p>'),$("body").on("click","#respond p.stars a",function(){var s=$(this),a=$(this).closest("#respond").find("#rating");return a.val(s.text()),s.siblings("a").removeClass("active"),s.addClass("active"),!1})}(jQuery);
  • recipe-hero/trunk/assets/frontend/js/rh-scripts.js

    r1040292 r1043378  
    1414    });
    1515
     16    // Star ratings for comments
     17    $( '#rating' ).hide().before( '<p class="stars"><span><a class="star-1" href="#">1</a><a class="star-2" href="#">2</a><a class="star-3" href="#">3</a><a class="star-4" href="#">4</a><a class="star-5" href="#">5</a></span></p>' );
     18
     19    $( 'body' )
     20        .on( 'click', '#respond p.stars a', function() {
     21            var $star   = $( this ),
     22                $rating = $( this ).closest( '#respond' ).find( '#rating' );
     23
     24            $rating.val( $star.text() );
     25            $star.siblings( 'a' ).removeClass( 'active' );
     26            $star.addClass( 'active' );
     27
     28            return false;
     29        });
     30
    1631}(jQuery));
  • recipe-hero/trunk/includes/abstracts/abstract-rh-recipe.php

    r1038648 r1043378  
    1010 * @link      http://captaintheme.com
    1111 * @copyright 2014 Captain Theme
    12  * @since     1.0.0
     12 * @since     1.0.2
    1313 */
    1414class RH_Recipe {
     
    2323     * Constructor gets the post object and sets the ID for the loaded product.
    2424     *
    25      * @param int|WC_Product|WP_Post $recipe Product ID, post object, or product object
    2625     */
    2726    public function __construct( $recipe ) {
     
    164163
    165164    /**
    166      * Returns the main product image
     165     * Returns the main recipe image
    167166     *
    168167     * @param string $size (default: 'recipe_thumbnail')
     
    176175        } else {
    177176            $image = '';
    178             //$image = wc_placeholder_img( $size );
    179177        }
    180178
     
    182180    }
    183181
     182    /**
     183     * Get the average rating of recipe.
     184     *
     185     * @return string
     186     */
     187    public function get_average_rating() {
     188
     189        if ( false === ( $average_rating = get_transient( 'rh_average_rating_' . $this->id ) ) ) {
     190
     191            global $wpdb;
     192
     193            $average_rating = '';
     194            $count          = $this->get_rating_count();
     195
     196            if ( $count > 0 ) {
     197
     198                $ratings = $wpdb->get_var( $wpdb->prepare("
     199                    SELECT SUM(meta_value) FROM $wpdb->commentmeta
     200                    LEFT JOIN $wpdb->comments ON $wpdb->commentmeta.comment_id = $wpdb->comments.comment_ID
     201                    WHERE meta_key = 'rating'
     202                    AND comment_post_ID = %d
     203                    AND comment_approved = '1'
     204                    AND meta_value > 0
     205                ", $this->id ) );
     206
     207                $average_rating = number_format( $ratings / $count, 2 );
     208            }
     209
     210            set_transient( 'rh_average_rating_' . $this->id, $average_rating, YEAR_IN_SECONDS );
     211        }
     212
     213        return $average_rating;
     214    }
     215
     216    /**
     217     * Get the total amount (COUNT) of ratings.
     218     *
     219     * @param  int $value Optional. Rating value to get the count for. By default
     220     *                              returns the count of all rating values.
     221     * @return int
     222     */
     223    public function get_rating_count( $value = null ) {
     224
     225        $value = intval( $value );
     226        $value_suffix = $value ? '_' . $value : '';
     227
     228        if ( false === ( $count = get_transient( 'rh_rating_count_' . $this->id . $value_suffix ) ) ) {
     229
     230            global $wpdb;
     231
     232            $where_meta_value = $value ? $wpdb->prepare( " AND meta_value = %d", $value ) : " AND meta_value > 0";
     233
     234            if ( get_option( 'recipe_hero_enable_review_rating' ) == 'yes' ) {
     235
     236                $count = $wpdb->get_var( $wpdb->prepare("
     237                    SELECT COUNT(meta_value) FROM $wpdb->commentmeta
     238                    LEFT JOIN $wpdb->comments ON $wpdb->commentmeta.comment_id = $wpdb->comments.comment_ID
     239                    WHERE meta_key = 'rating'
     240                    AND comment_post_ID = %d
     241                    AND comment_approved = '1'
     242                ", $this->id ) . $where_meta_value );
     243
     244            } else {
     245
     246                $count = $wpdb->get_var( $wpdb->prepare("
     247                    SELECT COUNT(*) FROM $wpdb->comments
     248                    WHERE comment_parent = 0
     249                    AND comment_post_ID = %d
     250                    AND comment_approved = '1'
     251                ", $this->id ) );
     252
     253            }
     254
     255            set_transient( 'rh_rating_count_' . $this->id . $value_suffix, $count, YEAR_IN_SECONDS );
     256        }
     257
     258        return $count;
     259    }
     260
     261    /**
     262     * Returns the recipe rating in html format.
     263     *
     264     * @param string $rating (default: '')
     265     * @return string
     266     */
     267    public function get_rating_html( $rating = null ) {
     268
     269        if ( ! is_numeric( $rating ) ) {
     270            $rating = $this->get_average_rating();
     271        }
     272
     273        if ( $rating > 0 ) {
     274
     275            $rating_html  = '<div class="star-rating" title="' . sprintf( __( 'Rated %s out of 5', 'recipe-hero' ), $rating ) . '">';
     276
     277            $rating_html .= '<span style="width:' . ( ( $rating / 5 ) * 100 ) . '%"><strong class="rating">' . $rating . '</strong> ' . __( 'out of 5', 'recipe-hero' ) . '</span>';
     278
     279            $rating_html .= '</div>';
     280
     281            return $rating_html;
     282        }
     283
     284        return '';
     285    }
     286
    184287}
  • recipe-hero/trunk/includes/admin/class-rh-admin-extensions.php

    r1038648 r1043378  
    6565        <div class="wrap recipe_hero recipe_hero_extensions_wrap">
    6666            <h2><?php _e( 'Recipe Hero Extensions', 'recipe-hero' ); ?></h2>
    67             <div id="notice" class="updated below-h2"><p><?php printf( __( 'Buying multiple extensions? <a href="%s">Check out the core extension bundle &rarr;</a>', 'recipe-hero' ), 'https://recipehero.in/extensions/bundle/' ); ?></p></div>
    68             <p></p>
     67            <?php
     68            /*
     69                <div id="notice" class="updated below-h2"><p><?php printf( __( 'Buying multiple extensions? <a href="%s">Check out the core extension bundle &rarr;</a>', 'recipe-hero' ), 'https://recipehero.in/extensions/bundle/' ); ?></p></div>
     70            */
     71            ?>
     72            <div id="notice" class="updated below-h2"><p><?php _e( 'The following are some extensions you can purchase to extend Recipe Hero in awesome and exciting ways!', 'recipe-hero' ); ?></p></div>
    6973            <?php echo $extensions; ?>
    7074        </div>
  • recipe-hero/trunk/includes/admin/class-rh-admin-meta-boxes.php

    r1038648 r1043378  
    3131    public function __construct() {
    3232
     33        add_action( 'add_meta_boxes', array( $this, 'rename_meta_boxes' ), 20 );
    3334        add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ), 30 );
    3435
    3536        // Save Meta Boxes - @todo do it the WC way so it only affects recipes
    3637        add_action( 'save_post', array( $this, 'gallery_save' ), 20, 2 );
     38
     39        // Save Rating Meta Boxes
     40        add_action( 'comment_edit_redirect',  'RH_Meta_Box_Recipe_Reviews::save', 1, 2 );
    3741
    3842    }
     
    5054        remove_meta_box( 'commentstatusdiv', 'recipe', 'normal' );
    5155
     56        // Reviews
     57        if ( 'comment' == get_current_screen()->id && isset( $_GET['c'] ) ) {
     58            if ( get_comment_meta( intval( $_GET['c'] ), 'rating', true ) ) {
     59                add_meta_box( 'recipe-hero-rating', __( 'Rating', 'recipe-hero' ), 'RH_Meta_Box_Recipe_Reviews::output', 'comment', 'normal', 'high' );
     60            }
     61        }
     62
     63    }
     64
     65    /**
     66     * Rename core meta boxes
     67     */
     68    public function rename_meta_boxes() {
     69        global $post;
     70
     71        // Comments/Reviews
     72        if ( isset( $post ) && ( 'publish' == $post->post_status || 'private' == $post->post_status ) ) {
     73            remove_meta_box( 'commentsdiv', 'recipe', 'normal' );
     74            add_meta_box( 'commentsdiv', __( 'Reviews', 'recipe-hero' ), 'post_comment_meta_box', 'recipe', 'normal' );
     75        }
    5276    }
    5377
  • recipe-hero/trunk/includes/admin/class-rh-admin.php

    r1038648 r1043378  
    9393            // Meta boxes
    9494            include_once( 'class-rh-admin-meta-boxes.php' );
     95            include_once( 'meta-boxes/class-rh-meta-box-recipe-reviews.php' );
    9596
    9697            include( 'class-rh-admin-notices.php' );
  • recipe-hero/trunk/includes/admin/settings/class-rh-settings-general.php

    r1038648 r1043378  
    88 * @link      http://captaintheme.com
    99 * @copyright 2014 Captain Theme
    10  * @since     1.0.0
     10 * @since     1.0.2
    1111 */
    1212
     
    7070                        'date'       => __( 'Sort by most recent', 'recipe-hero' ),
    7171                ) ),
     72            ),
     73
     74            array(
     75                'title'         => __( 'Recipe Ratings', 'recipe-hero' ),
     76                'desc'          => __( 'Enable Ratings for recipe reviews / comments', 'recipe-hero' ),
     77                'id'            => 'recipe_hero_enable_review_rating',
     78                'default'       => 'yes',
     79                'desc_tip'      => __( 'Checking this will allow users to give a rating for recipes when leaving a review / comment', 'recipe-hero' ),
     80                'type'          => 'checkbox'
    7281            ),
    7382
  • recipe-hero/trunk/includes/class-rh-post-types.php

    r1038648 r1043378  
    7373            'show_in_nav_menus' => false,
    7474            'rewrite'               => array(
    75                     'slug'         => empty( $permalinks['course_base'] ) ? _x( 'course', 'slug', 'woocommerce' ) : $permalinks['course_base'],
     75                    'slug'         => empty( $permalinks['course_base'] ) ? _x( 'course', 'slug', 'recipe-hero' ) : $permalinks['course_base'],
    7676                    'with_front'   => false,
    7777                    'hierarchical' => true,
     
    108108            'show_in_nav_menus' => false,
    109109            'rewrite'               => array(
    110                 'slug'         => empty( $permalinks['cuisine_base'] ) ? _x( 'cuisine', 'slug', 'woocommerce' ) : $permalinks['cuisine_base'],
     110                'slug'         => empty( $permalinks['cuisine_base'] ) ? _x( 'cuisine', 'slug', 'recipe-hero' ) : $permalinks['cuisine_base'],
    111111                'with_front'   => false,
    112112                'hierarchical' => true,
     
    153153        $taxonomies     = array();
    154154
    155         $supports       = array( 'title','editor','author','thumbnail','excerpt','comments','publicize','page-attributes' );
     155        $supports       = array( 'title','editor','author','thumbnail','excerpt','comments','custom-fields','publicize','page-attributes' );
    156156       
    157157        $post_type_args = array(
  • recipe-hero/trunk/includes/rh-fields.php

    r1038648 r1043378  
    88 * @link      http://captaintheme.com
    99 * @copyright 2014 Captain Theme
    10  * @since     1.0.0
     10 * @since     1.0.2
    1111 */
    1212
     
    3434 * @package Recipe Hero
    3535 * @author  Captain Theme <[email protected]>
    36  * @since   1.0.0
     36 * @since   1.0.2
    3737 */
    3838function recipe_hero_cmb2_metaboxes( array $meta_boxes ) {
     
    6767                'desc' => __( 'The type of servings that relates to the Servings Amount, like how many people it will feed or how many burgers it can make, etc.', 'recipe-hero' ),
    6868                'id'   => $prefix . 'detail_serves_type',
    69                 'type' => 'text_small',
     69                'type' => 'text_medium',
    7070                'attributes' => array(
    7171                    'placeholder' => __( 'eg. People', 'recipe-hero' ),
  • recipe-hero/trunk/includes/rh-general-functions.php

    r1040292 r1043378  
    1717 */
    1818
    19 function is_recipe_hero() {
    20     return apply_filters( 'is_recipe_hero', ( is_post_type_archive( 'recipe' ) || is_tax( get_object_taxonomies( 'recipe' ) ) || is_singular( array( 'recipe' ) ) ) ? true : false );
     19if ( ! function_exists( 'is_recipe_hero' ) ) {
     20   
     21    function is_recipe_hero() {
     22        return apply_filters( 'is_recipe_hero', ( is_post_type_archive( 'recipe' ) || is_tax( get_object_taxonomies( 'recipe' ) ) || is_singular( array( 'recipe' ) ) ) ? true : false );
     23    }
     24
     25}
     26
     27/**
     28 * Returns true if is recipe hero taxonomy
     29 */
     30
     31if ( ! function_exists( 'is_recipe_hero_taxonomy' ) ) {
     32
     33    function is_recipe_hero_taxonomy() {
     34        return is_tax( get_object_taxonomies( 'recipe' ) );
     35    }
     36   
    2137}
    2238
  • recipe-hero/trunk/includes/rh-templates-functions.php

    r1038648 r1043378  
    1313
    1414/**
     15 * Handle redirects before content is output - hooked into template_redirect so is_page works.
     16 *
     17 * @return void
     18 */
     19function rh_template_redirect() {
     20
     21    // When default permalinks are enabled, redirect recipes page to post type archive url
     22    if ( ! empty( $_GET['page_id'] ) && get_option( 'permalink_structure' ) == "" && $_GET['page_id'] == rh_get_page_id( 'recipes' ) ) {
     23        wp_safe_redirect( get_post_type_archive_link('recipe') );
     24        exit;
     25    }
     26
     27}
     28add_action( 'template_redirect', 'rh_template_redirect' );
     29
     30/**
    1531 * Include all the template parts
    1632 *
    1733 * @package   Recipe Hero
    1834 * @author    Captain Theme <[email protected]>
    19  * @since     0.8.0
     35 * @since     1.0.2
    2036 */
    2137
    22 require_once( RECIPE_HERO_PLUGIN_DIR . 'includes/templates-parts/rh-templates-archive-functions.php' );
    23 require_once( RECIPE_HERO_PLUGIN_DIR . 'includes/templates-parts/rh-templates-search-functions.php' );
    24 require_once( RECIPE_HERO_PLUGIN_DIR . 'includes/templates-parts/rh-templates-sidebar-functions.php' );
    25 require_once( RECIPE_HERO_PLUGIN_DIR . 'includes/templates-parts/rh-templates-single-functions.php' );
    26 require_once( RECIPE_HERO_PLUGIN_DIR . 'includes/templates-parts/rh-templates-supports-functions.php' );
    27 require_once( RECIPE_HERO_PLUGIN_DIR . 'includes/templates-parts/rh-templates-wrapper-functions.php' );
     38require_once( RH()->plugin_path() . '/includes/templates-parts/rh-templates-archive-functions.php' );
     39require_once( RH()->plugin_path() . '/includes/templates-parts/rh-templates-search-functions.php' );
     40require_once( RH()->plugin_path() . '/includes/templates-parts/rh-templates-sidebar-functions.php' );
     41require_once( RH()->plugin_path() . '/includes/templates-parts/rh-templates-single-functions.php' );
     42require_once( RH()->plugin_path() . '/includes/templates-parts/rh-templates-supports-functions.php' );
     43require_once( RH()->plugin_path() . '/includes/templates-parts/rh-templates-wrapper-functions.php' );
  • recipe-hero/trunk/includes/rh-templates-hooks.php

    r1040292 r1043378  
    5454 *
    5555 * @see recipe_hero_output_single_header_before - 5
    56  * @see recipe_hero_output_single_title() - 10
     56 * @see recipe_hero_output_single_title - 10
    5757 * @see recipe_hero_output_single_meta - 20
    5858 * @see recipe_hero_output_single_header_after - 25
    5959 * @see recipe_hero_output_single_photo - 30
    6060 * @see recipe_hero_output_single_tax() - 40
    61  * @see recipe_hero_output_single_details() - 50
     61 * @see recipe_hero_output_single_details - 50
    6262 * @see recipe_hero_output_single_description - 60
    6363 * @see recipe_hero_output_single_ingredients - 70
  • recipe-hero/trunk/includes/rh-templates.php

    r1038648 r1043378  
    11<?php
    22/**
    3  * Include and setup custom metaboxes and fields.
     3 * Templating engine - loads the correct template file based on overrides, settings, etc.
    44 *
    55 * @package   Recipe Hero
     
    1313    exit; // Exit if accessed directly
    1414}
     15
     16
     17add_filter( 'comments_template', 'recipe_hero_comments_template_loader' );
     18function recipe_hero_comments_template_loader( $template ) {
     19
     20    if ( get_post_type() !== 'recipe' ) {
     21        return $template;
     22    }
     23
     24    $check_dirs = array(
     25        trailingslashit( get_stylesheet_directory() ) . RH()->template_path(),
     26        trailingslashit( get_template_directory() ) . RH()->template_path(),
     27        trailingslashit( get_stylesheet_directory() ),
     28        trailingslashit( get_template_directory() ),
     29        trailingslashit( RH()->plugin_path() ) . 'templates/'
     30    );
     31
     32    foreach ( $check_dirs as $dir ) {
     33        if ( file_exists( trailingslashit( $dir ) . 'single-recipe-reviews.php' ) ) {
     34            return trailingslashit( $dir ) . 'single-recipe-reviews.php';
     35        }
     36    }
     37
     38}
     39
    1540
    1641/**
     
    5075            // Else use custom template
    5176            if ( is_single() ) {
     77           
    5278                return recipe_hero_tc_get_template_hierarchy( 'single' );
    53             }
    54             if ( is_archive() ) {
     79           
     80            } elseif ( is_archive() || is_page( rh_get_page_id( 'recipes' ) ) ) {
     81
    5582                return recipe_hero_tc_get_template_hierarchy( 'archive' );
    56             }
    57             if ( is_search() ) {
     83
     84            } elseif ( is_search() ) {
     85
    5886                return recipe_hero_tc_get_template_hierarchy( 'search-results' );
     87
     88            } else {
     89
     90                return $template;
     91
    5992            }
    6093
  • recipe-hero/trunk/includes/shortcodes/rh-shortcodes-archive.php

    r1038648 r1043378  
    1717 * @package   Recipe Hero
    1818 * @author    Captain Theme <[email protected]>
    19  * @since     0.7.1
     19 * @since     1.0.2
    2020 */
    2121
     
    3939
    4040
    41         if ( $course || $cuisine) {
     41        if ( $course || $cuisine ) {
    4242
    4343            $args['tax_query'] = array(
    44                                     'relation'  => 'AND', // @todo Make this an option? (AND or OR)
    45                                     $course ?
    46                                         array(
    47                                             'taxonomy'  => 'course',
    48                                             'field'     => 'slug',
    49                                             'terms'     => $course,
    50                                         ) : false,
    51                                     $cuisine ?
    52                                         array(
    53                                             'taxonomy'  => 'cuisine',
    54                                             'field'     => 'slug',
    55                                             'terms'     => $cuisine,
    56                                         ) : false,
    57                                 );
     44                'relation'  => 'AND', // @todo Make this an option? (AND or OR)
     45                $course ?
     46                    array(
     47                        'taxonomy'  => 'course',
     48                        'field'     => 'slug',
     49                        'terms'     => $course,
     50                    ) : false,
     51                $cuisine ?
     52                    array(
     53                        'taxonomy'  => 'cuisine',
     54                        'field'     => 'slug',
     55                        'terms'     => $cuisine,
     56                    ) : false,
     57            );
    5858        }
    5959
     
    6565            while ( $the_query->have_posts() ) : $the_query->the_post();
    6666
    67                 echo recipe_hero_get_template_part( 'content', 'archive-recipe' );
     67                echo '<div class="recipe-hero">';
     68                    echo recipe_hero_get_template_part( 'content', 'archive-recipe' );
     69                echo '</div>';
    6870
    6971            endwhile;
  • recipe-hero/trunk/includes/shortcodes/rh-shortcodes-single.php

    r1038648 r1043378  
    1717 * @package   Recipe Hero
    1818 * @author    Captain Theme <[email protected]>
    19  * @since     0.7.1
     19 * @since     1.0.2
    2020 */
    2121
     
    3636                wp_enqueue_style( 'magnific-css' );
    3737            }
     38
     39            // We don't want recipe comments / reviews in a shortcode
     40            remove_action( 'recipe_hero_after_single_recipe', 'recipe_hero_output_single_comments', 10 );
    3841       
    3942            $args = array(
    40                     'post_type' => 'recipe',
    41                     'posts_per_page' => 1,
    42                     'p' => $id
    43                 );
     43                'post_type' => 'recipe',
     44                'posts_per_page' => 1,
     45                'p' => $id
     46            );
    4447
    4548            $the_query = new WP_Query( $args );
     
    4952                while ( $the_query->have_posts() ) : $the_query->the_post();
    5053
    51                     echo recipe_hero_get_template_part( 'content', 'single-recipe' );
     54                    echo '<div class="recipe-hero">';
     55                        echo recipe_hero_get_template_part( 'content', 'single-recipe' );
     56                    echo '</div>';
    5257
    5358                endwhile;
  • recipe-hero/trunk/includes/templates-parts/rh-templates-single-functions.php

    r1040292 r1043378  
    200200 * @package   Recipe Hero
    201201 * @author    Captain Theme <[email protected]>
    202  * @since     0.8.0
    203  */
    204 
    205 if ( ! function_exists( 'recipe_hero_output_single_comments' ) ) {
    206 
    207     function recipe_hero_output_single_comments() {
    208 
    209         recipe_hero_get_template( 'single/comments.php' );
    210 
    211     }
    212 
     202 * @since     1.0.2
     203 */
     204
     205if ( ! function_exists( 'recipe_hero_comments' ) ) {
     206
     207    function recipe_hero_comments( $comment, $args, $depth ) {
     208
     209        $GLOBALS['comment'] = $comment;
     210        recipe_hero_get_template( 'single/review.php', array( 'comment' => $comment, 'args' => $args, 'depth' => $depth ) );
     211
     212    }
     213
     214}
     215
     216/**
     217 * Recipe Single Comments
     218 *
     219 * @package   Recipe Hero
     220 * @author    Captain Theme <[email protected]>
     221 * @since     1.0.2
     222 */
     223
     224function recipe_hero_output_single_comments() {
     225    echo comments_template();
    213226}
    214227
    215228/******************************/
    216229
    217 
    218 /**
    219  * Line Break
    220  *
    221  * @package   Recipe Hero
    222  * @author    Captain Theme <[email protected]>
    223  * @since     0.8.0
    224  */
    225 
    226 if ( ! function_exists( 'recipe_hero_output_single_seperator' ) ) {
    227 
    228     function recipe_hero_output_single_seperator() {
    229 
    230         echo '<hr class="recipe-single-seperator" />';
    231 
    232     }
    233 
    234 }
    235 
    236230/**
    237231 * Function to convert minutes to hours for prep/cook time
     
    239233 * @package   Recipe Hero
    240234 * @author    Captain Theme <[email protected]>
    241  * @since     1.0.0
     235 * @since     1.0.2
    242236 */
    243237
    244238if ( ! function_exists( 'recipe_hero_convert_minute_hour' ) ) {
    245239
    246     function recipe_hero_convert_minute_hour( $time, $format = '%dh %02dm' ) {
     240    function recipe_hero_convert_minute_hour( $time ) {
     241
     242        $hours_postfix = _x( 'h', 'Abbreviation for hours', 'recipe-hero' );
     243        $minutes_postfix = _x( 'm', 'Abbreviation for minutes', 'recipe-hero' );
    247244
    248245        settype( $time, 'integer' );
     
    254251       
    255252        if ( $time < 60 ) {
    256             $content = $minutes . _x( 'm', 'Abbreviation for minutes', 'recipe-hero' );
     253            $content = $minutes . $minutes_postfix;
    257254        } else {
    258             $content = sprintf( $format, $hours, $minutes );
     255            $content = $hours . $hours_postfix . ' ' . $minutes . $minutes_postfix;
    259256        }
    260257
  • recipe-hero/trunk/recipe-hero.php

    r1040292 r1043378  
    1212 * Plugin URI:        http://recipehero.in/
    1313 * Description:       The last recipe plugin you'll ever need.
    14  * Version:           1.0.1
     14 * Version:           1.0.2
    1515 * Author:            Bryce Adams
    1616 * Author URI:        http://bryce.se/
     
    3737 *
    3838 * @class RecipeHero
    39  * @version 1.0.1
     39 * @version 1.0.2
    4040 */
    4141
     
    4545     * Plugin version, used for cache-busting of style and script file references.
    4646     *
    47      * @since   1.0.1
     47     * @since   1.0.2
    4848     *
    4949     * @var     string
    5050     */
    51     public static $version = '1.0.1';
     51    public static $version = '1.0.2';
    5252
    5353    /**
     
    117117     * and styles.
    118118     *
    119      * @since     0.9.0
     119     * @since     1.0.0
    120120     */
    121121    public function __construct() {
     
    182182
    183183        include_once( 'includes/class-rh-settings-methods.php' );
     184
     185        include_once( 'includes/class-rh-comments.php' );
    184186
    185187        include_once( 'includes/rh-templates.php' );
  • recipe-hero/trunk/templates/archive.php

    r1038648 r1043378  
    5151    <?php } else { ?>
    5252
    53         <?php rh_get_template( 'loop/no-recipes-found.php' ); ?>
     53        <?php recipe_hero_get_template( 'loop/no-recipes-found.php' ); ?>
    5454
    5555    <?php } ?>
  • recipe-hero/trunk/templates/archive/meta.php

    r971440 r1043378  
    55 * @package   Recipe Hero
    66 * @author    Captain Theme <[email protected]>
    7  * @version       0.8.0
     7 * @version   1.0.2
    88 */
    99
    10 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     10if ( ! defined( 'ABSPATH' ) ) {
     11    exit; // Exit if accessed directly
     12}
    1113
    1214$date = get_the_date();
     
    2527
    2628    <div class="comments-link">
    27         <span class="dashicons dashicons-testimonial"></span> <a href="#comments"><?php comments_number( __( '0 Comments', 'recipe-hero' ), __( '1 Comment', 'recipe-hero' ), __( '% Comments', 'recipe-hero' ) ); ?></a>
     29        <span class="dashicons dashicons-testimonial"></span> <a href="#reviews"><?php comments_number( __( '0 Reviews', 'recipe-hero' ), __( '1 Review', 'recipe-hero' ), __( '% Reviews', 'recipe-hero' ) ); ?></a>
    2830    </div>
    2931
  • recipe-hero/trunk/templates/loop/no-recipes-found.php

    r1038648 r1043378  
     1<?php
     2/**
     3 * No Recipes Found template
     4 *
     5 * @package     Recipe Hero
     6 * @author      Captain Theme <[email protected]>
     7 * @version     1.0.0
     8 */
     9?>
     10
    111<p>
    212    <?php _e( 'Sorry, there are no recipes to show!', 'recipe-hero' ); ?>
  • recipe-hero/trunk/templates/single/details.php

    r1040292 r1043378  
    55 * @package   Recipe Hero
    66 * @author    Captain Theme <[email protected]>
    7  * @version   1.0.0
     7 * @version   1.0.2
    88 */
    99
     
    1515$serves         = get_post_meta( $post->ID, '_recipe_hero_detail_serves', true );
    1616$serves_type    = get_post_meta( $post->ID, '_recipe_hero_detail_serves_type', true );
    17 $equipment      = get_post_meta ( $post->ID, '_recipe_hero_detail_equipment', false );
     17$equipment      = get_post_meta( $post->ID, '_recipe_hero_detail_equipment', false );
    1818
    19 $format         = _x( '%dh %02dm', 'Abbreviations for time: Replace only h (hour) & m (minute) with appropriate appreviation', 'recipe-hero' );
    20 $prep_time      = recipe_hero_convert_minute_hour ( get_post_meta ( $post->ID, '_recipe_hero_detail_prep_time', true ), $format );
    21 $cook_time      = recipe_hero_convert_minute_hour ( get_post_meta ( $post->ID, '_recipe_hero_detail_cook_time', true ), $format );
    22 $total_time     = recipe_hero_convert_minute_hour ( recipe_hero_calc_total_cook_time() ); ?>
     19$prep_time      = recipe_hero_convert_minute_hour( get_post_meta( $post->ID, '_recipe_hero_detail_prep_time', true ) );
     20$cook_time      = recipe_hero_convert_minute_hour( get_post_meta( $post->ID, '_recipe_hero_detail_cook_time', true ) );
     21$total_time     = recipe_hero_convert_minute_hour( recipe_hero_calc_total_cook_time() ); ?>
    2322
    2423<div class="recipe-single-details">
  • recipe-hero/trunk/templates/single/meta.php

    r971440 r1043378  
    55 * @package   Recipe Hero
    66 * @author    Captain Theme <[email protected]>
    7  * @version       0.8.0
     7 * @version   1.0.2
    88 */
    99
    10 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
     10if ( ! defined( 'ABSPATH' ) ) {
     11    exit; // Exit if accessed directly
     12}
    1113
    1214$date = get_the_date();
     
    2325        <span class="dashicons dashicons-admin-users"></span> <span class="fn"><?php echo the_author_posts_link(); ?></span>
    2426    </div>
    25    
    26     <div class="comments-link">
    27          <meta itemprop="interactionCount" content="UserComments:<?php comments_number( '0', '1','%' ); ?>" />
    28         <span class="dashicons dashicons-testimonial"></span> <a href="#comments"><?php comments_number( __( '0 Comments', 'recipe-hero' ), __( '1 Comment', 'recipe-hero' ), __( '% Comments', 'recipe-hero' ) ); ?></a>
    29     </div>
     27
     28    <?php recipe_hero_get_template( 'single/rating.php' ); ?>
    3029   
    3130    <?php if ( get_edit_post_link() ) { ?>
Note: See TracChangeset for help on using the changeset viewer.