Version Description
- Feature: Show hours for longer recipe times
- Improvement: Prevent font size inconsistencies in template
- Fix: Don't associate recipes with revisions
- Fix: Capital letters in template names
Download this release
Release Info
Developer | BrechtVds |
Plugin | WP Recipe Maker |
Version | 1.6.0 |
Comparing to | |
See all releases |
Code changes from version 1.5.0 to 1.6.0
- assets/js/public/print.js +2 -2
- includes/admin/class-wprm-recipe-saver.php +6 -0
- includes/admin/import/class-wprm-import-easyrecipe.php +23 -3
- includes/class-wp-recipe-maker.php +1 -1
- includes/public/class-wprm-recipe.php +50 -0
- includes/public/class-wprm-settings.php +2 -2
- includes/public/class-wprm-template-helper.php +84 -0
- includes/public/class-wprm-template-manager.php +11 -0
- readme.txt +17 -0
- templates/admin/menu/addons.php +9 -15
- templates/admin/menu/faq/whats_new.php +24 -6
- templates/admin/settings/appearance.php +12 -0
- templates/recipe/clean-print-with-image/clean-print-with-image.jpg +0 -0
- templates/recipe/clean-print-with-image/clean-print-with-image.php +3 -3
- templates/recipe/clean-print-with-image/clean-print-with-image.png +0 -0
- templates/recipe/clean-print/clean-print.jpg +0 -0
- templates/recipe/clean-print/clean-print.php +3 -3
- templates/recipe/clean-print/clean-print.png +0 -0
- templates/recipe/simple/simple.jpg +0 -0
- templates/recipe/simple/simple.min.css +1 -1
- templates/recipe/simple/simple.php +6 -21
- templates/recipe/simple/simple.png +0 -0
- templates/recipe/simple/simple.scss +4 -0
- templates/recipe/tastefully-simple/tastefully-simple.jpg +0 -0
- templates/recipe/tastefully-simple/tastefully-simple.php +6 -21
- templates/recipe/tastefully-simple/tastefully-simple.png +0 -0
- wp-recipe-maker.php +1 -1
assets/js/public/print.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
var wprm = wprm || {};
|
2 |
|
3 |
-
wprm.print_recipe = function(recipe_id, servings
|
4 |
var print_window = window.open(wprm_public.home_url + 'wprm_print/' + recipe_id, '_blank');
|
5 |
print_window.onload = function() {
|
6 |
print_window.focus();
|
@@ -24,6 +24,6 @@ jQuery(document).ready(function($) {
|
|
24 |
e.preventDefault();
|
25 |
|
26 |
var recipe_id = jQuery(this).data('recipe-id');
|
27 |
-
wprm.print_recipe(recipe_id);
|
28 |
});
|
29 |
});
|
1 |
var wprm = wprm || {};
|
2 |
|
3 |
+
wprm.print_recipe = function(recipe_id, servings) {
|
4 |
var print_window = window.open(wprm_public.home_url + 'wprm_print/' + recipe_id, '_blank');
|
5 |
print_window.onload = function() {
|
6 |
print_window.focus();
|
24 |
e.preventDefault();
|
25 |
|
26 |
var recipe_id = jQuery(this).data('recipe-id');
|
27 |
+
wprm.print_recipe(recipe_id, false);
|
28 |
});
|
29 |
});
|
includes/admin/class-wprm-recipe-saver.php
CHANGED
@@ -140,6 +140,12 @@ class WPRM_Recipe_Saver {
|
|
140 |
* @param objoct $post Post being saved.
|
141 |
*/
|
142 |
public static function update_post( $id, $post ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
$recipe_ids = WPRM_Recipe_Manager::get_recipe_ids_from_content( $post->post_content );
|
144 |
|
145 |
foreach ( $recipe_ids as $recipe_id ) {
|
140 |
* @param objoct $post Post being saved.
|
141 |
*/
|
142 |
public static function update_post( $id, $post ) {
|
143 |
+
// Use parent post if we're currently updating a revision.
|
144 |
+
$revision_parent = wp_is_post_revision( $post );
|
145 |
+
if ( $revision_parent ) {
|
146 |
+
$post = get_post( $revision_parent );
|
147 |
+
}
|
148 |
+
|
149 |
$recipe_ids = WPRM_Recipe_Manager::get_recipe_ids_from_content( $post->post_content );
|
150 |
|
151 |
foreach ( $recipe_ids as $recipe_id ) {
|
includes/admin/import/class-wprm-import-easyrecipe.php
CHANGED
@@ -303,9 +303,29 @@ class WPRM_Import_Easyrecipe extends WPRM_Import {
|
|
303 |
// Nutrition.
|
304 |
$recipe['nutrition'] = array();
|
305 |
|
306 |
-
$
|
307 |
-
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
309 |
} else {
|
310 |
$recipe = false;
|
311 |
}
|
303 |
// Nutrition.
|
304 |
$recipe['nutrition'] = array();
|
305 |
|
306 |
+
$nutrition_mapping = array(
|
307 |
+
'servingSize' => 'serving_size',
|
308 |
+
'calories' => 'calories',
|
309 |
+
'carbohydrates' => 'carbohydrates',
|
310 |
+
'protein' => 'protein',
|
311 |
+
'fat' => 'fat',
|
312 |
+
'saturatedFat' => 'saturated_fat',
|
313 |
+
'unsaturatedFat' => 'polyunsaturated_fat',
|
314 |
+
'transFat' => 'trans_fat',
|
315 |
+
'cholesterol' => 'cholesterol',
|
316 |
+
'sodium' => 'sodium',
|
317 |
+
'fiber' => 'fiber',
|
318 |
+
'sugar' => 'sugar',
|
319 |
+
);
|
320 |
+
|
321 |
+
foreach ( $nutrition_mapping as $easyrecipe_field => $wprm_field ) {
|
322 |
+
$er_nutrition_data = $recipe_html->find( 'span[class=' . $easyrecipe_field . ']', 0 );
|
323 |
+
|
324 |
+
if ( is_object( $er_nutrition_data ) ) {
|
325 |
+
$value = trim( $er_nutrition_data->plaintext );
|
326 |
+
$recipe['nutrition'][ $wprm_field ] = $value;
|
327 |
+
}
|
328 |
+
}
|
329 |
} else {
|
330 |
$recipe = false;
|
331 |
}
|
includes/class-wp-recipe-maker.php
CHANGED
@@ -31,7 +31,7 @@ class WP_Recipe_Maker {
|
|
31 |
* @since 1.0.0
|
32 |
*/
|
33 |
private function define_constants() {
|
34 |
-
define( 'WPRM_VERSION', '1.
|
35 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
36 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
37 |
define( 'WPRM_URL', plugin_dir_url( dirname( __FILE__ ) ) );
|
31 |
* @since 1.0.0
|
32 |
*/
|
33 |
private function define_constants() {
|
34 |
+
define( 'WPRM_VERSION', '1.6.0' );
|
35 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
36 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
37 |
define( 'WPRM_URL', plugin_dir_url( dirname( __FILE__ ) ) );
|
includes/public/class-wprm-recipe.php
CHANGED
@@ -264,6 +264,16 @@ class WPRM_Recipe {
|
|
264 |
return maybe_unserialize( $this->meta( 'wprm_nutrition', array() ) );
|
265 |
}
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
/**
|
268 |
* Get the recipe rating.
|
269 |
*
|
@@ -294,6 +304,16 @@ class WPRM_Recipe {
|
|
294 |
return $rating;
|
295 |
}
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
/**
|
298 |
* Get the recipe summary.
|
299 |
*
|
@@ -330,6 +350,16 @@ class WPRM_Recipe {
|
|
330 |
return $this->meta( 'wprm_prep_time', 0 );
|
331 |
}
|
332 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
333 |
/**
|
334 |
* Get the recipe cook time.
|
335 |
*
|
@@ -339,6 +369,16 @@ class WPRM_Recipe {
|
|
339 |
return $this->meta( 'wprm_cook_time', 0 );
|
340 |
}
|
341 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
/**
|
343 |
* Get the recipe total time.
|
344 |
*
|
@@ -348,6 +388,16 @@ class WPRM_Recipe {
|
|
348 |
return $this->meta( 'wprm_total_time', 0 );
|
349 |
}
|
350 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
/**
|
352 |
* Get the recipe tags for a certain tag type.
|
353 |
*
|
264 |
return maybe_unserialize( $this->meta( 'wprm_nutrition', array() ) );
|
265 |
}
|
266 |
|
267 |
+
/**
|
268 |
+
* Does the recipe have a rating?
|
269 |
+
*
|
270 |
+
* @since 1.6.0
|
271 |
+
*/
|
272 |
+
public function has_rating() {
|
273 |
+
$rating = $this->rating();
|
274 |
+
return $rating['count'] > 0;
|
275 |
+
}
|
276 |
+
|
277 |
/**
|
278 |
* Get the recipe rating.
|
279 |
*
|
304 |
return $rating;
|
305 |
}
|
306 |
|
307 |
+
/**
|
308 |
+
* Get the recipe rating as formatted stars.
|
309 |
+
*
|
310 |
+
* @since 1.6.0
|
311 |
+
* @param boolean $show_details Wether to display the rating details.
|
312 |
+
*/
|
313 |
+
public function rating_stars( $show_details = false ) {
|
314 |
+
return WPRM_Template_Helper::rating_stars( $this->rating(), $show_details );
|
315 |
+
}
|
316 |
+
|
317 |
/**
|
318 |
* Get the recipe summary.
|
319 |
*
|
350 |
return $this->meta( 'wprm_prep_time', 0 );
|
351 |
}
|
352 |
|
353 |
+
/**
|
354 |
+
* Get the formatted recipe prep time.
|
355 |
+
*
|
356 |
+
* @since 1.6.0
|
357 |
+
* @param boolean $shorthand Wether to use shorthand for the unit text.
|
358 |
+
*/
|
359 |
+
public function prep_time_formatted( $shorthand = false ) {
|
360 |
+
return WPRM_Template_Helper::time( 'prep_time', $this->prep_time(), $shorthand );
|
361 |
+
}
|
362 |
+
|
363 |
/**
|
364 |
* Get the recipe cook time.
|
365 |
*
|
369 |
return $this->meta( 'wprm_cook_time', 0 );
|
370 |
}
|
371 |
|
372 |
+
/**
|
373 |
+
* Get the formatted recipe cook time.
|
374 |
+
*
|
375 |
+
* @since 1.6.0
|
376 |
+
* @param boolean $shorthand Wether to use shorthand for the unit text.
|
377 |
+
*/
|
378 |
+
public function cook_time_formatted( $shorthand = false ) {
|
379 |
+
return WPRM_Template_Helper::time( 'cook_time', $this->cook_time(), $shorthand );
|
380 |
+
}
|
381 |
+
|
382 |
/**
|
383 |
* Get the recipe total time.
|
384 |
*
|
388 |
return $this->meta( 'wprm_total_time', 0 );
|
389 |
}
|
390 |
|
391 |
+
/**
|
392 |
+
* Get the formatted recipe total time.
|
393 |
+
*
|
394 |
+
* @since 1.6.0
|
395 |
+
* @param boolean $shorthand Wether to use shorthand for the unit text.
|
396 |
+
*/
|
397 |
+
public function total_time_formatted( $shorthand = false ) {
|
398 |
+
return WPRM_Template_Helper::time( 'total_time', $this->total_time(), $shorthand );
|
399 |
+
}
|
400 |
+
|
401 |
/**
|
402 |
* Get the recipe tags for a certain tag type.
|
403 |
*
|
includes/public/class-wprm-settings.php
CHANGED
@@ -170,8 +170,8 @@ class WPRM_Settings {
|
|
170 |
*/
|
171 |
public static function form_save_settings() {
|
172 |
if ( isset( $_POST['wprm_settings'] ) && wp_verify_nonce( sanitize_key( $_POST['wprm_settings'] ), 'wprm_settings' ) ) { // Input var okay.
|
173 |
-
$default_recipe_template = isset( $_POST['default_recipe_template'] ) ?
|
174 |
-
$default_print_template = isset( $_POST['default_print_template'] ) ?
|
175 |
|
176 |
$settings = array();
|
177 |
|
170 |
*/
|
171 |
public static function form_save_settings() {
|
172 |
if ( isset( $_POST['wprm_settings'] ) && wp_verify_nonce( sanitize_key( $_POST['wprm_settings'] ), 'wprm_settings' ) ) { // Input var okay.
|
173 |
+
$default_recipe_template = isset( $_POST['default_recipe_template'] ) ? sanitize_text_field( wp_unslash( $_POST['default_recipe_template'] ) ) : ''; // Input var okay.
|
174 |
+
$default_print_template = isset( $_POST['default_print_template'] ) ? sanitize_text_field( wp_unslash( $_POST['default_print_template'] ) ) : ''; // Input var okay.
|
175 |
|
176 |
$settings = array();
|
177 |
|
includes/public/class-wprm-template-helper.php
CHANGED
@@ -40,4 +40,88 @@ class WPRM_Template_Helper {
|
|
40 |
return $name;
|
41 |
}
|
42 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
40 |
return $name;
|
41 |
}
|
42 |
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Display formatted time.
|
46 |
+
*
|
47 |
+
* @since 1.6.0
|
48 |
+
* @param mixed $type Type of time we're displaying.
|
49 |
+
* @param int $time Total minutes of time to display.
|
50 |
+
* @param boolean $shorthand Wether to use shorthand for the unit text.
|
51 |
+
*/
|
52 |
+
public static function time( $type, $time, $shorthand ) {
|
53 |
+
$hours = floor( $time / 60 );
|
54 |
+
$minutes = $time % 60;
|
55 |
+
|
56 |
+
$output = '';
|
57 |
+
|
58 |
+
if ( $hours > 0 ) {
|
59 |
+
$output .= '<span class="wprm-recipe-details wprm-recipe-details-hours wprm-recipe-' . $type . ' wprm-recipe-' . $type . '-hours">';
|
60 |
+
$output .= $hours;
|
61 |
+
$output .= '</span> <span class="wprm-recipe-details-unit wprm-recipe-details-unit-minutes wprm-recipe-' . $type . '-unit wprm-recipe-' . $type . 'unit-hours">';
|
62 |
+
|
63 |
+
if ( $shorthand ) {
|
64 |
+
$output .= $hours > 1 ? __( 'hr', 'wp-recipe-maker' ) : __( 'hrs', 'wp-recipe-maker' );
|
65 |
+
} else {
|
66 |
+
$output .= $hours > 1 ? __( 'hours', 'wp-recipe-maker' ) : __( 'hour', 'wp-recipe-maker' );
|
67 |
+
}
|
68 |
+
|
69 |
+
$output .= '</span>';
|
70 |
+
}
|
71 |
+
|
72 |
+
if ( $minutes > 0 ) {
|
73 |
+
if ( $hours > 0 ) {
|
74 |
+
$output .= ' ';
|
75 |
+
}
|
76 |
+
$output .= '<span class="wprm-recipe-details wprm-recipe-details-minutes wprm-recipe-' . $type . ' wprm-recipe-' . $type . '-minutes">';
|
77 |
+
$output .= $minutes;
|
78 |
+
$output .= '</span> <span class="wprm-recipe-details-unit wprm-recipe-details-minutes wprm-recipe-' . $type . '-unit wprm-recipe-' . $type . 'unit-minutes">';
|
79 |
+
|
80 |
+
if ( $shorthand ) {
|
81 |
+
$output .= $minutes > 1 ? __( 'mins', 'wp-recipe-maker' ) : __( 'min', 'wp-recipe-maker' );
|
82 |
+
} else {
|
83 |
+
$output .= $minutes > 1 ? __( 'minutes', 'wp-recipe-maker' ) : __( 'minutes', 'wp-recipe-maker' );
|
84 |
+
}
|
85 |
+
|
86 |
+
$output .= '</span>';
|
87 |
+
}
|
88 |
+
|
89 |
+
return $output;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Display the recipe rating as stars.
|
94 |
+
*
|
95 |
+
* @since 1.6.0
|
96 |
+
* @param array $rating Rating to display.
|
97 |
+
* @param boolean $show_details Wether to display the rating details.
|
98 |
+
*/
|
99 |
+
public static function rating_stars( $rating, $show_details = false ) {
|
100 |
+
$rating_value = ceil( $rating['average'] );
|
101 |
+
|
102 |
+
$output = '<div class="wprm-recipe-rating">';
|
103 |
+
for ( $i = 1; $i <= 5; $i++ ) {
|
104 |
+
$output .= '<span class="wprm-rating-star">';
|
105 |
+
if ( $i <= $rating_value ) {
|
106 |
+
ob_start();
|
107 |
+
include( WPRM_DIR . 'assets/icons/star-full.svg' );
|
108 |
+
$output .= ob_get_contents();
|
109 |
+
ob_end_clean();
|
110 |
+
} else {
|
111 |
+
ob_start();
|
112 |
+
include( WPRM_DIR . 'assets/icons/star-empty.svg' );
|
113 |
+
$output .= ob_get_contents();
|
114 |
+
ob_end_clean();
|
115 |
+
}
|
116 |
+
$output .= '</span>';
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( $show_details ) {
|
120 |
+
$output .= '<div class="wprm-recipe-rating-details" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><span itemprop="ratingValue">' . $rating['average'] . '</span> ' . __( 'from', 'wp-recipe-maker' ) . ' <span itemprop="ratingCount">' . $rating['count'] . '</span> ' . _n( 'vote', 'votes', $rating['count'], 'wp-recipe-maker' ) . '</div>';
|
121 |
+
}
|
122 |
+
|
123 |
+
$output .= '</div>';
|
124 |
+
|
125 |
+
return $output;
|
126 |
+
}
|
127 |
}
|
includes/public/class-wprm-template-manager.php
CHANGED
@@ -151,6 +151,17 @@ class WPRM_Template_Manager {
|
|
151 |
$templates[ $template['slug'] ] = $template;
|
152 |
}
|
153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
// Load custom templates from parent theme.
|
155 |
$theme_dir = get_template_directory();
|
156 |
|
151 |
$templates[ $template['slug'] ] = $template;
|
152 |
}
|
153 |
|
154 |
+
// Load premium templates.
|
155 |
+
if ( WPRM_Addons::is_active( 'premium' ) ) {
|
156 |
+
$dirs = array_filter( glob( WPRMP_DIR . 'templates/recipe/*' ), 'is_dir' );
|
157 |
+
$url = WPRMP_URL . 'templates/recipe/';
|
158 |
+
|
159 |
+
foreach ( $dirs as $dir ) {
|
160 |
+
$template = self::load_template( $dir, $url, false );
|
161 |
+
$templates[ $template['slug'] ] = $template;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
// Load custom templates from parent theme.
|
166 |
$theme_dir = get_template_directory();
|
167 |
|
readme.txt
CHANGED
@@ -35,6 +35,14 @@ Currently using another recipe plugin? No problem! You can easily migrate all yo
|
|
35 |
* WP Ultimate Recipe
|
36 |
* (More coming soon!)
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
This plugin is in active development. Feel free to contact us with any feature requests or ideas.
|
39 |
|
40 |
== Installation ==
|
@@ -69,6 +77,12 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
69 |
|
70 |
== Changelog ==
|
71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
= 1.5.0 =
|
73 |
* Feature: Set recipe author
|
74 |
* Improvement: Sanitize metadata before outputting
|
@@ -121,6 +135,9 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
121 |
|
122 |
== Upgrade notice ==
|
123 |
|
|
|
|
|
|
|
124 |
= 1.5.0 =
|
125 |
Fixed a few issues and added the recipe author field.
|
126 |
|
35 |
* WP Ultimate Recipe
|
36 |
* (More coming soon!)
|
37 |
|
38 |
+
Looking for some more advanced functionality? We also have the [WP Recipe Maker Premium](http://bootstrapped.ventures/wp-recipe-maker/) add-on available with the following features:
|
39 |
+
|
40 |
+
* Use **ingredient links** for linking to products or other recipes
|
41 |
+
* **Adjustable servings** make it easy for your visitors
|
42 |
+
* Display all nutrition data in a **nutrition label**
|
43 |
+
* Add a mobile-friendly **kitchen timer** to your recipes
|
44 |
+
* More **Premium templates** for a unique recipe template
|
45 |
+
|
46 |
This plugin is in active development. Feel free to contact us with any feature requests or ideas.
|
47 |
|
48 |
== Installation ==
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 1.6.0 =
|
81 |
+
* Feature: Show hours for longer recipe times
|
82 |
+
* Improvement: Prevent font size inconsistencies in template
|
83 |
+
* Fix: Don't associate recipes with revisions
|
84 |
+
* Fix: Capital letters in template names
|
85 |
+
|
86 |
= 1.5.0 =
|
87 |
* Feature: Set recipe author
|
88 |
* Improvement: Sanitize metadata before outputting
|
135 |
|
136 |
== Upgrade notice ==
|
137 |
|
138 |
+
= 1.6.0 =
|
139 |
+
Some minor updates and the release of WP Recipe Maker Premium
|
140 |
+
|
141 |
= 1.5.0 =
|
142 |
Fixed a few issues and added the recipe author field.
|
143 |
|
templates/admin/menu/addons.php
CHANGED
@@ -13,19 +13,13 @@
|
|
13 |
|
14 |
<div class="wrap wprm-addons">
|
15 |
<h1><?php echo esc_html_e( 'Add-Ons', 'wp-recipe-maker' ); ?></h1>
|
16 |
-
<
|
17 |
-
<
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
<input type="email" id="fields[email]" name="fields[email]" value="<?php echo esc_attr( $email ); ?>" />
|
26 |
-
</div>
|
27 |
-
<div>
|
28 |
-
<input type="submit" name="submit" value="Let me know when it's ready!" class="button button-primary" data-drip-attribute="sign-up-button" />
|
29 |
-
</div>
|
30 |
-
</form>
|
31 |
</div>
|
13 |
|
14 |
<div class="wrap wprm-addons">
|
15 |
<h1><?php echo esc_html_e( 'Add-Ons', 'wp-recipe-maker' ); ?></h1>
|
16 |
+
<h2>WP Recipe Maker Premium</h2>
|
17 |
+
<ul>
|
18 |
+
<li>Use <strong>ingredient links</strong> for linking to products or other recipes</li>
|
19 |
+
<li><strong>Adjustable servings</strong> make it easy for your visitors</li>
|
20 |
+
<li>Display all nutrition data in a <strong>nutrition label</strong></li>
|
21 |
+
<li>Add a mobile-friendly <strong>kitchen timer</strong> to your recipes</li>
|
22 |
+
<li>More <strong>Premium templates</strong> for a unique recipe template</li>
|
23 |
+
</ul>
|
24 |
+
<a class="button button-primary" href="http://bootstrapped.ventures/wp-recipe-maker/get-the-plugin/" target="_blank">Get the Plugin</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
</div>
|
templates/admin/menu/faq/whats_new.php
CHANGED
@@ -11,7 +11,25 @@
|
|
11 |
|
12 |
?>
|
13 |
|
14 |
-
<h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
<ul>
|
16 |
<li>Feature: Set recipe author</li>
|
17 |
<li>Improvement: Sanitize metadata before outputting</li>
|
@@ -20,7 +38,7 @@
|
|
20 |
<li>Fix: Prevent infinite shortcode loop</li>
|
21 |
</ul>
|
22 |
|
23 |
-
<h3>1.4.0</h3>
|
24 |
<ul>
|
25 |
<li>Feature: Access recipes though REST API</li>
|
26 |
<li>Feature: Choose specific recipe template in shortcode</li>
|
@@ -32,7 +50,7 @@
|
|
32 |
<li>Fix: Linebreak accumulation when updating recipes</li>
|
33 |
<li>Fix: Prevent Post Type Switcher plugin bug from breaking recipes</li>
|
34 |
</ul>
|
35 |
-
<h3>1.3.0</h3>
|
36 |
<ul>
|
37 |
<li>Feature: Import from WP Ultimate Recipe</li>
|
38 |
<li>Feature: wpDiscuz support for comment ratings</li>
|
@@ -41,7 +59,7 @@
|
|
41 |
<li>Improvement: Different print system for better browser compatibility</li>
|
42 |
<li>Fix: Round average comment rating to 2 decimals</li>
|
43 |
</ul>
|
44 |
-
<h3>1.2.0</h3>
|
45 |
<ul>
|
46 |
<li>Feature: New "Tastefully Simple" template, similar to EasyRecipe</li>
|
47 |
<li>Feature: New "Clean Print with Image" recipe template</li>
|
@@ -52,7 +70,7 @@
|
|
52 |
<li>Fix: Trailing slash issue in asset URLs</li>
|
53 |
</ul>
|
54 |
|
55 |
-
<h3>1.1.0</h3>
|
56 |
<ul>
|
57 |
<li>Feature: Comment ratings with metadata</li>
|
58 |
<li>Feature: Inline metadata for Pinterest rich pins</li>
|
@@ -61,7 +79,7 @@
|
|
61 |
<li>Improvement: Strip HTML from JSON-LD metadata</li>
|
62 |
</ul>
|
63 |
|
64 |
-
<h3>1.0.0</h3>
|
65 |
<ul>
|
66 |
<li>Feature: JSON-LD Metadata</li>
|
67 |
<li>Feature: Intuitive workflow using regular posts or pages</li>
|
11 |
|
12 |
?>
|
13 |
|
14 |
+
<h3>2016-10-25 | WP Recipe Maker Premium 1.0.0</h3>
|
15 |
+
<ul>
|
16 |
+
<li>Feature: Ingredient Links</li>
|
17 |
+
<li>Feature: Adjustable Servings</li>
|
18 |
+
<li>Feature: Nutrition Label</li>
|
19 |
+
<li>Feature: Kitchen Timer</li>
|
20 |
+
<li>Feature: Manage recipes overview page</li>
|
21 |
+
<li>Feature: 3 new Premium templates</li>
|
22 |
+
</ul>
|
23 |
+
|
24 |
+
<h3>2016-10-25 | WP Recipe Maker 1.6.0</h3>
|
25 |
+
<ul>
|
26 |
+
<li>Feature: Show hours for longer recipe times</li>
|
27 |
+
<li>Improvement: Prevent font size inconsistencies in template</li>
|
28 |
+
<li>Fix: Don't associate recipes with revisions</li>
|
29 |
+
<li>Fix: Capital letters in template names</li>
|
30 |
+
</ul>
|
31 |
+
|
32 |
+
<h3>2016-10-20 | WP Recipe Maker 1.5.0</h3>
|
33 |
<ul>
|
34 |
<li>Feature: Set recipe author</li>
|
35 |
<li>Improvement: Sanitize metadata before outputting</li>
|
38 |
<li>Fix: Prevent infinite shortcode loop</li>
|
39 |
</ul>
|
40 |
|
41 |
+
<h3>2016-10-10 | WP Recipe Maker 1.4.0</h3>
|
42 |
<ul>
|
43 |
<li>Feature: Access recipes though REST API</li>
|
44 |
<li>Feature: Choose specific recipe template in shortcode</li>
|
50 |
<li>Fix: Linebreak accumulation when updating recipes</li>
|
51 |
<li>Fix: Prevent Post Type Switcher plugin bug from breaking recipes</li>
|
52 |
</ul>
|
53 |
+
<h3>2016-09-27 | WP Recipe Maker 1.3.0</h3>
|
54 |
<ul>
|
55 |
<li>Feature: Import from WP Ultimate Recipe</li>
|
56 |
<li>Feature: wpDiscuz support for comment ratings</li>
|
59 |
<li>Improvement: Different print system for better browser compatibility</li>
|
60 |
<li>Fix: Round average comment rating to 2 decimals</li>
|
61 |
</ul>
|
62 |
+
<h3>2016-09-19 | WP Recipe Maker 1.2.0</h3>
|
63 |
<ul>
|
64 |
<li>Feature: New "Tastefully Simple" template, similar to EasyRecipe</li>
|
65 |
<li>Feature: New "Clean Print with Image" recipe template</li>
|
70 |
<li>Fix: Trailing slash issue in asset URLs</li>
|
71 |
</ul>
|
72 |
|
73 |
+
<h3>2016-09-10 | WP Recipe Maker 1.1.0</h3>
|
74 |
<ul>
|
75 |
<li>Feature: Comment ratings with metadata</li>
|
76 |
<li>Feature: Inline metadata for Pinterest rich pins</li>
|
79 |
<li>Improvement: Strip HTML from JSON-LD metadata</li>
|
80 |
</ul>
|
81 |
|
82 |
+
<h3>2016-09-07 | WP Recipe Maker 1.0.0</h3>
|
83 |
<ul>
|
84 |
<li>Feature: JSON-LD Metadata</li>
|
85 |
<li>Feature: Intuitive workflow using regular posts or pages</li>
|
templates/admin/settings/appearance.php
CHANGED
@@ -61,6 +61,18 @@
|
|
61 |
</p>
|
62 |
</td>
|
63 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
<tr>
|
65 |
<td colspan="2" class="template-preview-container">
|
66 |
<?php
|
61 |
</p>
|
62 |
</td>
|
63 |
</tr>
|
64 |
+
<?php if ( ! WPRM_Addons::is_active( 'premium' ) ) : ?>
|
65 |
+
<tr>
|
66 |
+
<th scope="row">
|
67 |
+
<label>Want more templates?</label>
|
68 |
+
</th>
|
69 |
+
<td>
|
70 |
+
<p class="description">
|
71 |
+
Get <a href="http://bootstrapped.ventures/wp-recipe-maker/get-the-plugin/" target="_blank">WP Recipe Maker Premium</a> for Premium templates and more!
|
72 |
+
</p>
|
73 |
+
</td>
|
74 |
+
</tr>
|
75 |
+
<?php endif; // Premium not active. ?>
|
76 |
<tr>
|
77 |
<td colspan="2" class="template-preview-container">
|
78 |
<?php
|
templates/recipe/clean-print-with-image/clean-print-with-image.jpg
ADDED
Binary file
|
templates/recipe/clean-print-with-image/clean-print-with-image.php
CHANGED
@@ -52,17 +52,17 @@
|
|
52 |
<div class="wprm-recipe-details-container wprm-recipe-times-container">
|
53 |
<?php if ( $recipe->prep_time() ) : ?>
|
54 |
<div class="wprm-recipe-prep-time-container">
|
55 |
-
<span class="wprm-recipe-details-name wprm-recipe-prep-time-name"><?php _e( 'Prep Time', 'wp-recipe-maker' ); ?></span>
|
56 |
</div>
|
57 |
<?php endif; // Prep time. ?>
|
58 |
<?php if ( $recipe->cook_time() ) : ?>
|
59 |
<div class="wprm-recipe-cook-time-container">
|
60 |
-
<span class="wprm-recipe-details-name wprm-recipe-cook-time-name"><?php _e( 'Cook Time', 'wp-recipe-maker' ); ?></span>
|
61 |
</div>
|
62 |
<?php endif; // Cook time. ?>
|
63 |
<?php if ( $recipe->total_time() ) : ?>
|
64 |
<div class="wprm-recipe-total-time-container">
|
65 |
-
<span class="wprm-recipe-details-name wprm-recipe-total-time-name"><?php _e( 'Total Time', 'wp-recipe-maker' ); ?></span>
|
66 |
</div>
|
67 |
<?php endif; // Total time. ?>
|
68 |
</div>
|
52 |
<div class="wprm-recipe-details-container wprm-recipe-times-container">
|
53 |
<?php if ( $recipe->prep_time() ) : ?>
|
54 |
<div class="wprm-recipe-prep-time-container">
|
55 |
+
<span class="wprm-recipe-details-name wprm-recipe-prep-time-name"><?php _e( 'Prep Time', 'wp-recipe-maker' ); ?></span> <?php echo $recipe->prep_time_formatted(); ?>
|
56 |
</div>
|
57 |
<?php endif; // Prep time. ?>
|
58 |
<?php if ( $recipe->cook_time() ) : ?>
|
59 |
<div class="wprm-recipe-cook-time-container">
|
60 |
+
<span class="wprm-recipe-details-name wprm-recipe-cook-time-name"><?php _e( 'Cook Time', 'wp-recipe-maker' ); ?></span> <?php echo $recipe->cook_time_formatted(); ?>
|
61 |
</div>
|
62 |
<?php endif; // Cook time. ?>
|
63 |
<?php if ( $recipe->total_time() ) : ?>
|
64 |
<div class="wprm-recipe-total-time-container">
|
65 |
+
<span class="wprm-recipe-details-name wprm-recipe-total-time-name"><?php _e( 'Total Time', 'wp-recipe-maker' ); ?></span> <?php echo $recipe->total_time_formatted(); ?>
|
66 |
</div>
|
67 |
<?php endif; // Total time. ?>
|
68 |
</div>
|
templates/recipe/clean-print-with-image/clean-print-with-image.png
DELETED
Binary file
|
templates/recipe/clean-print/clean-print.jpg
ADDED
Binary file
|
templates/recipe/clean-print/clean-print.php
CHANGED
@@ -51,17 +51,17 @@
|
|
51 |
<div class="wprm-recipe-details-container wprm-recipe-times-container">
|
52 |
<?php if ( $recipe->prep_time() ) : ?>
|
53 |
<div class="wprm-recipe-prep-time-container">
|
54 |
-
<span class="wprm-recipe-details-name wprm-recipe-prep-time-name"><?php _e( 'Prep Time', 'wp-recipe-maker' ); ?></span>
|
55 |
</div>
|
56 |
<?php endif; // Prep time. ?>
|
57 |
<?php if ( $recipe->cook_time() ) : ?>
|
58 |
<div class="wprm-recipe-cook-time-container">
|
59 |
-
<span class="wprm-recipe-details-name wprm-recipe-cook-time-name"><?php _e( 'Cook Time', 'wp-recipe-maker' ); ?></span>
|
60 |
</div>
|
61 |
<?php endif; // Cook time. ?>
|
62 |
<?php if ( $recipe->total_time() ) : ?>
|
63 |
<div class="wprm-recipe-total-time-container">
|
64 |
-
<span class="wprm-recipe-details-name wprm-recipe-total-time-name"><?php _e( 'Total Time', 'wp-recipe-maker' ); ?></span>
|
65 |
</div>
|
66 |
<?php endif; // Total time. ?>
|
67 |
</div>
|
51 |
<div class="wprm-recipe-details-container wprm-recipe-times-container">
|
52 |
<?php if ( $recipe->prep_time() ) : ?>
|
53 |
<div class="wprm-recipe-prep-time-container">
|
54 |
+
<span class="wprm-recipe-details-name wprm-recipe-prep-time-name"><?php _e( 'Prep Time', 'wp-recipe-maker' ); ?></span> <?php echo $recipe->prep_time_formatted(); ?>
|
55 |
</div>
|
56 |
<?php endif; // Prep time. ?>
|
57 |
<?php if ( $recipe->cook_time() ) : ?>
|
58 |
<div class="wprm-recipe-cook-time-container">
|
59 |
+
<span class="wprm-recipe-details-name wprm-recipe-cook-time-name"><?php _e( 'Cook Time', 'wp-recipe-maker' ); ?></span> <?php echo $recipe->cook_time_formatted(); ?>
|
60 |
</div>
|
61 |
<?php endif; // Cook time. ?>
|
62 |
<?php if ( $recipe->total_time() ) : ?>
|
63 |
<div class="wprm-recipe-total-time-container">
|
64 |
+
<span class="wprm-recipe-details-name wprm-recipe-total-time-name"><?php _e( 'Total Time', 'wp-recipe-maker' ); ?></span> <?php echo $recipe->total_time_formatted(); ?>
|
65 |
</div>
|
66 |
<?php endif; // Total time. ?>
|
67 |
</div>
|
templates/recipe/clean-print/clean-print.png
DELETED
Binary file
|
templates/recipe/simple/simple.jpg
ADDED
Binary file
|
templates/recipe/simple/simple.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wprm-recipe-simple{border-top:1px solid #aaa;background-color:#fafafa;padding:10px;margin:20px 0;font-size:.9em}.wprm-recipe-simple h2.wprm-recipe-name,.wprm-recipe-simple h3.wprm-recipe-header,.wprm-recipe-simple h4.wprm-recipe-group-name{font-variant:normal;text-transform:none;letter-spacing:normal;margin:0}.wprm-recipe-simple .wprm-recipe-image-container{float:right;text-align:center;margin:0 0 10px 10px}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-image{margin:0}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-rating{margin-bottom:5px}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-rating svg{vertical-align:middle;width:16px;height:16px;margin:0}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-rating .wprm-recipe-rating-details{font-size:.8em}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-print{font-size:.9em;cursor:pointer}.wprm-recipe-simple h2.wprm-recipe-name{clear:none;font-size:1.8em}.wprm-recipe-simple .wprm-recipe-details-container,.wprm-recipe-simple .wprm-recipe-summary{margin-bottom:15px}.wprm-recipe-simple .wprm-recipe-details-icon svg{vertical-align:middle;width:16px;height:16px}.wprm-recipe-simple .wprm-recipe-details-name{display:inline-block;font-weight:700;min-width:130px}.wprm-recipe-simple .wprm-recipe-details-unit{font-size:.8em}.wprm-recipe-simple h3.wprm-recipe-header{margin-top:10px;font-size:1.2em}.wprm-recipe-simple ol,.wprm-recipe-simple ul{margin:0 0 8px}.wprm-recipe-simple ol li,.wprm-recipe-simple ul li{margin:0 0 0 32px}.wprm-recipe-simple h4.wprm-recipe-group-name{margin-top:5px!important;font-weight:300;font-size:1em}.wprm-recipe-simple .wprm-recipe-ingredient-notes{color:#999}.wprm-recipe-simple .wprm-recipe-instructions .wprm-recipe-instruction{margin-bottom:5px}.wprm-recipe-simple .wprm-recipe-instruction-text p{margin:0 0 5px}.wprm-recipe-simple .wprm-recipe-instruction-text p:last-of-type{margin-bottom:0}.wprm-recipe-simple .wprm-recipe-instruction-image{margin:5px 0 15px}.wprm-print .wprm-recipe-simple{max-width:750px;margin:0 auto}.wprm-print .wprm-recipe-print{display:none}@media only screen and (max-width:640px){.wprm-recipe-simple .wprm-recipe-image-container{float:none}.wprm-recipe-simple .wprm-recipe-details-name{min-width:0}}
|
1 |
+
.wprm-recipe-simple{border-top:1px solid #aaa;background-color:#fafafa;padding:10px;margin:20px 0;font-size:.9em}.wprm-recipe-simple li,.wprm-recipe-simple p{font-size:1em}.wprm-recipe-simple h2.wprm-recipe-name,.wprm-recipe-simple h3.wprm-recipe-header,.wprm-recipe-simple h4.wprm-recipe-group-name{font-variant:normal;text-transform:none;letter-spacing:normal;margin:0}.wprm-recipe-simple .wprm-recipe-image-container{float:right;text-align:center;margin:0 0 10px 10px}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-image{margin:0}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-rating{margin-bottom:5px}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-rating svg{vertical-align:middle;width:16px;height:16px;margin:0}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-rating .wprm-recipe-rating-details{font-size:.8em}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-print{font-size:.9em;cursor:pointer}.wprm-recipe-simple h2.wprm-recipe-name{clear:none;font-size:1.8em}.wprm-recipe-simple .wprm-recipe-details-container,.wprm-recipe-simple .wprm-recipe-summary{margin-bottom:15px}.wprm-recipe-simple .wprm-recipe-details-icon svg{vertical-align:middle;width:16px;height:16px}.wprm-recipe-simple .wprm-recipe-details-name{display:inline-block;font-weight:700;min-width:130px}.wprm-recipe-simple .wprm-recipe-details-unit{font-size:.8em}.wprm-recipe-simple h3.wprm-recipe-header{margin-top:10px;font-size:1.2em}.wprm-recipe-simple ol,.wprm-recipe-simple ul{margin:0 0 8px}.wprm-recipe-simple ol li,.wprm-recipe-simple ul li{margin:0 0 0 32px}.wprm-recipe-simple h4.wprm-recipe-group-name{margin-top:5px!important;font-weight:300;font-size:1em}.wprm-recipe-simple .wprm-recipe-ingredient-notes{color:#999}.wprm-recipe-simple .wprm-recipe-instructions .wprm-recipe-instruction{margin-bottom:5px}.wprm-recipe-simple .wprm-recipe-instruction-text p{margin:0 0 5px}.wprm-recipe-simple .wprm-recipe-instruction-text p:last-of-type{margin-bottom:0}.wprm-recipe-simple .wprm-recipe-instruction-image{margin:5px 0 15px}.wprm-print .wprm-recipe-simple{max-width:750px;margin:0 auto}.wprm-print .wprm-recipe-print{display:none}@media only screen and (max-width:640px){.wprm-recipe-simple .wprm-recipe-image-container{float:none}.wprm-recipe-simple .wprm-recipe-details-name{min-width:0}}
|
templates/recipe/simple/simple.php
CHANGED
@@ -19,25 +19,10 @@
|
|
19 |
<div class="wprm-recipe-image"><?php echo $recipe->image(); ?></div>
|
20 |
<div class="wprm-recipe-buttons">
|
21 |
<?php
|
22 |
-
|
23 |
-
|
|
|
24 |
?>
|
25 |
-
<div class="wprm-recipe-rating">
|
26 |
-
<?php
|
27 |
-
$rating_value = ceil ( $rating['average'] );
|
28 |
-
for ( $i = 1; $i <= 5; $i++ ) {
|
29 |
-
echo '<span class="wprm-rating-star">';
|
30 |
-
if ( $i <= $rating_value ) {
|
31 |
-
include( WPRM_DIR . 'assets/icons/star-full.svg' );
|
32 |
-
} else {
|
33 |
-
include( WPRM_DIR . 'assets/icons/star-empty.svg' );
|
34 |
-
}
|
35 |
-
echo '</span>';
|
36 |
-
}
|
37 |
-
?>
|
38 |
-
<div class="wprm-recipe-rating-details" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><span itemprop="ratingValue"><?php echo esc_html( $rating['average'] ); ?></span> <?php esc_html_e( 'from', 'wp-recipe-maker' ); ?> <span itemprop="ratingCount"><?php echo esc_html( $rating['count'] ); ?></span> <?php echo esc_html( _n( 'vote', 'votes', $rating['count'], 'wp-recipe-maker' ) ); ?></div>
|
39 |
-
</div>
|
40 |
-
<?php endif; // Rating. ?>
|
41 |
<span class="wprm-recipe-print"><span class="wprm-recipe-details-icon"><?php include( WPRM_DIR . 'assets/icons/printer.svg' ); ?></span> <?php _e( 'Print', 'wp-recipe-maker' ); ?></span>
|
42 |
</div>
|
43 |
</div>
|
@@ -81,19 +66,19 @@
|
|
81 |
<?php if ( $recipe->prep_time() ) : ?>
|
82 |
<div class="wprm-recipe-prep-time-container">
|
83 |
<meta itemprop="prepTime" content="PT<?php echo $recipe->prep_time(); ?>M" />
|
84 |
-
<span class="wprm-recipe-details-icon"><?php include( WPRM_DIR . 'assets/icons/knife.svg' ); ?></span> <span class="wprm-recipe-details-name wprm-recipe-prep-time-name"><?php _e( 'Prep Time', 'wp-recipe-maker' ); ?></span>
|
85 |
</div>
|
86 |
<?php endif; // Prep time. ?>
|
87 |
<?php if ( $recipe->cook_time() ) : ?>
|
88 |
<div class="wprm-recipe-cook-time-container">
|
89 |
<meta itemprop="cookTime" content="PT<?php echo $recipe->cook_time(); ?>M" />
|
90 |
-
<span class="wprm-recipe-details-icon"><?php include( WPRM_DIR . 'assets/icons/pan.svg' ); ?></span> <span class="wprm-recipe-details-name wprm-recipe-cook-time-name"><?php _e( 'Cook Time', 'wp-recipe-maker' ); ?></span>
|
91 |
</div>
|
92 |
<?php endif; // Cook time. ?>
|
93 |
<?php if ( $recipe->total_time() ) : ?>
|
94 |
<div class="wprm-recipe-total-time-container">
|
95 |
<meta itemprop="totalTime" content="PT<?php echo $recipe->total_time(); ?>M" />
|
96 |
-
<span class="wprm-recipe-details-icon"><?php include( WPRM_DIR . 'assets/icons/clock.svg' ); ?></span> <span class="wprm-recipe-details-name wprm-recipe-total-time-name"><?php _e( 'Total Time', 'wp-recipe-maker' ); ?></span>
|
97 |
</div>
|
98 |
<?php endif; // Total time. ?>
|
99 |
</div>
|
19 |
<div class="wprm-recipe-image"><?php echo $recipe->image(); ?></div>
|
20 |
<div class="wprm-recipe-buttons">
|
21 |
<?php
|
22 |
+
if ( $recipe->has_rating() ) {
|
23 |
+
echo $recipe->rating_stars( true );
|
24 |
+
}
|
25 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
<span class="wprm-recipe-print"><span class="wprm-recipe-details-icon"><?php include( WPRM_DIR . 'assets/icons/printer.svg' ); ?></span> <?php _e( 'Print', 'wp-recipe-maker' ); ?></span>
|
27 |
</div>
|
28 |
</div>
|
66 |
<?php if ( $recipe->prep_time() ) : ?>
|
67 |
<div class="wprm-recipe-prep-time-container">
|
68 |
<meta itemprop="prepTime" content="PT<?php echo $recipe->prep_time(); ?>M" />
|
69 |
+
<span class="wprm-recipe-details-icon"><?php include( WPRM_DIR . 'assets/icons/knife.svg' ); ?></span> <span class="wprm-recipe-details-name wprm-recipe-prep-time-name"><?php _e( 'Prep Time', 'wp-recipe-maker' ); ?></span> <?php echo $recipe->prep_time_formatted(); ?>
|
70 |
</div>
|
71 |
<?php endif; // Prep time. ?>
|
72 |
<?php if ( $recipe->cook_time() ) : ?>
|
73 |
<div class="wprm-recipe-cook-time-container">
|
74 |
<meta itemprop="cookTime" content="PT<?php echo $recipe->cook_time(); ?>M" />
|
75 |
+
<span class="wprm-recipe-details-icon"><?php include( WPRM_DIR . 'assets/icons/pan.svg' ); ?></span> <span class="wprm-recipe-details-name wprm-recipe-cook-time-name"><?php _e( 'Cook Time', 'wp-recipe-maker' ); ?></span> <?php echo $recipe->cook_time_formatted(); ?>
|
76 |
</div>
|
77 |
<?php endif; // Cook time. ?>
|
78 |
<?php if ( $recipe->total_time() ) : ?>
|
79 |
<div class="wprm-recipe-total-time-container">
|
80 |
<meta itemprop="totalTime" content="PT<?php echo $recipe->total_time(); ?>M" />
|
81 |
+
<span class="wprm-recipe-details-icon"><?php include( WPRM_DIR . 'assets/icons/clock.svg' ); ?></span> <span class="wprm-recipe-details-name wprm-recipe-total-time-name"><?php _e( 'Total Time', 'wp-recipe-maker' ); ?></span> <?php echo $recipe->total_time_formatted(); ?>
|
82 |
</div>
|
83 |
<?php endif; // Total time. ?>
|
84 |
</div>
|
templates/recipe/simple/simple.png
DELETED
Binary file
|
templates/recipe/simple/simple.scss
CHANGED
@@ -5,6 +5,10 @@
|
|
5 |
margin: 20px 0;
|
6 |
font-size: 0.9em;
|
7 |
|
|
|
|
|
|
|
|
|
8 |
h2.wprm-recipe-name,
|
9 |
h3.wprm-recipe-header,
|
10 |
h4.wprm-recipe-group-name {
|
5 |
margin: 20px 0;
|
6 |
font-size: 0.9em;
|
7 |
|
8 |
+
p, li {
|
9 |
+
font-size: 1em;
|
10 |
+
}
|
11 |
+
|
12 |
h2.wprm-recipe-name,
|
13 |
h3.wprm-recipe-header,
|
14 |
h4.wprm-recipe-group-name {
|
templates/recipe/tastefully-simple/tastefully-simple.jpg
ADDED
Binary file
|
templates/recipe/tastefully-simple/tastefully-simple.php
CHANGED
@@ -17,25 +17,10 @@
|
|
17 |
<meta itemprop="image" content="<?php echo $recipe->image_url( 'full' ); ?>" />
|
18 |
<div class="wprm-recipe-image-container">
|
19 |
<?php
|
20 |
-
|
21 |
-
|
|
|
22 |
?>
|
23 |
-
<div class="wprm-recipe-rating">
|
24 |
-
<?php
|
25 |
-
$rating_value = ceil ( $rating['average'] );
|
26 |
-
for ( $i = 1; $i <= 5; $i++ ) {
|
27 |
-
echo '<span class="wprm-rating-star">';
|
28 |
-
if ( $i <= $rating_value ) {
|
29 |
-
include( WPRM_DIR . 'assets/icons/star-full.svg' );
|
30 |
-
} else {
|
31 |
-
include( WPRM_DIR . 'assets/icons/star-empty.svg' );
|
32 |
-
}
|
33 |
-
echo '</span>';
|
34 |
-
}
|
35 |
-
?>
|
36 |
-
<div class="wprm-recipe-rating-details" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><span itemprop="ratingValue"><?php echo esc_html( $rating['average'] ); ?></span> <?php esc_html_e( 'from', 'wp-recipe-maker' ); ?> <span itemprop="ratingCount"><?php echo esc_html( $rating['count'] ); ?></span> <?php echo esc_html( _n( 'vote', 'votes', $rating['count'], 'wp-recipe-maker' ) ); ?></div>
|
37 |
-
</div>
|
38 |
-
<?php endif; // Rating. ?>
|
39 |
<div class="wprm-recipe-image"><?php echo $recipe->image(); ?></div>
|
40 |
<div class="wprm-recipe-buttons">
|
41 |
<span class="wprm-recipe-print"><?php _e( 'Print', 'wp-recipe-maker' ); ?></span>
|
@@ -48,21 +33,21 @@
|
|
48 |
<div class="wprm-recipe-time-container">
|
49 |
<meta itemprop="prepTime" content="PT<?php echo $recipe->prep_time(); ?>M" />
|
50 |
<div class="wprm-recipe-time-header"><?php _e( 'Prep Time', 'wp-recipe-maker' ); ?></div>
|
51 |
-
<div class="wprm-recipe-time"><?php echo $recipe->
|
52 |
</div>
|
53 |
<?php endif; // Prep time. ?>
|
54 |
<?php if ( $recipe->cook_time() ) : ?>
|
55 |
<div class="wprm-recipe-time-container">
|
56 |
<meta itemprop="cookTime" content="PT<?php echo $recipe->cook_time(); ?>M" />
|
57 |
<div class="wprm-recipe-time-header"><?php _e( 'Cook Time', 'wp-recipe-maker' ); ?></div>
|
58 |
-
<div class="wprm-recipe-time"><?php echo $recipe->
|
59 |
</div>
|
60 |
<?php endif; // Cook time. ?>
|
61 |
<?php if ( $recipe->total_time() ) : ?>
|
62 |
<div class="wprm-recipe-time-container">
|
63 |
<meta itemprop="totalTime" content="PT<?php echo $recipe->total_time(); ?>M" />
|
64 |
<div class="wprm-recipe-time-header"><?php _e( 'Total Time', 'wp-recipe-maker' ); ?></div>
|
65 |
-
<div class="wprm-recipe-time"><?php echo $recipe->
|
66 |
</div>
|
67 |
<?php endif; // Total time. ?>
|
68 |
<div class="wprm-clear-left"> </div>
|
17 |
<meta itemprop="image" content="<?php echo $recipe->image_url( 'full' ); ?>" />
|
18 |
<div class="wprm-recipe-image-container">
|
19 |
<?php
|
20 |
+
if ( $recipe->has_rating() ) {
|
21 |
+
echo $recipe->rating_stars( true );
|
22 |
+
}
|
23 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
<div class="wprm-recipe-image"><?php echo $recipe->image(); ?></div>
|
25 |
<div class="wprm-recipe-buttons">
|
26 |
<span class="wprm-recipe-print"><?php _e( 'Print', 'wp-recipe-maker' ); ?></span>
|
33 |
<div class="wprm-recipe-time-container">
|
34 |
<meta itemprop="prepTime" content="PT<?php echo $recipe->prep_time(); ?>M" />
|
35 |
<div class="wprm-recipe-time-header"><?php _e( 'Prep Time', 'wp-recipe-maker' ); ?></div>
|
36 |
+
<div class="wprm-recipe-time"><?php echo $recipe->prep_time_formatted( true ); ?></div>
|
37 |
</div>
|
38 |
<?php endif; // Prep time. ?>
|
39 |
<?php if ( $recipe->cook_time() ) : ?>
|
40 |
<div class="wprm-recipe-time-container">
|
41 |
<meta itemprop="cookTime" content="PT<?php echo $recipe->cook_time(); ?>M" />
|
42 |
<div class="wprm-recipe-time-header"><?php _e( 'Cook Time', 'wp-recipe-maker' ); ?></div>
|
43 |
+
<div class="wprm-recipe-time"><?php echo $recipe->cook_time_formatted( true ); ?></div>
|
44 |
</div>
|
45 |
<?php endif; // Cook time. ?>
|
46 |
<?php if ( $recipe->total_time() ) : ?>
|
47 |
<div class="wprm-recipe-time-container">
|
48 |
<meta itemprop="totalTime" content="PT<?php echo $recipe->total_time(); ?>M" />
|
49 |
<div class="wprm-recipe-time-header"><?php _e( 'Total Time', 'wp-recipe-maker' ); ?></div>
|
50 |
+
<div class="wprm-recipe-time"><?php echo $recipe->total_time_formatted( true ); ?></div>
|
51 |
</div>
|
52 |
<?php endif; // Total time. ?>
|
53 |
<div class="wprm-clear-left"> </div>
|
templates/recipe/tastefully-simple/tastefully-simple.png
DELETED
Binary file
|
wp-recipe-maker.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: WP Recipe Maker
|
16 |
* Plugin URI: http://bootstrapped.ventures/wp-recipe-maker/
|
17 |
* Description: The easy and user-friendly recipe plugin for everyone. Automatic JSON-LD metadata for better SEO will get you more visitors!
|
18 |
-
* Version: 1.
|
19 |
* Author: Bootstrapped Ventures
|
20 |
* Author URI: http://bootstrapped.ventures/
|
21 |
* License: GPL-2.0+
|
15 |
* Plugin Name: WP Recipe Maker
|
16 |
* Plugin URI: http://bootstrapped.ventures/wp-recipe-maker/
|
17 |
* Description: The easy and user-friendly recipe plugin for everyone. Automatic JSON-LD metadata for better SEO will get you more visitors!
|
18 |
+
* Version: 1.6.0
|
19 |
* Author: Bootstrapped Ventures
|
20 |
* Author URI: http://bootstrapped.ventures/
|
21 |
* License: GPL-2.0+
|