This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateMidjourneyImage($prompt){ | |
$jobIdFile = md5($prompt); | |
if (file_exists('./jobs/' . $jobIdFile)) { | |
$jobId = file_get_contents('./jobs/' . $jobIdFile); | |
die('https://cdn.midjourney.com/' . $jobId . '/0_1.png');//ou 0_2.png ou 0_3.png ou 0_4.png | |
} | |
$client = new GuzzleHttp\Client(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// place the code in the child theme functions.php or a custom code snippets plugin. | |
// Dont forget! This code is for the WooCommerce Points and Rewards plugin, so if it is not installed and activated, | |
// you will not be able to use this condition! | |
// https://woo.com/products/woocommerce-points-and-rewards/ | |
// Go to you block, widget container etc, open the Dynamic Visibility modul, and scroll down in the list, | |
// you will see a new category: Woo Points and Rewards | |
// this visibility only work for logged-in users. You can use the value field, to define the points. | |
// example : select the new Current user Equal or greater condition | |
// in the value field Enter the point amount. This visibility will check if the current user points equal or greater |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATED : | |
A new functionality for generating unique filenames for each cropped image | |
1. I've developed a new custom code for JetFormBuilder, designed to allow users to crop images. | |
I'm excited to share it with the group, making it accessible to most members here. | |
2. To begin, you'll need to create four fields: two media fields and two hidden fields. It's convenient to use the same | |
field names across these, so there's no need to modify the custom code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jetformbuilder custom code and DomPDF file for Signature ( Esign ) | |
1. Create a Hidden field, and name the field name: signature, and CSS classname : signature-field, save and done. | |
2. Create your field, and then u dont need to add it to Jetformbuilder content manually, its now dynamicly by using the custom code. | |
In Content field, u can just add something like that: | |
Hello, | |
Thank you for your message. Please find the friends list attached for your reference. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Adding a custom input field for the CSS ID in the menu item settings. | |
2. Saving the CSS ID entered by the user when the menu item is updated. | |
3. Inserting the saved CSS ID into the menu item's HTML output on the website. | |
Essentially, it's a way to enhance menu items with custom IDs for more precise styling and interaction handling. | |
// Add custom fields to menu item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//add Call Hook as a first action to the form in which redirect should be disabled | |
//name should be disable-checkout-redirect | |
add_action( 'jet-form-builder/custom-action/disable-checkout-redirect', function() { | |
//load cart before adding product to cart | |
add_action( 'jet-form-builder/action/redirect_to_woo_checkout/before-add', function() { | |
WC()->cart->get_cart(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MAGICAL CSS Rule */ | |
selector .elementor-container .elementor-row { | |
flex-wrap: wrap; | |
/* uncomment for columns alignment */ | |
/* justify-content: center; */ | |
} | |
/* Responsive Columns Alignment - Tablet */ | |
@media (min-width: 768px) and (max-width: 1024px) { | |
selector .elementor-container .elementor-row { |