This file contains 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: 16.05.2024 | |
Description | |
This PHP snippet enhances the security and organization of the WordPress media library by enforcing user-specific access controls. | |
It ensures that users can only view, edit, and delete their own uploaded media files, not those uploaded by others. | |
This functionality is particularly useful in multi-author WordPress environments where maintaining individual user | |
media privacy is crucial. By integrating this code, administrators can streamline media management and safeguard user | |
content from unauthorized access. | |
1. Copy this PHP snippet and paste it into your snippet editor, then save it. |
This file contains 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
Description: | |
This custom PHP snippet adds functionality to WordPress and Jetengine metabox, automatically assigning and updating | |
a sequence number for each post within a CPT. The sequence numbers are recalculated and updated dynamically whenever | |
a post is added, deleted, or trashed, ensuring that the newest post receives the number 1 and other posts are numbered | |
accordingly in descending order of their creation date. Additionally, the code implements a nonce for security, | |
ensuring its validity, particularly when used in form submissions or similar contexts. | |
1. Copy the custom code and create a PHP snippet. Paste the code into your snippet plugin. | |
2. First, create a Custom Post Type (CPT). Change the CPT name from "rent-car" to your preferred CPT slug name. | |
Search for "rent-car" in the custom code and replace all instances with your chosen CPT name. |
This file contains 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
Short Description: | |
This shortcode enhances JetFormBuilder by allowing it to format and display multiple images within email notifications. | |
Upon form submission, it automatically converts a comma-separated list of image URLs into | |
individually styled HTML <img> tags, complete with custom spacing for optimal presentation in emails. | |
1. Copy the following PHP code and create a snippet using your snippet plugins. Paste the code into the plugin and save it. | |
2. Create a media field in your form. | |
3. In the post submit actions, set it to send email. Open the email content section and insert the shortcode | |
below into the content area: | |
[process_gallery urls="%gallery%"], use the same field name gallery, or change it to your field name. |
This file contains 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. New custom code for JetFormBuilder improves how files are uploaded and displayed. | |
The feature shows a set number of uploaded files directly (four on desktops, fewer on smaller devices), | |
with additional files represented by a dynamic plus icon that indicates the count of remaining uploads. | |
This enhancement ensures users can easily track and manage their uploads across different devices. | |
2. Copy this code, create a new HTML snippet, and paste it into your snippet plugin. Save it as a header or footer. | |
________________________________________________________ | |
<style> |
This file contains 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
Enhance Jetformbuilder and Jetengine form ' TinyMCE editors (WYSIWYG Field) with a dynamic word limit control feature. | |
This script adds an interactive word count display that not only tracks the number of words typed but also dynamically | |
adjusts the text content to adhere to a predefined limit. The functionality is designed to provide visual feedback and | |
prevent over-typing by automatically trimming text to the set limit. | |
1. Firstly, copy the custom PHP code and paste it into your snippet plugins. Create a new PHP snippet and save it as "Everywhere". | |
2. In Jetengine form, add a WYSIWYG Field, and the form field name is: text_count_limit_jetengine, and for Jetformbuilder | |
WYSIWYG Field and the form field name is: text_count_limit_jetformbuilder | |
3. You can adjust the variable 'limit' to control the word limit for this specific editor. Currently, it's set to 100, | |
but you can change it to suit your needs. Find this line and change it: var limit = 100; // Word limit for this specific editor. |
This file contains 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
This jQuery script automatically populates the JetFormBuilder form date inputs with today's date in MM/DD/YYYY format and | |
updates corresponding hidden fields to the DD/MM/YYYY format upon form submission. The script ensures that the dates are | |
visible and considered 'selected' by the user, improving data accuracy and user experience without manual entry. It supports | |
multiple date fields and can easily be configured to handle various date and hidden field IDs, making it ideal for ensuring | |
consistent date formatting and handling across front-end displays and back-end processing. | |
1. Firstly, copy the custom HTML code and paste it into your snippet plugins. Create a new HTML snippet and save it as "footer". | |
2. Create a date field and a hidden field. Name both fields and change the IDs to your preferred IDs: | |
{ visible: 'YOUR DATE FIELD NAME/ID', hidden: 'YOUR HIDDEN FIELD NAME/ID' }, | |
3. Add the hidden field name to Jetformbuilder's post-submit action (content) to display the date format as DD/MM/YY. |
This file contains 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
This code snippet enhances traditional form input fields with a dynamic floating placeholder effect. | |
When a user focuses on an input field or begins to type, the placeholder text transitions upwards, | |
mimicking a label. This transition provides a clear indication that the field is active and maintains | |
the label-like placeholder visible above the input, even after the user starts typing. The effect reverts | |
only when the input is cleared and loses focus, ensuring a clean and user-friendly interface that enhances | |
the usability and aesthetic of web forms. | |
1. First of all, copy the HTML snippet code and create a new snippet ( HTML ). | |
2. Add your form field names, and do not type in any label name, and instead add placeholder name. | |
3. The placeholder text become automatic to label text. |
This file contains 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. Start by creating a new PHP snippet. Paste your custom code into it and set it to run "everywhere". | |
2. Create a text field, set the type to "tel", and name the form field "phone". | |
3. Create a select field, set it to "manual input" (do not add any options), and name the form field "country". | |
4. Create a hidden field named "full_phone_number" for storing the full phone number. | |
5. Create another hidden field named "full_country_name" for storing the full country name. | |
6. Add both hidden fields to the "Post Submit Action" section under "Content". | |
7. Update the page slug name to the specific page where you have added the form. For instance, if | |
the current page slug name is "contact", change it to match the URL of the page where the form is placed. | |
8. Finally, register for an account at https://ipinfo.io/signup ,to obtain a token key. Then, | |
integrate the token into your fetch request as follows: fetch('https://ipinfo.io?token=YOUR_TOKEN_KEY_HERE'). |
This file contains 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
Introducing Enhanced Message Display for JetEngine Forms: Our new code dynamically relocates success and error messages | |
to the top area, providing clearer feedback for users. You can easily style the message container using the | |
provided class name, 'display-message', or customize it to suit your design preferences. | |
Simply integrate the code into your Elementor form, add a headline or container with the same class name, | |
and adjust the styling directly within the code. Success messages are displayed in green, while errors appear in red, | |
ensuring clear visibility and easy customization. | |
Add this code to your site by creating a new HTML snippet in your snippet plugin. | |
Simply paste the code there and save it. | |
________________________________________________________ |
This file contains 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
Add this code to your site by creating a new PHP snippet in your snippet plugin. | |
Simply paste the code there and save it | |
____________________________________________________________________ | |
function custom_cart_visibility_script() { | |
?> | |
<style> | |
/* Initially hide the cart count to prevent it from showing 0 before JS checks */ | |
.jet-blocks-cart__count { |
NewerOlder