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. Allows logged-in users, except administrators, to delete their accounts. | |
Incorporates a nonce for security, ensuring the deletion request is valid and intentional. | |
Features a JavaScript confirmation dialog for users to confirm before proceeding with the deletion. | |
2. Deletes all posts and attachments created by the user, ensuring complete removal of their content from the website. | |
Finally, deletes the user's account from the WordPress system. | |
Security and Permissions: | |
3. Performs a security check using nonce verification to prevent unauthorized actions. | |
Restricts the ability to delete accounts to non-administrator users, ensuring only the account owner can initiate deletion. | |
4. Uses WordPress hooks and shortcodes for seamless integration into the WordPress environment. | |
Ensures the custom functions don't exist before defining them, avoiding conflicts with other plugins or themes. |
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
add_filter('manage_users_columns', 'add_custom_user_column'); | |
function add_custom_user_column($columns) { | |
$columns['status'] = 'Status'; | |
return $columns; | |
} | |
add_action('manage_users_custom_column', 'show_custom_user_column_content', 10, 3); | |
function show_custom_user_column_content($value, $column_name, $user_id) { | |
if ('status' == $column_name) { | |
$user = get_userdata($user_id); |
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. Download the dompdf file, and add the file to wp-content and extract it after. | |
https://github.com/dompdf/dompdf/releases/download/v2.0.3/dompdf_2-0-3.zip | |
2. Dont forget to add subject line text in Jetformbuilder, and add it to this line: | |
$expected_subject_line = 'YOUR SUBJECT LINE TEXT, Or the form will not work. Cause its integrated by subject line text. | |
3. Change the url link for company logo to yours logo | |
4. Used hidden field for media, dont forget to add your on field name, and classname too. | |
Or u can use the same name i have added in allready. u have used fieldname: mediafield and classname: mediafield_classname | |
5. You dont need to add all the field name manually in Jetformbuilder sendmail content, u can add a text something like that only: | |
Hello, |
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
UPDATED 28/04/2024 | |
__________________ | |
Jetformbuilder form, A custom code for auto detect country and land code phone. | |
This code works for all Jetformbuilder. | |
The provided custom code is a PHP function for WordPress that adds international telephone input functionality to a website. | |
It includes CDN links for the necessary CSS and JavaScript files, applies custom styles for the phone input field, | |
and uses jQuery for dynamic behavior. The JavaScript part initializes the international telephone input with features | |
like auto-detecting the user's country using their IP address and updating the input field with the full phone number |
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. First use the Datefield widget, and name it: date_field. | |
2. Then create a page to add your form, exemple: contact | |
3. A nonce for security is added. | |
4. Dont forget to add your page slug name in the code here: | |
function disable_weekends_in_datepicker() { | |
// Only load this script on the 'contact' page | |
if ( is_page('contact') ) { | |
?> |
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
This code defines a function send_update_notification in a WordPress environment. | |
It checks for updates to plugins and themes, and sends an email notification if new updates are available. | |
For plugins, it uses get_site_transient('update_plugins') to check for plugin updates, and for themes, | |
it uses get_site_transient('update_themes'). If updates are found and have not been previously notified | |
(based on options stored in the database), it sends an email to a specified address with details about | |
the available updates. The function is hooked to the admin_init action, so it runs during the initialization of | |
the WordPress admin panel. | |
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. Add your page slug name, where you have the search form. | |
2. In summary, the script dynamically enables or disables the "Apply" button based on whether all | |
specified fields on the page are filled out, ensuring that the button is only clickable when all required fields have data. | |
function custom_required_field_script() { | |
// Only add this script on the specific page with the slug 'YOUR PAGE SLUG NAME/' | |
if (strpos($_SERVER['REQUEST_URI'], 'YOUR PAGE SLUG NAME/') !== false) { | |
?> |
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
Video Tutorials here: | |
https://www.youtube.com/watch?v=hJhc90ETv0A | |
https://www.youtube.com/watch?v=ao8tlJ09Tc8 | |
https://www.youtube.com/watch?v=BF7eernlAFA | |
function enqueue_drag_drop_script() { | |
if ( current_user_can( 'administrator' ) ) { | |
wp_enqueue_script('jquery-ui-sortable'); |