Version Description
- Feature: Access recipes though REST API
- Feature: Choose specific recipe template in shortcode
- Improvement: Check for leftover ER comment ratings when importing from WP Ultimate Recipe
- Improvement: Execute shortcodes in the recipe template
- Fix: Include correct stylesheet when using recipe templates from theme
- Fix: Show all recipes to be checked instead of just 8 recipes
- Fix: Use correct print URL if WordPress is in a subdirectory
- Fix: Linebreak accumulation when updating recipes
- Fix: Prevent Post Type Switcher plugin bug from breaking recipes
Download this release
Release Info
Developer | BrechtVds |
Plugin | WP Recipe Maker |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.0 to 1.4.0
- assets/js/admin/shortcode-tinymce.js +1 -0
- assets/js/public/print.js +1 -1
- includes/admin/class-wprm-import-manager.php +1 -0
- includes/admin/class-wprm-recipe-saver.php +16 -0
- includes/admin/import/class-wprm-import-wpultimaterecipe.php +10 -0
- includes/class-wp-recipe-maker.php +2 -1
- includes/public/class-wprm-api.php +73 -0
- includes/public/class-wprm-fallback-recipe.php +8 -3
- includes/public/class-wprm-print.php +1 -0
- includes/public/class-wprm-shortcode.php +3 -1
- includes/public/class-wprm-template-manager.php +23 -14
- readme.txt +15 -0
- templates/admin/menu/faq/whats_new.php +12 -0
- templates/admin/menu/import-overview.php +11 -0
- templates/public/fallback-recipe.php +9 -0
- templates/recipe/clean-print-with-image/clean-print-with-image.min.css +1 -1
- templates/recipe/clean-print-with-image/clean-print-with-image.php +2 -2
- templates/recipe/clean-print-with-image/clean-print-with-image.scss +8 -1
- templates/recipe/clean-print/clean-print.min.css +1 -1
- templates/recipe/clean-print/clean-print.scss +7 -0
- templates/recipe/simple/simple.min.css +1 -1
- templates/recipe/simple/simple.scss +7 -1
- templates/recipe/tastefully-simple/tastefully-simple.min.css +1 -1
- templates/recipe/tastefully-simple/tastefully-simple.scss +4 -0
- wp-recipe-maker.php +1 -1
assets/js/admin/shortcode-tinymce.js
CHANGED
@@ -66,6 +66,7 @@
|
|
66 |
});
|
67 |
|
68 |
editor.on('BeforeSetContent', function(event) {
|
|
|
69 |
event.content = event.content.replace(/^(\s*<p>)(\s*\[wprm-recipe)/, '$1<span class="wprm-placeholder" contentEditable="false"> </span>$2');
|
70 |
event.content = replaceShortcodes(event.content);
|
71 |
});
|
66 |
});
|
67 |
|
68 |
editor.on('BeforeSetContent', function(event) {
|
69 |
+
event.content = event.content.replace(/(<p>)?\s*<span class="wprm-placeholder" data-mce-contenteditable="false"> <\/span>\s*(<\/p>)?/gi,'');
|
70 |
event.content = event.content.replace(/^(\s*<p>)(\s*\[wprm-recipe)/, '$1<span class="wprm-placeholder" contentEditable="false"> </span>$2');
|
71 |
event.content = replaceShortcodes(event.content);
|
72 |
});
|
assets/js/public/print.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
var wprm = wprm || {};
|
2 |
|
3 |
wprm.print_recipe = function(recipe_id) {
|
4 |
-
var print_window = window.open('
|
5 |
print_window.onload = function() {
|
6 |
print_window.focus();
|
7 |
print_window.document.title = document.title;
|
1 |
var wprm = wprm || {};
|
2 |
|
3 |
wprm.print_recipe = function(recipe_id) {
|
4 |
+
var print_window = window.open(wprm_public.home_url + 'wprm_print/' + recipe_id, '_blank');
|
5 |
print_window.onload = function() {
|
6 |
print_window.focus();
|
7 |
print_window.document.title = document.title;
|
includes/admin/class-wprm-import-manager.php
CHANGED
@@ -188,6 +188,7 @@ class WPRM_Import_Manager {
|
|
188 |
'orderby' => 'date',
|
189 |
'order' => 'DESC',
|
190 |
'meta_key' => 'wprm_import_source',
|
|
|
191 |
);
|
192 |
|
193 |
if ( $exclude_checked ) {
|
188 |
'orderby' => 'date',
|
189 |
'order' => 'DESC',
|
190 |
'meta_key' => 'wprm_import_source',
|
191 |
+
'nopaging' => true,
|
192 |
);
|
193 |
|
194 |
if ( $exclude_checked ) {
|
includes/admin/class-wprm-recipe-saver.php
CHANGED
@@ -27,6 +27,8 @@ class WPRM_Recipe_Saver {
|
|
27 |
public static function init() {
|
28 |
add_action( 'wp_ajax_wprm_save_recipe', array( __CLASS__, 'ajax_save_recipe' ) );
|
29 |
add_action( 'save_post', array( __CLASS__, 'update_post' ), 10, 2 );
|
|
|
|
|
30 |
}
|
31 |
|
32 |
/**
|
@@ -151,6 +153,20 @@ class WPRM_Recipe_Saver {
|
|
151 |
update_post_meta( $recipe_id, 'wprm_parent_post_id', $post->ID );
|
152 |
}
|
153 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
}
|
155 |
|
156 |
WPRM_Recipe_Saver::init();
|
27 |
public static function init() {
|
28 |
add_action( 'wp_ajax_wprm_save_recipe', array( __CLASS__, 'ajax_save_recipe' ) );
|
29 |
add_action( 'save_post', array( __CLASS__, 'update_post' ), 10, 2 );
|
30 |
+
|
31 |
+
add_filter( 'wp_insert_post_data', array( __CLASS__, 'post_type_switcher_fix' ), 20, 2 );
|
32 |
}
|
33 |
|
34 |
/**
|
153 |
update_post_meta( $recipe_id, 'wprm_parent_post_id', $post->ID );
|
154 |
}
|
155 |
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Prevent post type switcher bug from changing our recipe's post type.
|
159 |
+
*
|
160 |
+
* @since 1.4.0
|
161 |
+
* @param array $data Data that might have been modified by Post Type Switcher.
|
162 |
+
* @param array $postarr Unmodified post data.
|
163 |
+
*/
|
164 |
+
public static function post_type_switcher_fix( $data, $postarr ) {
|
165 |
+
if ( WPRM_POST_TYPE === $postarr['post_type'] ) {
|
166 |
+
$data['post_type'] = WPRM_POST_TYPE;
|
167 |
+
}
|
168 |
+
return $data;
|
169 |
+
}
|
170 |
}
|
171 |
|
172 |
WPRM_Recipe_Saver::init();
|
includes/admin/import/class-wprm-import-wpultimaterecipe.php
CHANGED
@@ -299,6 +299,16 @@ class WPRM_Import_Wpultimaterecipe extends WPRM_Import {
|
|
299 |
'post_content' => $content,
|
300 |
);
|
301 |
wp_update_post( $update_content );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
}
|
303 |
}
|
304 |
|
299 |
'post_content' => $content,
|
300 |
);
|
301 |
wp_update_post( $update_content );
|
302 |
+
|
303 |
+
// Migrate potential ER comment ratings.
|
304 |
+
$comments = get_comments( array( 'post_id' => $id ) );
|
305 |
+
|
306 |
+
foreach ( $comments as $comment ) {
|
307 |
+
$comment_rating = intval( get_comment_meta( $comment->comment_ID, 'ERRating', true ) );
|
308 |
+
if ( $comment_rating ) {
|
309 |
+
update_comment_meta( $comment->comment_ID, 'wprm-comment-rating', $comment_rating );
|
310 |
+
}
|
311 |
+
}
|
312 |
}
|
313 |
}
|
314 |
|
includes/class-wp-recipe-maker.php
CHANGED
@@ -41,7 +41,7 @@ class WP_Recipe_Maker {
|
|
41 |
* @since 1.0.0
|
42 |
*/
|
43 |
private function define_constants() {
|
44 |
-
define( 'WPRM_VERSION', '1.
|
45 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
46 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
47 |
define( 'WPRM_URL', plugin_dir_url( dirname( __FILE__ ) ) );
|
@@ -57,6 +57,7 @@ class WP_Recipe_Maker {
|
|
57 |
require_once( WPRM_DIR . 'includes/class-wprm-i18n.php' );
|
58 |
|
59 |
// Public.
|
|
|
60 |
require_once( WPRM_DIR . 'includes/public/class-wprm-comment-rating.php' );
|
61 |
require_once( WPRM_DIR . 'includes/public/class-wprm-fallback-recipe.php' );
|
62 |
require_once( WPRM_DIR . 'includes/public/class-wprm-metadata.php' );
|
41 |
* @since 1.0.0
|
42 |
*/
|
43 |
private function define_constants() {
|
44 |
+
define( 'WPRM_VERSION', '1.4.0' );
|
45 |
define( 'WPRM_POST_TYPE', 'wprm_recipe' );
|
46 |
define( 'WPRM_DIR', plugin_dir_path( dirname( __FILE__ ) ) );
|
47 |
define( 'WPRM_URL', plugin_dir_url( dirname( __FILE__ ) ) );
|
57 |
require_once( WPRM_DIR . 'includes/class-wprm-i18n.php' );
|
58 |
|
59 |
// Public.
|
60 |
+
require_once( WPRM_DIR . 'includes/public/class-wprm-api.php' );
|
61 |
require_once( WPRM_DIR . 'includes/public/class-wprm-comment-rating.php' );
|
62 |
require_once( WPRM_DIR . 'includes/public/class-wprm-fallback-recipe.php' );
|
63 |
require_once( WPRM_DIR . 'includes/public/class-wprm-metadata.php' );
|
includes/public/class-wprm-api.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Open up recipes in the WordPress REST API.
|
4 |
+
*
|
5 |
+
* @link http://bootstrapped.ventures
|
6 |
+
* @since 1.4.0
|
7 |
+
*
|
8 |
+
* @package WP_Recipe_Maker
|
9 |
+
* @subpackage WP_Recipe_Maker/includes/public
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Open up recipes in the WordPress REST API.
|
14 |
+
*
|
15 |
+
* @since 1.4.0
|
16 |
+
* @package WP_Recipe_Maker
|
17 |
+
* @subpackage WP_Recipe_Maker/includes/public
|
18 |
+
* @author Brecht Vandersmissen <brecht@bootstrapped.ventures>
|
19 |
+
*/
|
20 |
+
class WPRM_Api {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Register actions and filters.
|
24 |
+
*
|
25 |
+
* @since 1.4.0
|
26 |
+
*/
|
27 |
+
public static function init() {
|
28 |
+
add_action( 'rest_api_init', array( __CLASS__, 'api_register_recipe_data' ) );
|
29 |
+
add_filter( 'wprm_recipe_post_type_arguments', array( __CLASS__, 'recipe_post_type_arguments' ) );
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Register recipe data for the REST API.
|
34 |
+
*
|
35 |
+
* @since 1.4.0
|
36 |
+
*/
|
37 |
+
public static function api_register_recipe_data() {
|
38 |
+
register_rest_field( WPRM_POST_TYPE, 'recipe', array(
|
39 |
+
'get_callback' => array( __CLASS__, 'api_get_recipe_data' ),
|
40 |
+
'update_callback' => null,
|
41 |
+
'schema' => null,
|
42 |
+
));
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get recipe data for the REST API.
|
47 |
+
*
|
48 |
+
* @since 1.4.0
|
49 |
+
* @param array $object Details of current post.
|
50 |
+
* @param mixed $field_name Name of field.
|
51 |
+
* @param WP_REST_Request $request Current request.
|
52 |
+
*/
|
53 |
+
public static function api_get_recipe_data( $object, $field_name, $request ) {
|
54 |
+
$recipe = WPRM_Recipe_Manager::get_recipe( $object['id'] );
|
55 |
+
return $recipe->get_data();
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Add REST API options to the recipe post type arguments.
|
60 |
+
*
|
61 |
+
* @since 1.4.0
|
62 |
+
* @param array $args Post type arguments.
|
63 |
+
*/
|
64 |
+
public static function recipe_post_type_arguments( $args ) {
|
65 |
+
$args['show_in_rest'] = true;
|
66 |
+
$args['rest_base'] = WPRM_POST_TYPE;
|
67 |
+
$args['rest_controller_class'] = 'WP_REST_Posts_Controller';
|
68 |
+
|
69 |
+
return $args;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
WPRM_Api::init();
|
includes/public/class-wprm-fallback-recipe.php
CHANGED
@@ -51,7 +51,8 @@ class WPRM_Fallback_Recipe {
|
|
51 |
|
52 |
foreach ( $recipe_shortcodes as $shortcode => $shortcode_options ) {
|
53 |
$recipe_id = isset( $shortcode_options['id'] ) ? intval( $shortcode_options['id'] ) : 0;
|
54 |
-
|
|
|
55 |
|
56 |
$content = str_replace( $shortcode, $fallback_recipe, $content );
|
57 |
}
|
@@ -68,7 +69,11 @@ class WPRM_Fallback_Recipe {
|
|
68 |
public static function replace_fallback_with_shortcode( $content ) {
|
69 |
preg_match_all( self::get_fallback_regex(), $content, $matches );
|
70 |
foreach ( $matches[0] as $key => $match ) {
|
71 |
-
$
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
|
74 |
return $content;
|
@@ -80,7 +85,7 @@ class WPRM_Fallback_Recipe {
|
|
80 |
* @since 1.0.0
|
81 |
* @param int $recipe_id ID of the recipe we want to get the fallback HTML for.
|
82 |
*/
|
83 |
-
public static function get_fallback_recipe( $recipe_id ) {
|
84 |
$recipe = WPRM_Recipe_Manager::get_recipe( $recipe_id );
|
85 |
|
86 |
if ( $recipe ) {
|
51 |
|
52 |
foreach ( $recipe_shortcodes as $shortcode => $shortcode_options ) {
|
53 |
$recipe_id = isset( $shortcode_options['id'] ) ? intval( $shortcode_options['id'] ) : 0;
|
54 |
+
unset( $shortcode_options['id'] );
|
55 |
+
$fallback_recipe = self::get_fallback_recipe( $recipe_id, $shortcode_options );
|
56 |
|
57 |
$content = str_replace( $shortcode, $fallback_recipe, $content );
|
58 |
}
|
69 |
public static function replace_fallback_with_shortcode( $content ) {
|
70 |
preg_match_all( self::get_fallback_regex(), $content, $matches );
|
71 |
foreach ( $matches[0] as $key => $match ) {
|
72 |
+
$id = $matches[1][ $key ];
|
73 |
+
preg_match_all( '/<!--WPRM Recipe ' . $id . '-->.?<!--(.+?)-->/ms', $match, $args );
|
74 |
+
|
75 |
+
$shortcode_options = isset( $args[1][0] ) ? ' ' . $args[1][0] : '';
|
76 |
+
$content = str_replace( $match, '[wprm-recipe id="' . $id . '"' . $shortcode_options . ']', $content );
|
77 |
}
|
78 |
|
79 |
return $content;
|
85 |
* @since 1.0.0
|
86 |
* @param int $recipe_id ID of the recipe we want to get the fallback HTML for.
|
87 |
*/
|
88 |
+
public static function get_fallback_recipe( $recipe_id, $args = array() ) {
|
89 |
$recipe = WPRM_Recipe_Manager::get_recipe( $recipe_id );
|
90 |
|
91 |
if ( $recipe ) {
|
includes/public/class-wprm-print.php
CHANGED
@@ -41,6 +41,7 @@ class WPRM_Print {
|
|
41 |
wp_enqueue_script( 'wprm-print', WPRM_URL . 'assets/js/public/print.js', array( 'jquery' ), WPRM_VERSION, true );
|
42 |
|
43 |
wp_localize_script( 'wprm-print', 'wprm_public', array(
|
|
|
44 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
45 |
'nonce' => wp_create_nonce( 'wprm' ),
|
46 |
));
|
41 |
wp_enqueue_script( 'wprm-print', WPRM_URL . 'assets/js/public/print.js', array( 'jquery' ), WPRM_VERSION, true );
|
42 |
|
43 |
wp_localize_script( 'wprm-print', 'wprm_public', array(
|
44 |
+
'home_url' => home_url( '/' ),
|
45 |
'ajax_url' => admin_url( 'admin-ajax.php' ),
|
46 |
'nonce' => wp_create_nonce( 'wprm' ),
|
47 |
));
|
includes/public/class-wprm-shortcode.php
CHANGED
@@ -95,15 +95,17 @@ class WPRM_Shortcode {
|
|
95 |
public static function recipe_shortcode( $atts ) {
|
96 |
$atts = shortcode_atts( array(
|
97 |
'id' => '0',
|
|
|
98 |
), $atts, 'wprm_recipe' );
|
99 |
|
100 |
$recipe_id = intval( $atts['id'] );
|
|
|
101 |
$recipe = WPRM_Recipe_Manager::get_recipe( $recipe_id );
|
102 |
|
103 |
if ( $recipe ) {
|
104 |
$output = '<div id="wprm-recipe-container-' . esc_attr( $recipe_id ) . '" class="wprm-recipe-container" data-recipe-id="' . esc_attr( $recipe_id ) . '">';
|
105 |
$output .= WPRM_Metadata::get_metadata_output( $recipe );
|
106 |
-
$output .= WPRM_Template_Manager::get_template( $recipe, 'single' );
|
107 |
$output .= '</div>';
|
108 |
return $output;
|
109 |
} else {
|
95 |
public static function recipe_shortcode( $atts ) {
|
96 |
$atts = shortcode_atts( array(
|
97 |
'id' => '0',
|
98 |
+
'template' => '',
|
99 |
), $atts, 'wprm_recipe' );
|
100 |
|
101 |
$recipe_id = intval( $atts['id'] );
|
102 |
+
$recipe_template = trim( $atts['template'] );
|
103 |
$recipe = WPRM_Recipe_Manager::get_recipe( $recipe_id );
|
104 |
|
105 |
if ( $recipe ) {
|
106 |
$output = '<div id="wprm-recipe-container-' . esc_attr( $recipe_id ) . '" class="wprm-recipe-container" data-recipe-id="' . esc_attr( $recipe_id ) . '">';
|
107 |
$output .= WPRM_Metadata::get_metadata_output( $recipe );
|
108 |
+
$output .= WPRM_Template_Manager::get_template( $recipe, 'single', $recipe_template );
|
109 |
$output .= '</div>';
|
110 |
return $output;
|
111 |
} else {
|
includes/public/class-wprm-template-manager.php
CHANGED
@@ -54,13 +54,20 @@ class WPRM_Template_Manager {
|
|
54 |
* @since 1.0.0
|
55 |
* @param object $recipe Recipe object to get the template for.
|
56 |
* @param mixed $type Type of template we want to get, defaults to single.
|
|
|
57 |
*/
|
58 |
-
public static function get_template( $recipe, $type = 'single' ) {
|
59 |
-
if (
|
60 |
-
$
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
$template = self::get_template_by_slug( $template_slug );
|
65 |
}
|
66 |
|
@@ -69,7 +76,7 @@ class WPRM_Template_Manager {
|
|
69 |
$template = ob_get_contents();
|
70 |
ob_end_clean();
|
71 |
|
72 |
-
return $template;
|
73 |
}
|
74 |
|
75 |
/**
|
@@ -134,9 +141,10 @@ class WPRM_Template_Manager {
|
|
134 |
|
135 |
// Load included templates.
|
136 |
$dirs = array_filter( glob( WPRM_DIR . 'templates/recipe/*' ), 'is_dir' );
|
|
|
137 |
|
138 |
foreach ( $dirs as $dir ) {
|
139 |
-
$template = self::load_template( $dir, false );
|
140 |
$templates[ $template['slug'] ] = $template;
|
141 |
}
|
142 |
|
@@ -144,12 +152,12 @@ class WPRM_Template_Manager {
|
|
144 |
$theme_dir = get_template_directory();
|
145 |
|
146 |
if ( file_exists( $theme_dir . '/wprm-templates' ) && file_exists( $theme_dir . '/wprm-templates/recipe' ) ) {
|
147 |
-
$
|
148 |
|
149 |
$dirs = array_filter( glob( $theme_dir . '/wprm-templates/recipe/*' ), 'is_dir' );
|
150 |
|
151 |
foreach ( $dirs as $dir ) {
|
152 |
-
$template = self::load_template( $dir, true );
|
153 |
$templates[ $template['slug'] ] = $template;
|
154 |
}
|
155 |
}
|
@@ -159,12 +167,12 @@ class WPRM_Template_Manager {
|
|
159 |
$theme_dir = get_stylesheet_directory();
|
160 |
|
161 |
if ( file_exists( $theme_dir . '/wprm-templates' ) && file_exists( $theme_dir . '/wprm-templates/recipe' ) ) {
|
162 |
-
$
|
163 |
|
164 |
$dirs = array_filter( glob( $theme_dir . '/wprm-templates/recipe/*' ), 'is_dir' );
|
165 |
|
166 |
foreach ( $dirs as $dir ) {
|
167 |
-
$template = self::load_template( $dir, true );
|
168 |
$templates[ $template['slug'] ] = $template;
|
169 |
}
|
170 |
}
|
@@ -178,9 +186,10 @@ class WPRM_Template_Manager {
|
|
178 |
*
|
179 |
* @since 1.2.0
|
180 |
* @param mixed $dir Directory to load the template from.
|
|
|
181 |
* @param boolean $custom Wether or not this is a custom template included by the user.
|
182 |
*/
|
183 |
-
private static function load_template( $dir, $custom = false ) {
|
184 |
$slug = basename( $dir );
|
185 |
$name = ucwords( str_replace( '-', ' ', $slug ) );
|
186 |
|
@@ -196,7 +205,7 @@ class WPRM_Template_Manager {
|
|
196 |
'name' => $name,
|
197 |
'slug' => $slug,
|
198 |
'dir' => $dir,
|
199 |
-
'url' =>
|
200 |
'screenshot' => $screenshot,
|
201 |
);
|
202 |
}
|
54 |
* @since 1.0.0
|
55 |
* @param object $recipe Recipe object to get the template for.
|
56 |
* @param mixed $type Type of template we want to get, defaults to single.
|
57 |
+
* @param mixed $slug Slug of the specific template we want.
|
58 |
*/
|
59 |
+
public static function get_template( $recipe, $type = 'single', $slug = false ) {
|
60 |
+
if ( $slug ) {
|
61 |
+
$template = self::get_template_by_slug( $slug );
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( ! $slug || ! $template ) {
|
65 |
+
if ( 'print' === $type ) {
|
66 |
+
$template_slug = WPRM_Settings::get( 'default_print_template' );
|
67 |
+
} else {
|
68 |
+
$template_slug = WPRM_Settings::get( 'default_recipe_template' );
|
69 |
+
}
|
70 |
+
|
71 |
$template = self::get_template_by_slug( $template_slug );
|
72 |
}
|
73 |
|
76 |
$template = ob_get_contents();
|
77 |
ob_end_clean();
|
78 |
|
79 |
+
return do_shortcode( $template );
|
80 |
}
|
81 |
|
82 |
/**
|
141 |
|
142 |
// Load included templates.
|
143 |
$dirs = array_filter( glob( WPRM_DIR . 'templates/recipe/*' ), 'is_dir' );
|
144 |
+
$url = WPRM_URL . 'templates/recipe/';
|
145 |
|
146 |
foreach ( $dirs as $dir ) {
|
147 |
+
$template = self::load_template( $dir, $url, false );
|
148 |
$templates[ $template['slug'] ] = $template;
|
149 |
}
|
150 |
|
152 |
$theme_dir = get_template_directory();
|
153 |
|
154 |
if ( file_exists( $theme_dir . '/wprm-templates' ) && file_exists( $theme_dir . '/wprm-templates/recipe' ) ) {
|
155 |
+
$url = get_template_directory_uri() . '/wprm-templates/recipe/';
|
156 |
|
157 |
$dirs = array_filter( glob( $theme_dir . '/wprm-templates/recipe/*' ), 'is_dir' );
|
158 |
|
159 |
foreach ( $dirs as $dir ) {
|
160 |
+
$template = self::load_template( $dir, $url, true );
|
161 |
$templates[ $template['slug'] ] = $template;
|
162 |
}
|
163 |
}
|
167 |
$theme_dir = get_stylesheet_directory();
|
168 |
|
169 |
if ( file_exists( $theme_dir . '/wprm-templates' ) && file_exists( $theme_dir . '/wprm-templates/recipe' ) ) {
|
170 |
+
$url = get_stylesheet_directory_uri() . '/wprm-templates/recipe/';
|
171 |
|
172 |
$dirs = array_filter( glob( $theme_dir . '/wprm-templates/recipe/*' ), 'is_dir' );
|
173 |
|
174 |
foreach ( $dirs as $dir ) {
|
175 |
+
$template = self::load_template( $dir, $url, true );
|
176 |
$templates[ $template['slug'] ] = $template;
|
177 |
}
|
178 |
}
|
186 |
*
|
187 |
* @since 1.2.0
|
188 |
* @param mixed $dir Directory to load the template from.
|
189 |
+
* @param mixed $url URL to load the template from.
|
190 |
* @param boolean $custom Wether or not this is a custom template included by the user.
|
191 |
*/
|
192 |
+
private static function load_template( $dir, $url, $custom = false ) {
|
193 |
$slug = basename( $dir );
|
194 |
$name = ucwords( str_replace( '-', ' ', $slug ) );
|
195 |
|
205 |
'name' => $name,
|
206 |
'slug' => $slug,
|
207 |
'dir' => $dir,
|
208 |
+
'url' => $url . $slug,
|
209 |
'screenshot' => $screenshot,
|
210 |
);
|
211 |
}
|
readme.txt
CHANGED
@@ -27,6 +27,7 @@ An overview of WP Recipe Maker features:
|
|
27 |
* This plugin is **fully responsive**, your recipes will look good on any device
|
28 |
* Structure your ingredients and instructions in **groups** (e.g. icing and cake batter)
|
29 |
* **Full text search** for your recipes
|
|
|
30 |
|
31 |
Currently using another recipe plugin? No problem! You can easily migrate all your existing recipes to WP Recipe Maker if you're using any of the following plugins:
|
32 |
|
@@ -74,6 +75,17 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
= 1.3.0 =
|
78 |
* Feature: Import from WP Ultimate Recipe
|
79 |
* Feature: wpDiscuz support for comment ratings
|
@@ -108,6 +120,9 @@ Yes! We pride ourselves on offering awesome support and almost always answer sup
|
|
108 |
|
109 |
== Upgrade notice ==
|
110 |
|
|
|
|
|
|
|
111 |
= 1.3.0 =
|
112 |
Another week, another update!
|
113 |
|
27 |
* This plugin is **fully responsive**, your recipes will look good on any device
|
28 |
* Structure your ingredients and instructions in **groups** (e.g. icing and cake batter)
|
29 |
* **Full text search** for your recipes
|
30 |
+
* Access your recipes through the WordPress **REST API**
|
31 |
|
32 |
Currently using another recipe plugin? No problem! You can easily migrate all your existing recipes to WP Recipe Maker if you're using any of the following plugins:
|
33 |
|
75 |
|
76 |
== Changelog ==
|
77 |
|
78 |
+
= 1.4.0 =
|
79 |
+
* Feature: Access recipes though REST API
|
80 |
+
* Feature: Choose specific recipe template in shortcode
|
81 |
+
* Improvement: Check for leftover ER comment ratings when importing from WP Ultimate Recipe
|
82 |
+
* Improvement: Execute shortcodes in the recipe template
|
83 |
+
* Fix: Include correct stylesheet when using recipe templates from theme
|
84 |
+
* Fix: Show all recipes to be checked instead of just 8 recipes
|
85 |
+
* Fix: Use correct print URL if WordPress is in a subdirectory
|
86 |
+
* Fix: Linebreak accumulation when updating recipes
|
87 |
+
* Fix: Prevent Post Type Switcher plugin bug from breaking recipes
|
88 |
+
|
89 |
= 1.3.0 =
|
90 |
* Feature: Import from WP Ultimate Recipe
|
91 |
* Feature: wpDiscuz support for comment ratings
|
120 |
|
121 |
== Upgrade notice ==
|
122 |
|
123 |
+
= 1.4.0 =
|
124 |
+
A few important bug fixes and improvements
|
125 |
+
|
126 |
= 1.3.0 =
|
127 |
Another week, another update!
|
128 |
|
templates/admin/menu/faq/whats_new.php
CHANGED
@@ -12,6 +12,18 @@
|
|
12 |
?>
|
13 |
|
14 |
<h3>Latest Update (<?php echo esc_html( $version ); ?>)</h3>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
<ul>
|
16 |
<li>Feature: Import from WP Ultimate Recipe</li>
|
17 |
<li>Feature: wpDiscuz support for comment ratings</li>
|
12 |
?>
|
13 |
|
14 |
<h3>Latest Update (<?php echo esc_html( $version ); ?>)</h3>
|
15 |
+
<ul>
|
16 |
+
<li>Feature: Access recipes though REST API</li>
|
17 |
+
<li>Feature: Choose specific recipe template in shortcode</li>
|
18 |
+
<li>Improvement: Check for leftover ER comment ratings when importing from WP Ultimate Recipe</li>
|
19 |
+
<li>Improvement: Execute shortcodes in the recipe template</li>
|
20 |
+
<li>Fix: Include correct stylesheet when using recipe templates from theme</li>
|
21 |
+
<li>Fix: Show all recipes to be checked instead of just 8 recipes</li>
|
22 |
+
<li>Fix: Use correct print URL if WordPress is in a subdirectory</li>
|
23 |
+
<li>Fix: Linebreak accumulation when updating recipes</li>
|
24 |
+
<li>Fix: Prevent Post Type Switcher plugin bug from breaking recipes</li>
|
25 |
+
</ul>
|
26 |
+
<h3>1.3.0</h3>
|
27 |
<ul>
|
28 |
<li>Feature: Import from WP Ultimate Recipe</li>
|
29 |
<li>Feature: wpDiscuz support for comment ratings</li>
|
templates/admin/menu/import-overview.php
CHANGED
@@ -13,6 +13,17 @@
|
|
13 |
|
14 |
<div class="wrap wprm-import">
|
15 |
<h2><?php esc_html_e( 'Import Recipes', 'wp-recipe-maker' ); ?></h2>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
<h3><?php esc_html_e( 'Recipes to Import', 'wp-recipe-maker' ); ?></h3>
|
17 |
<?php
|
18 |
$recipes_to_import = array();
|
13 |
|
14 |
<div class="wrap wprm-import">
|
15 |
<h2><?php esc_html_e( 'Import Recipes', 'wp-recipe-maker' ); ?></h2>
|
16 |
+
<h3><?php esc_html_e( 'Considerations Before Importing', 'wp-recipe-maker' ); ?></h3>
|
17 |
+
<p>
|
18 |
+
<?php esc_html_e( "Importing recipes will convert them to our format and they won't be available in the old plugin anymore. We recommend backing up before starting the process and trying to import 1 single recipe first to make sure everything converts properly.", 'wp-recipe-maker' ); ?>
|
19 |
+
</p>
|
20 |
+
<p>
|
21 |
+
<?php esc_html_e( 'If your current plugin uses custom post types and has different permalinks than regular posts you might want to use a redirection plugin to set up 301 redirects. Contact us if you need help!', 'wp-recipe-maker' ); ?>
|
22 |
+
</p>
|
23 |
+
<p>
|
24 |
+
<?php esc_html_e( 'Importing lots of recipes at once can cause a PHP timeout error. All recipes that were handled up until the error will have been imported correctly.', 'wp-recipe-maker' ); ?>
|
25 |
+
</p>
|
26 |
+
|
27 |
<h3><?php esc_html_e( 'Recipes to Import', 'wp-recipe-maker' ); ?></h3>
|
28 |
<?php
|
29 |
$recipes_to_import = array();
|
templates/public/fallback-recipe.php
CHANGED
@@ -11,6 +11,15 @@
|
|
11 |
|
12 |
?>
|
13 |
<!--WPRM Recipe <?php echo esc_html( $recipe->id() ); ?>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
<div class="wprm-fallback-recipe">
|
15 |
<h2 class="wprm-fallback-recipe-name"><?php echo esc_html( $recipe->name() ); ?></h2>
|
16 |
<?php
|
11 |
|
12 |
?>
|
13 |
<!--WPRM Recipe <?php echo esc_html( $recipe->id() ); ?>-->
|
14 |
+
<?php
|
15 |
+
if ( count( $args ) > 0 ) {
|
16 |
+
$fallback_args = array();
|
17 |
+
foreach ( $args as $key => $value ) {
|
18 |
+
$fallback_args[] = esc_attr( $key ) . '="' . esc_attr( $value ) . '"';
|
19 |
+
}
|
20 |
+
echo '<!--' . implode( ' ', $fallback_args ) . '-->';
|
21 |
+
}
|
22 |
+
?>
|
23 |
<div class="wprm-fallback-recipe">
|
24 |
<h2 class="wprm-fallback-recipe-name"><?php echo esc_html( $recipe->name() ); ?></h2>
|
25 |
<?php
|
templates/recipe/clean-print-with-image/clean-print-with-image.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wprm-recipe-clean-print{font-size:0.9em}.wprm-recipe-clean-print .wprm-recipe-image{float:left;margin:0 15px 15px 0}.wprm-recipe-clean-print h2.wprm-recipe-name,.wprm-recipe-clean-print h3.wprm-recipe-header,.wprm-recipe-clean-print h4.wprm-recipe-group-name{font-variant:normal;text-transform:none;letter-spacing:normal;margin:0}.wprm-recipe-clean-print h2.wprm-recipe-name{clear:none;font-size:1.8em}.wprm-recipe-clean-print .wprm-recipe-details-container,.wprm-recipe-clean-print .wprm-recipe-summary{margin-bottom:15px}.wprm-recipe-clean-print .wprm-recipe-details-name{display:inline-block;font-weight:bold;min-width:130px}.wprm-recipe-clean-print .wprm-recipe-details-unit{font-size:0.8em}.wprm-recipe-clean-print h3.wprm-recipe-header{margin-top:10px;font-size:1.2em}.wprm-recipe-clean-print ol,.wprm-recipe-clean-print ul{margin:0 0 8px}.wprm-recipe-clean-print ol li,.wprm-recipe-clean-print ul li{margin:0 0 0 32px}.wprm-recipe-clean-print h4.wprm-recipe-group-name{margin-top:5px !important;font-weight:300;font-size:1em}.wprm-recipe-clean-print .wprm-recipe-ingredient-notes{color:#999999}.wprm-recipe-clean-print .wprm-recipe-instructions .wprm-recipe-instruction{margin-bottom:5px}.wprm-recipe-clean-print .wprm-recipe-instruction-text p{margin:0 0 5px}.wprm-recipe-clean-print .wprm-recipe-instruction-text p:last-of-type{margin-bottom:0}
|
1 |
+
.wprm-recipe-clean-print-with-image{font-size:0.9em}.wprm-recipe-clean-print-with-image .wprm-recipe-image{float:left;margin:0 15px 15px 0}.wprm-recipe-clean-print-with-image h2.wprm-recipe-name,.wprm-recipe-clean-print-with-image h3.wprm-recipe-header,.wprm-recipe-clean-print-with-image h4.wprm-recipe-group-name{font-variant:normal;text-transform:none;letter-spacing:normal;margin:0}.wprm-recipe-clean-print-with-image h2.wprm-recipe-name{clear:none;font-size:1.8em}.wprm-recipe-clean-print-with-image .wprm-recipe-details-container,.wprm-recipe-clean-print-with-image .wprm-recipe-summary{margin-bottom:15px}.wprm-recipe-clean-print-with-image .wprm-recipe-details-name{display:inline-block;font-weight:bold;min-width:130px}.wprm-recipe-clean-print-with-image .wprm-recipe-details-unit{font-size:0.8em}.wprm-recipe-clean-print-with-image h3.wprm-recipe-header{margin-top:10px;font-size:1.2em}.wprm-recipe-clean-print-with-image ol,.wprm-recipe-clean-print-with-image ul{margin:0 0 8px}.wprm-recipe-clean-print-with-image ol li,.wprm-recipe-clean-print-with-image ul li{margin:0 0 0 32px}.wprm-recipe-clean-print-with-image h4.wprm-recipe-group-name{margin-top:5px !important;font-weight:300;font-size:1em}.wprm-recipe-clean-print-with-image .wprm-recipe-ingredient-notes{color:#999999}.wprm-recipe-clean-print-with-image .wprm-recipe-instructions .wprm-recipe-instruction{margin-bottom:5px}.wprm-recipe-clean-print-with-image .wprm-recipe-instruction-text p{margin:0 0 5px}.wprm-recipe-clean-print-with-image .wprm-recipe-instruction-text p:last-of-type{margin-bottom:0}.wprm-print .wprm-recipe-clean-print-with-image{max-width:750px;margin:0 auto}
|
templates/recipe/clean-print-with-image/clean-print-with-image.php
CHANGED
@@ -6,12 +6,12 @@
|
|
6 |
* @since 1.0.0
|
7 |
*
|
8 |
* @package WP_Recipe_Maker
|
9 |
-
* @subpackage WP_Recipe_Maker/templates/recipe/clean-print
|
10 |
*/
|
11 |
|
12 |
// @codingStandardsIgnoreStart
|
13 |
?>
|
14 |
-
<div class="wprm-recipe wprm-recipe-clean-print">
|
15 |
<div class="wprm-recipe-image"><?php echo $recipe->image(); ?></div>
|
16 |
<h2 class="wprm-recipe-name"><?php echo $recipe->name(); ?></h2>
|
17 |
<div class="wprm-recipe-summary">
|
6 |
* @since 1.0.0
|
7 |
*
|
8 |
* @package WP_Recipe_Maker
|
9 |
+
* @subpackage WP_Recipe_Maker/templates/recipe/clean-print-with-image
|
10 |
*/
|
11 |
|
12 |
// @codingStandardsIgnoreStart
|
13 |
?>
|
14 |
+
<div class="wprm-recipe wprm-recipe-clean-print-with-image">
|
15 |
<div class="wprm-recipe-image"><?php echo $recipe->image(); ?></div>
|
16 |
<h2 class="wprm-recipe-name"><?php echo $recipe->name(); ?></h2>
|
17 |
<div class="wprm-recipe-summary">
|
templates/recipe/clean-print-with-image/clean-print-with-image.scss
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
.wprm-recipe-clean-print {
|
2 |
font-size: 0.9em;
|
3 |
|
4 |
.wprm-recipe-image {
|
@@ -75,3 +75,10 @@
|
|
75 |
}
|
76 |
}
|
77 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wprm-recipe-clean-print-with-image {
|
2 |
font-size: 0.9em;
|
3 |
|
4 |
.wprm-recipe-image {
|
75 |
}
|
76 |
}
|
77 |
}
|
78 |
+
|
79 |
+
.wprm-print {
|
80 |
+
.wprm-recipe-clean-print-with-image {
|
81 |
+
max-width: 750px;
|
82 |
+
margin: 0 auto;
|
83 |
+
}
|
84 |
+
}
|
templates/recipe/clean-print/clean-print.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wprm-recipe-clean-print{font-size:0.9em}.wprm-recipe-clean-print h2.wprm-recipe-name,.wprm-recipe-clean-print h3.wprm-recipe-header,.wprm-recipe-clean-print h4.wprm-recipe-group-name{font-variant:normal;text-transform:none;letter-spacing:normal;margin:0}.wprm-recipe-clean-print h2.wprm-recipe-name{clear:none;font-size:1.8em}.wprm-recipe-clean-print .wprm-recipe-details-container,.wprm-recipe-clean-print .wprm-recipe-summary{margin-bottom:15px}.wprm-recipe-clean-print .wprm-recipe-details-name{display:inline-block;font-weight:bold;min-width:130px}.wprm-recipe-clean-print .wprm-recipe-details-unit{font-size:0.8em}.wprm-recipe-clean-print h3.wprm-recipe-header{margin-top:10px;font-size:1.2em}.wprm-recipe-clean-print ol,.wprm-recipe-clean-print ul{margin:0 0 8px}.wprm-recipe-clean-print ol li,.wprm-recipe-clean-print ul li{margin:0 0 0 32px}.wprm-recipe-clean-print h4.wprm-recipe-group-name{margin-top:5px !important;font-weight:300;font-size:1em}.wprm-recipe-clean-print .wprm-recipe-ingredient-notes{color:#999999}.wprm-recipe-clean-print .wprm-recipe-instructions .wprm-recipe-instruction{margin-bottom:5px}.wprm-recipe-clean-print .wprm-recipe-instruction-text p{margin:0 0 5px}.wprm-recipe-clean-print .wprm-recipe-instruction-text p:last-of-type{margin-bottom:0}
|
1 |
+
.wprm-recipe-clean-print{font-size:0.9em}.wprm-recipe-clean-print h2.wprm-recipe-name,.wprm-recipe-clean-print h3.wprm-recipe-header,.wprm-recipe-clean-print h4.wprm-recipe-group-name{font-variant:normal;text-transform:none;letter-spacing:normal;margin:0}.wprm-recipe-clean-print h2.wprm-recipe-name{clear:none;font-size:1.8em}.wprm-recipe-clean-print .wprm-recipe-details-container,.wprm-recipe-clean-print .wprm-recipe-summary{margin-bottom:15px}.wprm-recipe-clean-print .wprm-recipe-details-name{display:inline-block;font-weight:bold;min-width:130px}.wprm-recipe-clean-print .wprm-recipe-details-unit{font-size:0.8em}.wprm-recipe-clean-print h3.wprm-recipe-header{margin-top:10px;font-size:1.2em}.wprm-recipe-clean-print ol,.wprm-recipe-clean-print ul{margin:0 0 8px}.wprm-recipe-clean-print ol li,.wprm-recipe-clean-print ul li{margin:0 0 0 32px}.wprm-recipe-clean-print h4.wprm-recipe-group-name{margin-top:5px !important;font-weight:300;font-size:1em}.wprm-recipe-clean-print .wprm-recipe-ingredient-notes{color:#999999}.wprm-recipe-clean-print .wprm-recipe-instructions .wprm-recipe-instruction{margin-bottom:5px}.wprm-recipe-clean-print .wprm-recipe-instruction-text p{margin:0 0 5px}.wprm-recipe-clean-print .wprm-recipe-instruction-text p:last-of-type{margin-bottom:0}.wprm-print .wprm-recipe-clean-print{max-width:750px;margin:0 auto}
|
templates/recipe/clean-print/clean-print.scss
CHANGED
@@ -70,3 +70,10 @@
|
|
70 |
}
|
71 |
}
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
}
|
71 |
}
|
72 |
}
|
73 |
+
|
74 |
+
.wprm-print {
|
75 |
+
.wprm-recipe-clean-print {
|
76 |
+
max-width: 750px;
|
77 |
+
margin: 0 auto;
|
78 |
+
}
|
79 |
+
}
|
templates/recipe/simple/simple.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wprm-recipe-simple{border-top:1px solid #aaaaaa;background-color:#fafafa;padding:10px;margin:20px 0;font-size:0.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:0.8em}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-print{font-size:0.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:bold;min-width:130px}.wprm-recipe-simple .wprm-recipe-details-unit{font-size:0.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:#999999}.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-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 #aaaaaa;background-color:#fafafa;padding:10px;margin:20px 0;font-size:0.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:0.8em}.wprm-recipe-simple .wprm-recipe-image-container .wprm-recipe-print{font-size:0.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:bold;min-width:130px}.wprm-recipe-simple .wprm-recipe-details-unit{font-size:0.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:#999999}.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.scss
CHANGED
@@ -40,7 +40,7 @@
|
|
40 |
|
41 |
.wprm-recipe-print {
|
42 |
font-size: 0.9em;
|
43 |
-
cursor: pointer
|
44 |
}
|
45 |
}
|
46 |
|
@@ -116,7 +116,13 @@
|
|
116 |
margin: 5px 0 15px;
|
117 |
}
|
118 |
}
|
|
|
119 |
.wprm-print {
|
|
|
|
|
|
|
|
|
|
|
120 |
.wprm-recipe-print {
|
121 |
display: none;
|
122 |
}
|
40 |
|
41 |
.wprm-recipe-print {
|
42 |
font-size: 0.9em;
|
43 |
+
cursor: pointer;
|
44 |
}
|
45 |
}
|
46 |
|
116 |
margin: 5px 0 15px;
|
117 |
}
|
118 |
}
|
119 |
+
|
120 |
.wprm-print {
|
121 |
+
.wprm-recipe-simple {
|
122 |
+
max-width: 750px;
|
123 |
+
margin: 0 auto;
|
124 |
+
}
|
125 |
+
|
126 |
.wprm-recipe-print {
|
127 |
display: none;
|
128 |
}
|
templates/recipe/tastefully-simple/tastefully-simple.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.wprm-recipe-container .wprm-recipe-tastefully-simple,.wprm-print .wprm-recipe-tastefully-simple{font:12px Verdana, Arial, Geneva, sans-serif;border:1px dashed #666;color:#666;padding:10px;background:#FFF}.wprm-recipe-container .wprm-recipe-tastefully-simple div,.wprm-recipe-container .wprm-recipe-tastefully-simple li,.wprm-recipe-container .wprm-recipe-tastefully-simple ol,.wprm-recipe-container .wprm-recipe-tastefully-simple p,.wprm-recipe-container .wprm-recipe-tastefully-simple span,.wprm-recipe-container .wprm-recipe-tastefully-simple ul,.wprm-print .wprm-recipe-tastefully-simple div,.wprm-print .wprm-recipe-tastefully-simple li,.wprm-print .wprm-recipe-tastefully-simple ol,.wprm-print .wprm-recipe-tastefully-simple p,.wprm-print .wprm-recipe-tastefully-simple span,.wprm-print .wprm-recipe-tastefully-simple ul{margin:0;padding:0;line-height:inherit}.wprm-recipe-container .wprm-recipe-tastefully-simple svg,.wprm-print .wprm-recipe-tastefully-simple svg{vertical-align:middle;width:16px;height:16px;margin:0}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-clear-left,.wprm-print .wprm-recipe-tastefully-simple .wprm-clear-left{clear:left;line-height:0;height:0}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container{float:right;max-width:40%;text-align:right}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating{margin-bottom:5px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating svg path,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating svg path{fill:#feb600}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating svg polygon,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating svg polygon{stroke:#feb600}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating .wprm-recipe-rating-details,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating .wprm-recipe-rating-details{font:10px "Trebuchet MS",Arial,Helvetica,sans-serif}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-buttons,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-buttons{margin-top:10px;text-align:center}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-buttons .wprm-recipe-print,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-buttons .wprm-recipe-print{color:#ffffff;background:#666666;font-size:11px;cursor:pointer;-webkit-border-radius:5px 5px 5px 5px;-moz-border-radius:5px 5px 5px 5px;border-radius:5px 5px 5px 5px;padding:0.4em 1em}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-name,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-name{font:150% Verdana, Geneva, sans-serif;margin-bottom:15px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container{border-top:1px dotted #666;border-bottom:1px dotted #666;width:60%;padding-top:5px;padding-bottom:5px;margin-bottom:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container{width:33%;text-align:center;float:left;font-weight:bold;border-left:1px solid #ccc}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container:first-child,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container:first-child{border-left:none}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container .wprm-recipe-time-header,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container .wprm-recipe-time-header{margin-bottom:4px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container .wprm-recipe-time,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container .wprm-recipe-time{font-size:10px;font-weight:normal}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-summary,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-summary{margin-bottom:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-summary p,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-summary p{margin-bottom:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-details-container,.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-ingredients-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-details-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-ingredients-container{margin-bottom:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-header,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-header{font-size:1.4em;font-weight:700;margin-top:1em;margin-bottom:1em}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-group-name,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-group-name{margin-top:3px;margin-bottom:3px;font-weight:700}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-ingredients li,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-ingredients li{list-style:disc inside;margin-left:10px;line-height:inherit;background:0 0}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-instructions li,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-instructions li{list-style:decimal;margin-left:30px;line-height:inherit;background:0 0}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-notes-container ul li,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-notes-container ul li{list-style:disc inside;margin-left:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-notes-container ol li,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-notes-container ol li{list-style:decimal;margin-left:30px}.wprm-print .wprm-recipe-print{display:none}@media only screen and (max-width: 480px){.wprm-recipe-tastefully-simple .wprm-recipe-image-container{float:none;width:100%;max-width:none}}
|
1 |
+
.wprm-recipe-container .wprm-recipe-tastefully-simple,.wprm-print .wprm-recipe-tastefully-simple{font:12px Verdana, Arial, Geneva, sans-serif;border:1px dashed #666;color:#666;padding:10px;background:#FFF}.wprm-recipe-container .wprm-recipe-tastefully-simple div,.wprm-recipe-container .wprm-recipe-tastefully-simple li,.wprm-recipe-container .wprm-recipe-tastefully-simple ol,.wprm-recipe-container .wprm-recipe-tastefully-simple p,.wprm-recipe-container .wprm-recipe-tastefully-simple span,.wprm-recipe-container .wprm-recipe-tastefully-simple ul,.wprm-print .wprm-recipe-tastefully-simple div,.wprm-print .wprm-recipe-tastefully-simple li,.wprm-print .wprm-recipe-tastefully-simple ol,.wprm-print .wprm-recipe-tastefully-simple p,.wprm-print .wprm-recipe-tastefully-simple span,.wprm-print .wprm-recipe-tastefully-simple ul{margin:0;padding:0;line-height:inherit}.wprm-recipe-container .wprm-recipe-tastefully-simple svg,.wprm-print .wprm-recipe-tastefully-simple svg{vertical-align:middle;width:16px;height:16px;margin:0}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-clear-left,.wprm-print .wprm-recipe-tastefully-simple .wprm-clear-left{clear:left;line-height:0;height:0}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container{float:right;max-width:40%;text-align:right}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating{margin-bottom:5px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating svg path,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating svg path{fill:#feb600}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating svg polygon,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating svg polygon{stroke:#feb600}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating .wprm-recipe-rating-details,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-rating .wprm-recipe-rating-details{font:10px "Trebuchet MS",Arial,Helvetica,sans-serif}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-buttons,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-buttons{margin-top:10px;text-align:center}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-buttons .wprm-recipe-print,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-image-container .wprm-recipe-buttons .wprm-recipe-print{color:#ffffff;background:#666666;font-size:11px;cursor:pointer;-webkit-border-radius:5px 5px 5px 5px;-moz-border-radius:5px 5px 5px 5px;border-radius:5px 5px 5px 5px;padding:0.4em 1em}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-name,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-name{font:150% Verdana, Geneva, sans-serif;margin-bottom:15px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container{border-top:1px dotted #666;border-bottom:1px dotted #666;width:60%;padding-top:5px;padding-bottom:5px;margin-bottom:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container{width:33%;text-align:center;float:left;font-weight:bold;border-left:1px solid #ccc}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container:first-child,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container:first-child{border-left:none}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container .wprm-recipe-time-header,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container .wprm-recipe-time-header{margin-bottom:4px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container .wprm-recipe-time,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-times-container .wprm-recipe-time-container .wprm-recipe-time{font-size:10px;font-weight:normal}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-summary,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-summary{margin-bottom:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-summary p,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-summary p{margin-bottom:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-details-container,.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-ingredients-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-details-container,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-ingredients-container{margin-bottom:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-header,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-header{font-size:1.4em;font-weight:700;margin-top:1em;margin-bottom:1em}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-group-name,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-group-name{margin-top:3px;margin-bottom:3px;font-weight:700}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-ingredients li,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-ingredients li{list-style:disc inside;margin-left:10px;line-height:inherit;background:0 0}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-instructions li,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-instructions li{list-style:decimal;margin-left:30px;line-height:inherit;background:0 0}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-notes-container ul li,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-notes-container ul li{list-style:disc inside;margin-left:10px}.wprm-recipe-container .wprm-recipe-tastefully-simple .wprm-recipe-notes-container ol li,.wprm-print .wprm-recipe-tastefully-simple .wprm-recipe-notes-container ol li{list-style:decimal;margin-left:30px}.wprm-print .wprm-recipe-tastefully-simple{max-width:750px;margin:0 auto}.wprm-print .wprm-recipe-print{display:none}@media only screen and (max-width: 480px){.wprm-recipe-tastefully-simple .wprm-recipe-image-container{float:none;width:100%;max-width:none}}
|
templates/recipe/tastefully-simple/tastefully-simple.scss
CHANGED
@@ -159,6 +159,10 @@
|
|
159 |
}
|
160 |
}
|
161 |
.wprm-print {
|
|
|
|
|
|
|
|
|
162 |
.wprm-recipe-print {
|
163 |
display: none;
|
164 |
}
|
159 |
}
|
160 |
}
|
161 |
.wprm-print {
|
162 |
+
.wprm-recipe-tastefully-simple {
|
163 |
+
max-width: 750px;
|
164 |
+
margin: 0 auto;
|
165 |
+
}
|
166 |
.wprm-recipe-print {
|
167 |
display: none;
|
168 |
}
|
wp-recipe-maker.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: WP Recipe Maker
|
16 |
* Plugin URI: http://bootstrapped.ventures/
|
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/
|
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.4.0
|
19 |
* Author: Bootstrapped Ventures
|
20 |
* Author URI: http://bootstrapped.ventures/
|
21 |
* License: GPL-2.0+
|