• Resolved Behrouz

    (@nwm2006)


    I’m encountering two issues

    When adding steps in the instruction section, the steps appear disabled until the post is updated. This makes it difficult to manage the content.

    Hyperlinks in “Notes section” with right-to-left (RTL) languages, such as Persian or Arabic, are problematic. Specifically, The RTL part of URLs are being removed when they include these languages. For example, if you try to link a word using the following URL: https://fa.wikipedia.org/wiki/%D9%88%D8%B1%D8%AF%D9%BE%D8%B1%D8%B3, the link will chenge to: https://fa.wikipedia.org/wiki””.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author XjSv

    (@xjsv)

    @nwm2006 Thank you for bringing that to my attention. I can confirm that I can reproduce the issue with the link bug in the notes section. It will be fixed in the next upcoming release (v1.8.4) which should be coming out in the next couple of days.

    As for the the steps appearing disabled, I cant reproduce this one. It sounds like maybe there could be some sort of JavaScript issue.

    Plugin Author XjSv

    (@xjsv)

    @nwm2006 Version 1.8.4 is out that includes the fix for links in the Notes field.

    Thread Starter Behrouz

    (@nwm2006)

    You are fast ??

    Plugin Author XjSv

    (@xjsv)

    Thank you. Do you still have the issue with the steps appearing disabled until the post is updated?

    Thread Starter Behrouz

    (@nwm2006)

    I didn’t get a notification for your reply, so sorry if this is late.

    I’m still seeing the issue, it might just be a conflict with one of my plugins. Not a big deal!

    I did notice you updated the recipe schema markup and I’m really thankful for that! It needed an updat. But I think there’s a little SEO tweak that could make it even better. Right now, using the same name for each step (Based on titles) in the “howtostep” of the schema markup might not be super SEO-friendly.

    I’m not a developer, but I made a small change that seems to work for me! What if we could use a text before the colon in each step, and that changes to the step’s name? I made an adjustment to the class.cooked.seo.php file, and it’s working on my end. Maybe you can check it out, and if you like it, consider adding it to the plugin.

    For example
    “Mxing the ingredients: You need to mixed all the ingredients in a big….”
    Mxing the ingredients would be the name of the step in schema mark up and the rest is the text

    $directions = [];
    if ( isset($recipe['directions']) && !empty($recipe['directions']) ):
    $number = 1;

    foreach ( $recipe['directions'] as $dir ):
    $dir_name = isset( $dir['section_heading_name'] ) ? $dir['section_heading_name'] : '';

    if ( isset( $dir['section_heading_name'] ) ): continue; endif;

    $direction = Cooked_Recipes::single_direction( $dir, false, true );
    $direction_cleaned = wp_strip_all_tags( preg_replace("~(?:\[/?)[^/\]]+/?\]~s", '', $direction) );

    // Split the direction text by the first colon
    $split_direction = explode(':', $direction_cleaned, 2);
    $dir_name = trim($split_direction[0]); // Name before the first colon
    $direction_text = isset($split_direction[1]) ? trim($split_direction[1]) : ''; // Text after the first colon

    $image_id = isset($dir['image']) ? $dir['image'] : false;

    $image = '';
    if ( $image_id ):
    $image = wp_get_attachment_image_src( $image_id, 'full' );
    $image = $image[0];
    endif;

    // Fallback if the name is empty
    if (empty($dir_name)) {
    $dir_name = 'Step ' . $number;
    }

    $directions[] = [
    '@type' => 'HowToStep',
    'name' => $dir_name, // Use the part before colon as name
    'text' => $direction_text, // Use the part after colon as the instruction
    'url' => get_permalink($rpost) . '#cooked-single-direction-step-' . $number,
    'image' => $image,
    ];

    $number++;
    endforeach;
    endif;

    If you can also give the “name” a class so we can customize or even hide it using the css, would make it perfect

    I’m also interested in your pro version. does it come with a meal plan functionality?

    Plugin Author XjSv

    (@xjsv)

    @nwm2006 Hey there. It seems like this could work for your situation but I am wondering, why are you not using the section headings?

    If you have something like: “Mixing the ingredients: You need to mixed all the ingredients in a big….” then your heading would be: “Mixing the ingredients”.

    And your direction would be: “You need to mixed all the ingredients in a big…”.

    My concern is that other users might enter the direction in any format and might not have text before the colon. They might not have a colon at all. So in those situations it would not work very well.

    I also want to mention that having duplicate names in the HowToStep seems to be fine. For example check out one of my example recipes in Googles Rich Results tester: https://search.google.com/test/rich-results/result/r%2Frecipes?id=U6qag6OZJmXkUI1FOmovzg

    I am not an expert at SEO but this does not seem to be a problem.

    As for the Pro version, no it currently does not have a meal plan feature?

    Thread Starter Behrouz

    (@nwm2006)

    Thank you for your prompt response

    You are right, in my case there are usually two or at most three heading and seven or more steps. Regarding SEO, Rich snippets are richer with each step having a name but you are, it might make some issues for regular users.

    Pro Version:
    Where can I see the features and changelog?
    Do you have this option in your road map?
    Is the rating based on ip address or cookies? Can all users rate the recipe?

    Thread Starter Behrouz

    (@nwm2006)

    I’ve taken your feedback into account and updated the code for those reading this topic and want to use it. Now, if a colon is detected, it extracts the name based on that. Otherwise, it will default to using the heading:

    $directions = [];
    if ( isset($recipe['directions']) && !empty($recipe['directions']) ):
    $number = 1;
    $dir_name = '';

    foreach ( $recipe['directions'] as $dir ):
    if ( isset( $dir['section_heading_name'] ) ):
    $dir_name = $dir['section_heading_name'];
    continue;
    endif;

    $direction = Cooked_Recipes::single_direction( $dir, false, true );
    $direction_cleaned = wp_strip_all_tags( preg_replace("~(?:\[/?)[^/\]]+/?\]~s", '', $direction) );
    $image_id = isset($dir['image']) ? $dir['image'] : false;

    $image = '';
    if ( $image_id ):
    $image = wp_get_attachment_image_src( $image_id, 'full' );
    $image = $image[0];
    endif;

    if (empty($dir_name)) {
    $dir_name = 'Step ' . $number;
    }

    // Check for colon in the direction text and adjust the name and text accordingly
    $input = $direction_cleaned;
    if (strpos($input, ':') !== false) {
    list($step_name, $instruction) = explode(':', $input, 2);
    $step_name = trim($step_name);
    $instruction = trim($instruction);
    } else {
    $step_name = $dir_name;
    $instruction = $input;
    }

    $directions[] = [
    '@type' => 'HowToStep',
    'name' => $step_name,
    'text' => $instruction,
    'url' => get_permalink($rpost) . '#cooked-single-direction-step-' . $number,
    'image' => $image,
    ];

    $number++;
    endforeach;
    endif;
    Plugin Author XjSv

    (@xjsv)

    For Cooked Pro The features can be seen in the main website here: https://cooked.pro/

    As for the Change Log, I will just post it here:

    = 1.8.2 =
    * **TWEAK:** Updated the recipe editing process: recipe edits are now made within the profile page rather than the recipe page. This change facilitates templating recipes using Elementor or other page builders.
    * **FIX:** Fixed a bug where the WordPress editor was unusable when adding or editing recipe directions on the front end until the recipe was saved.

    = 1.8.1 =
    * **FIX:** Fixed undefined index error when the Browse Page is not set.

    = 1.8.0 =
    * **NEW:** Added the ability to automatically calculate the nutrition information based on the ingredients and serving size using the Edamam API.
    * **TWEAK:** Updated the look of the Nutrition Facts to conform with the new FDA guidelines on [Changes to the Nutrition Facts Label](https://www.fda.gov/food/food-labeling-nutrition/changes-nutrition-facts-label).
    * **TWEAK:** Updated BigOven share button to use the latest API.
    * **FIX:** Fixed a bug with the recipe nutrition information not settings values correctly in the submit recipe page.
    * **FIX:** Removed no longer supported Google+ share button.
    * **TWEAK:** Minor improvements to settings page and other areas of the plugin.

    = 1.7.8 =
    * **NEW:** Added the Notes field to user recipe submissions. This will allow users to add additional notes when submitting a recipe.
    * **NEW:** Added WYWIWYG editor support for the Excerpt field on the front-end recipe submission form.

    = 1.7.7 =
    * **TWEAK:** Tested compatibility with WordPress 6.6.1.

    = 1.7.6 =
    * **TWEAK:** Improved navigation when browsing recipe categories.
    * **TWEAK:** Updated chart display library for better visual presentation.
    * **TWEAK:** Modified success message when submitting new recipes in pending approval mode.
    * **TWEAK:** User registration now follows your WordPress settings for membership.
    * **TWEAK:** Updated language files for better localization support.
    * **FIX:** Improved overall security and addressed several vulnerabilities to keep your site safe thanks to [re-alter](https://github.com/re-alter) and [DancinCocobean](https://github.com/DancinCocobean).
    * **FIX:** Fixed issues with recipe ratings, favorite recipe counters, and recipe approval processes thanks to [re-alter](https://github.com/re-alter).
    * **FIX:** Resolved problems with image uploads in recipe directions thanks to [re-alter](https://github.com/re-alter).
    * **FIX:** Corrected display issues with nutrition information and pending recipes thanks to [re-alter](https://github.com/re-alter).
    * **FIX:** Enhanced user permissions and roles for better control over recipe management thanks to [re-alter](https://github.com/re-alter).
    * **FIX:** Various other bug fixes and performance improvements.

    = 1.7.5.8 =
    * **FIX:** Fixed PHP undefined index on profile page.
    * **FIX:** PHP 8 compatibility fixes.

    For the Meal Plan feature, currently there are no plans for this feature but it’s something I can include in the future.

    And as for the ratings this is currently based on users. You have to be logged in to leave a rating and it can be changed from Thumbs Up/Thumbs Down or a Star based rating.

    As for your code changes, make sure you save that so the next upcoming update does not override your changes.

    • This reply was modified 5 months, 1 week ago by XjSv.
    Thread Starter Behrouz

    (@nwm2006)

    Thank you ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.