Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7826acb
Implement video clips on recipe directions and responsiveness fixes.
mgiannopoulos24 Jun 21, 2026
d5cf454
Update readme and test for new feature.
mgiannopoulos24 Jun 21, 2026
7d0932f
CSS fix
mgiannopoulos24 Jun 21, 2026
216e591
Bump @types/node from 25.9.4 to 26.0.0
dependabot[bot] Jun 21, 2026
173e4f2
Merge pull request #158 from XjSv/dependabot/npm_and_yarn/develop/typ…
XjSv Jun 23, 2026
8900acd
Widget Fixes
XjSv Jun 24, 2026
9ae657e
Remove rules to display metabox title.
mgiannopoulos24 Jun 24, 2026
a677e4d
Add a script to get the latest version of wp-cli and add wp-env cases…
mgiannopoulos24 Jun 28, 2026
1ac7d7a
Add testdox option to document running tests.
mgiannopoulos24 Jul 3, 2026
d0e0c17
Adding Playwright Tests
XjSv Jul 4, 2026
d3ff2b0
Merge branch 'develop' into pr/157
XjSv Jul 12, 2026
b6b34ba
Merge pull request #157 from mgiannopoulos24/feat/video-clips
XjSv Jul 13, 2026
0867ab9
New settings option in that will allow users to choose a default imag…
XjSv Jul 13, 2026
c94a23c
Initial Commit for Dark Mode
XjSv Jul 13, 2026
bf67f62
Add a few more rules for Pixwell
mgiannopoulos24 Jul 13, 2026
41c8b6b
Merge pull request #163 from mgiannopoulos24/pixwell-dark-mode
XjSv Jul 19, 2026
07a637d
Fix Full Screen Mode X Icon not being centered
XjSv Jul 20, 2026
f42564c
Moved Pixwell Into Own Class
XjSv Aug 2, 2026
c1f1692
Changed print header/footer to logo only
XjSv Aug 2, 2026
e52d445
Updated dependencies, Readme & Language Files
XjSv Aug 8, 2026
58e4eab
Release v1.16.0 Prep
XjSv Aug 12, 2026
533bf1d
Fix
XjSv Aug 12, 2026
a388540
Merge pull request #164 from XjSv/pixwell-dark-mode
XjSv Aug 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ tests/phpunit/.cache
build/*

# WordPress
wordpress/
wordpress/
8 changes: 7 additions & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"core": null,
"phpVersion": "7.4",
"themes": ["WordPress/twentytwentyfive"],
"plugins": ["."],
"plugins": [],
"mappings": {
"wp-content/plugins/cooked": "."
},
"port": 8888,
"testsEnvironment": false,
"config": {
Expand All @@ -12,5 +15,8 @@
"SCRIPT_DEBUG": true,
"WP_ENVIRONMENT_TYPE": "local",
"DISALLOW_FILE_EDIT": false
},
"lifecycleScripts": {
"afterStart": "wp-env run cli bash -c 'curl -fsSL -o /tmp/wp-cli.phar https://github.com/wp-cli/builds/raw/gh-pages/phar/wp-cli.phar && chmod +x /tmp/wp-cli.phar && sudo cp /tmp/wp-cli.phar /usr/local/bin/wp && sudo chmod +x /usr/local/bin/wp'"
}
}
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors:
given-names: Justin
- family-names: Tresova
given-names: Armand
version: 1.15.0
version: 1.16.0
doi: 10.5281/zenodo.1171250
date-released: 2017-05-08
url: "https://github.com/XjSv/cooked"
254 changes: 244 additions & 10 deletions assets/admin/css/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/admin/css/style.min.css

Large diffs are not rendered by default.

100 changes: 99 additions & 1 deletion assets/admin/js/cooked-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,53 @@ var cookedSortableTouchHandler = function(event) {
window.scrollTo(0,0);
}
});

var settings_image_frame;

$_CookedSettingsPanel.on('click', '.cooked-settings-image-remove', function(e) {
e.preventDefault();

var $field = $(this).closest('.cooked-settings-image-field');

$field.removeClass('cooked-has-image');
$field.find('.cooked-settings-image-preview-img').attr('src', '').removeAttr('srcset').removeAttr('sizes');
$field.find('.cooked-settings-image-input').val('0');
$field.find('.cooked-settings-image-button').val(cooked_admin_functions_js_vars.i18n_image_title);
});

$_CookedSettingsPanel.on('click', '.cooked-settings-image-button', function(e) {
e.preventDefault();

var $button = $(this);
var $field = $button.closest('.cooked-settings-image-field');

if (settings_image_frame) {
settings_image_frame.off('select');
}

settings_image_frame = wp.media({
title: cooked_admin_functions_js_vars.i18n_image_title,
button: { text: cooked_admin_functions_js_vars.i18n_image_button },
library: { type: 'image' }
});

settings_image_frame.on('select', function() {
var media_attachment = settings_image_frame.state().get('selection').first().toJSON();
var thumbUrl = media_attachment.sizes && media_attachment.sizes.thumbnail
? media_attachment.sizes.thumbnail.url
: media_attachment.url;

$field.addClass('cooked-has-image');
$field.find('.cooked-settings-image-preview-img')
.attr('src', thumbUrl)
.removeAttr('srcset')
.removeAttr('sizes');
$field.find('.cooked-settings-image-input').val(media_attachment.id);
$button.val(cooked_admin_functions_js_vars.i18n_image_change);
});

settings_image_frame.open();
});
}

if ($_CookedIngredientBuilder.length) {
Expand Down Expand Up @@ -613,8 +660,18 @@ var cookedSortableTouchHandler = function(event) {
cooked_reset_direction_builder();
});

$_CookedDirectionBuilder.parent().on('click', '.remove-video-button', function(e) {
e.preventDefault();
var $parent = $(this).parent();
$parent.removeClass('cooked-has-video');
$parent.find('.cooked-direction-video-preview').attr('src', '');
$parent.find('input[data-direction-part="video"]').val('');
$parent.find('.direction-video-button').prop('value', cooked_admin_functions_js_vars.i18n_video_title);
cooked_reset_direction_builder();
});

// Instantiates the variable that holds the media library frame.
var direction_image_frame, directionID;
var direction_image_frame, direction_video_frame, directionID;

$('body').on('click', '.cooked-direction-img-placeholder, .cooked-direction-img', function(e) {
e.preventDefault();
Expand Down Expand Up @@ -661,6 +718,47 @@ var cookedSortableTouchHandler = function(event) {
// Opens the media library frame.
direction_image_frame.open();
});

$('body').on('click', '.cooked-direction-video-placeholder, .cooked-direction-video-preview', function(e) {
e.preventDefault();
var thisButton = $(this).parent().find('.direction-video-button');
thisButton.trigger('click');
});

// Runs when the video button is clicked.
$('body').on('click', '.direction-video-button', function(e) {
var thisButton = $(this);
directionID = thisButton.data('id');

e.preventDefault();

// If the frame already exists, re-open it.
if ( direction_video_frame ) {
direction_video_frame.open();
return;
}

// Sets up the media library frame
direction_video_frame = wp.media.frames.direction_video_frame = wp.media({
title: cooked_admin_functions_js_vars.i18n_video_title,
button: { text: cooked_admin_functions_js_vars.i18n_video_button },
library: { type: 'video' }
});

// Runs when a video is selected.
direction_video_frame.on('select', function() {
var media_attachment = direction_video_frame.state().get('selection').first().toJSON();

var $videoBlock = $('.direction-video-button[data-id="' + directionID + '"]').closest('.cooked-direction-video');
$videoBlock.find('.cooked-direction-video-preview').attr('src', media_attachment.url);
$videoBlock.find('input[data-direction-part="video"]').val( media_attachment.id );
$videoBlock.addClass('cooked-has-video');
$('.direction-video-button[data-id="' + directionID + '"]').prop( 'value', cooked_admin_functions_js_vars.i18n_video_change );
});

// Opens the media library frame.
direction_video_frame.open();
});
}

// Bulk Add Modal
Expand Down
2 changes: 1 addition & 1 deletion assets/admin/js/cooked-functions.min.js

Large diffs are not rendered by default.

84 changes: 50 additions & 34 deletions assets/css/colors.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php

$_cooked_settings = Cooked_Settings::get();
$_cooked_dark_css_scope = Cooked_Settings::get_dark_mode_scope();

?>/* Main Color */
.cooked-button,
Expand All @@ -21,42 +22,57 @@
.cooked-recipe-search .cooked-taxonomy-selected:hover,
.cooked-browse-search-button:hover { background:<?php echo esc_html( $_cooked_settings['main_color_hover'] ); ?>; }<?php

if ( isset($_cooked_settings['dark_mode']) && in_array('enabled', $_cooked_settings['dark_mode']) ):
if ( false !== $_cooked_dark_css_scope ):

$dm = function ( $selectors ) {
return Cooked_Settings::prefix_dark_mode_css( $selectors );
};

?>/* Dark Mode */
.cooked-recipe-search .cooked-browse-select { background:rgba(255,255,255,0.075); box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05); }
.cooked-recipe-search .cooked-browse-select:hover { background:rgba(255,255,255,0.10); box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05); }
.cooked-recipe-search .cooked-browse-select-block { background:rgba(0,0,0,0.95); box-shadow:none; border-radius:5px; }
.cooked-recipe-search input[type="text"] { background:rgba(0,0,0,0.25); border-color:rgba(255,255,255,0.15); }
.cooked-recipe-search .cooked-sortby-wrap { background:rgba(255,255,255,0.10); }
.cooked-recipe-search .cooked-sortby-wrap:hover { background:rgba(255,255,255,0.15); }
.cooked-recipe-search .cooked-sortby-wrap > select { border-color:rgba(0,0,0,0.15); }
.cooked-recipe-search .cooked-sortby-wrap > select > option { color:#333; }
.cooked-recipe-grid .cooked-recipe-inside { background:rgba(0,0,0,0.25); box-shadow:none !important }
.cooked-pagination-numbered > span { color:rgba(255,255,255,0.5); }
.cooked-recipe-info span.cooked-print > a,
.cooked-recipe-info span.cooked-fsm-button { color:rgba(255,255,255,0.5); }
.cooked-recipe-info span.cooked-print > a:hover,
.cooked-recipe-info span.cooked-fsm-button:hover { color:#fff; }
.cooked-recipe-ingredients .cooked-ingredient-checkbox { border-color:rgba(255,255,255,0.25); }
.cooked-recipe-ingredients .cooked-ingredient-checkbox:hover { border-color:rgba(255,255,255,0.5); }
.cooked-nutrition-label { background:rgba(0,0,0,0.25); border:none; border-radius:5px; }
.cooked-nutrition-label .cooked-nutrition-title { color:#fff; }
body .cooked-nutrition-label .cooked-nut-hr { border-color:rgba(255,255,255,0.15); }
body .cooked-nutrition-label dt.cooked-nut-spacer, body .cooked-nutrition-label dl.cooked-nut-spacer { background:rgba(255,255,255,0.15); }
body .cooked-nutrition-label dt,
body .cooked-nutrition-label dl.cooked-nut-bottom dt,
body .cooked-nutrition-label dl.cooked-nut-bottom dt:nth-last-child(2):nth-child(2n) { border-color:rgba(255,255,255,0.15); }
.cooked-recipe-card { background:rgba(0,0,0,0.25); box-shadow:none !important; }
.cooked-recipe-card-modern .cooked-recipe-card-sep, .cooked-recipe-card-modern-centered .cooked-recipe-card-sep { background:rgba(255,255,255,0.25); }
.cooked-recipe-grid .cooked-recipe-image-empty { background:rgba(255,255,255,0.15); }
.cooked-fsm { background:#000; color:#fff; }
.cooked-fsm .cooked-fsm-ingredients { background:rgba(255,255,255,0.1); }
.cooked-recipe .cooked-rating-stars > .cooked-rating-star.cooked-rating-star-empty,
.cooked-recipe .cooked-ratable .cooked-rating-stars.cooked-user-rated > .cooked-rating-star.cooked-rating-star-empty { color:rgba(255,255,255,0.25); }
.cooked-allergen,
.cooked-allergen .cooked-icon { color:rgba(255,255,255,0.5); }
.cooked-allergen:hover .cooked-icon { color:#fff; }
<?php echo $dm( '.cooked-recipe-search .cooked-browse-select' ); ?> { background:rgba(255,255,255,0.075); box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05); }
<?php echo $dm( '.cooked-recipe-search .cooked-browse-select:hover' ); ?> { background:rgba(255,255,255,0.10); box-shadow:inset 0 0 0 1px rgba(255,255,255,0.05); }
<?php echo $dm( '.cooked-recipe-search .cooked-browse-select-block' ); ?> { background:rgba(0,0,0,0.95); box-shadow:none; border-radius:5px; }
<?php echo $dm( '.cooked-recipe-search input[type="text"]' ); ?> { background:rgba(0,0,0,0.25); border-color:rgba(255,255,255,0.15); }
<?php echo $dm( '.cooked-recipe-search .cooked-sortby-wrap' ); ?> { background:rgba(255,255,255,0.10); }
<?php echo $dm( '.cooked-recipe-search .cooked-sortby-wrap:hover' ); ?> { background:rgba(255,255,255,0.15); }
<?php echo $dm( '.cooked-recipe-search .cooked-sortby-wrap > select' ); ?> { border-color:rgba(0,0,0,0.15); }
<?php echo $dm( '.cooked-recipe-search .cooked-sortby-wrap > select > option' ); ?> { color:#333; }
<?php echo $dm( '.cooked-recipe-search .cooked-browse-select-block .cooked-tax-column > span.cooked-tax-column-title' ); ?> { border-bottom-color:rgba(255,255,255,0.15); }
<?php echo $dm( '.cooked-recipe-search .cooked-browse-select-block .cooked-tax-column i.cooked-icon' ); ?> { color:rgba(255,255,255,0.5); }
<?php echo $dm( '.cooked-recipe-search .cooked-field-wrap-select:before, .cooked-recipe-search .cooked-sortby-wrap:before' ); ?> { color:#fff; }
<?php echo $dm( '.cooked-recipe-grid .cooked-recipe-inside' ); ?> { background:rgba(0,0,0,0.25); box-shadow:none !important }
<?php echo $dm( '.cooked-pagination-numbered > span' ); ?> { color:rgba(255,255,255,0.5); }
<?php echo $dm( '.cooked-recipe-info span.cooked-print > a, .cooked-recipe-info span.cooked-fsm-button' ); ?> { color:rgba(255,255,255,0.5); }
<?php echo $dm( '.cooked-recipe-info span.cooked-print > a:hover, .cooked-recipe-info span.cooked-fsm-button:hover' ); ?> { color:#fff; }
<?php echo $dm( '.cooked-recipe-info span.cooked-time-icon, .cooked-recipe-info span.cooked-servings-icon' ); ?> { color:#fff; opacity:0.5; }
<?php echo $dm( '.single-cp_recipe .cooked-recipe-ingredients' ); ?> { border-color:rgba(255,255,255,0.25); }
<?php echo $dm( '.single-cp_recipe .cooked-recipe-directions' ); ?> { border-color:rgba(255,255,255,0.25); }
<?php echo $dm( '.cooked-recipe-ingredients .cooked-ingredient-checkbox' ); ?> { border-color:rgba(255,255,255,0.25); color:#fff; }
<?php echo $dm( '.cooked-recipe-ingredients .cooked-ingredient-checkbox:hover' ); ?> { border-color:rgba(255,255,255,0.5); }
<?php echo $dm( '.cooked-nutrition-label' ); ?> { background:rgba(0,0,0,0.25); border:none; border-radius:5px; }
<?php echo $dm( '.cooked-nutrition-label .cooked-nutrition-title' ); ?> { color:#fff; }
<?php echo $dm( '.single-cp_recipe .cooked-nutrition-label .cooked-nut-hr' ); ?> { border-color:rgba(255,255,255,0.15); }
<?php echo $dm( '.cooked-nutrition-label dt.cooked-nut-spacer, .cooked-nutrition-label dl.cooked-nut-spacer' ); ?> { background:rgba(255,255,255,0.15); }
<?php echo $dm( '.cooked-nutrition-label dt, .cooked-nutrition-label dl.cooked-nut-bottom dt, .cooked-nutrition-label dl.cooked-nut-bottom dt:nth-last-child(2):nth-child(2n)' ); ?> { border-color:rgba(255,255,255,0.15); }
<?php echo $dm( '.cooked-recipe-card' ); ?> { background:rgba(0,0,0,0.25); box-shadow:none !important; }
<?php echo $dm( '.cooked-recipe-card-modern, .cooked-recipe-card-modern-centered' ); ?> { box-shadow:none !important; }
<?php echo $dm( '.cooked-recipe-card-modern .cooked-recipe-card-sep, .cooked-recipe-card-modern-centered .cooked-recipe-card-sep' ); ?> { background:rgba(255,255,255,0.25); }
<?php echo $dm( '.cooked-recipe-grid .cooked-recipe-image-empty' ); ?> { background:rgba(255,255,255,0.15); }
<?php echo $dm( '.cooked-fsm' ); ?> { background:#000; color:#fff; }
<?php echo $dm( '.cooked-fsm .cooked-fsm-ingredients' ); ?> { background:rgba(255,255,255,0.1); }
<?php echo $dm( '.cooked-recipe .cooked-rating-stars > .cooked-rating-star.cooked-rating-star-empty, .cooked-recipe .cooked-ratable .cooked-rating-stars.cooked-user-rated > .cooked-rating-star.cooked-rating-star-empty' ); ?> { color:rgba(255,255,255,0.25); }
<?php echo $dm( '.cooked-allergen, .cooked-allergen .cooked-icon' ); ?> { color:rgba(255,255,255,0.5); }
<?php echo $dm( '.cooked-allergen:hover .cooked-icon' ); ?> { color:#fff; }
<?php echo $dm( '#cooked-timers-wrap' ); ?> { background:#191919; color:#fff; box-shadow:0 -5px 30px rgba(0,0,0,0.4); }
<?php echo $dm( '#cooked-timers-wrap .cooked-timer-block i.cooked-icon-times' ); ?> { color:rgba(255,255,255,0.35); }
<?php echo $dm( '#cooked-timers-wrap .cooked-timer-block .cooked-timer-desc' ); ?> { color:rgba(255,255,255,0.65); }
<?php echo $dm( '#cooked-timers-wrap .cooked-timer-block.cooked-paused' ); ?> { background:rgba(255,255,255,0.05); }
<?php echo $dm( '#cooked-timers-wrap .cooked-timer-block.cooked-paused .cooked-timer-obj' ); ?> { color:rgba(255,255,255,0.5); }
<?php echo $dm( '#cooked-timers-wrap .cooked-timer-block .cooked-progress' ); ?> { background:rgba(255,255,255,0.15); }
<?php
echo $dm( '.cooked-related-recipes-empty' ); ?> { background:rgba(255, 255,255,0.25); color:#fff; }
<?php
echo $dm( '.cooked-recipe-search select.cooked-sortby-select option' ); ?> { background:rgba(79, 79, 79, 1); color:#fff; }
<?php

endif;
3 changes: 3 additions & 0 deletions assets/css/print.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ body { padding:0 30px; max-width:800px; margin:0 auto; }
body a { color:inherit; text-decoration:none; }
body h1 { font-size:1.75rem; line-height:1.5; margin:0 0 1rem; padding:0; }
body p { font-size:1rem; line-height:1.6; margin:0 0 1rem; padding:0; }
#cooked-print-logo { margin:1.5rem 0 1rem; }
#cooked-print-logo img.cooked-print-logo-image { display:block; max-height:80px; width:auto; height:auto; }
#cooked-print-logo .cooked-print-logo-text { display:block; font-size:1.5rem; font-weight:800; line-height:1.3; }
.cooked-clearfix:after { content: ""; display: table; clear: both; }
.cooked-button, button.cooked-button { cursor:pointer; border:none; display:inline-block; padding:8px 10px; line-height:1; font-size:13px; font-weight:600; color:#fff; background:#666; -moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; }
.cooked-button:hover, button.cooked-button:hover { background:#333; }
Expand Down
Loading