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
| addEventListener('fetch', event => { | |
| event.respondWith(fetchAndApply(event.request)) | |
| }); | |
| /* WARNING: | |
| Anything starting with REPLACEABLE_SECRET_VDB12_ shouldn't be renamed, | |
| because they are used in deployment transformations. | |
| Do not remove the comment below, | |
| it is required to timestamp workers on upload. | |
| Sent from npm. |
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 | |
| /* | |
| Plugin Name: Rad Webhook Demo | |
| Plugin URI: <https://vrhermit.com/?p=4154> | |
| Description: Adds custom WP JSON endpoints that use the FileMaker OData API to submit form data to FileMaker. | |
| Version: 1.0 | |
| Author: radicalappdev | |
| Author URI: <https://radicalappdev.com/> | |
| */ |
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_action( 'rest_api_init', 'custom_routes_webhook_0277'); | |
| function custom_routes_webhook_0277(){ | |
| //(exemplo: /wp-json/exemplo/notificacoes) | |
| register_rest_route( | |
| 'exemplo', '/notificacoes/', array( | |
| 'methods' => 'POST', |
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 | |
| /** | |
| * | |
| * A simple integration of Cloudflare Turnstile with Elementor Forms, following Elementor’s pattern for reCAPTCHA. | |
| * | |
| * Instructions: | |
| * 1. Add this file to your WordPress theme directory. | |
| * 2. Include the file in your theme's `functions.php` file using: | |
| * |
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 | |
| // Custom registration form for WooCommerce | |
| function custom_woocommerce_register_form() { | |
| $user_role = ( ! empty( $_POST['user_role'] ) ) ? sanitize_text_field( $_POST['user_role'] ) : ''; | |
| $company_id = ( ! empty( $_POST['company_id'] ) ) ? sanitize_text_field( $_POST['company_id'] ) : ''; | |
| ?> | |
| <p class="form-row form-row-wide"> | |
| <label for="user_role"><?php _e( 'Choose account type', 'woodmart' ); ?></label> |
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 | |
| /* | |
| Plugin Name: Elementor form submission access | |
| Description: Promotes the Elementor Pro form submissions page to top level, and bypasses the excessive and inflexible restrictions on access. | |
| Version: 2.0.0 | |
| Author: Some netizen | |
| Update URI: do-not-auto-update | |
| */ | |
| namespace Elementor\Core\Admin\Menu; |
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 | |
| // GitHub webhook secret (set this in your GitHub webhook settings) | |
| $secret = "Y0UR-secret-text-here!"; | |
| // Get the payload | |
| $payload = file_get_contents('php://input'); | |
| // Verify the signature | |
| $signature = $_SERVER['HTTP_X_HUB_SIGNATURE'] ?? null; |
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 | |
| /** | |
| * Elementor Conditions based on Page Template | |
| * | |
| * @return void | |
| */ | |
| add_action( 'elementor/theme/register_conditions', function( $conditions_manager ) { | |
| class Page_Template_Condition extends ElementorPro\Modules\ThemeBuilder\Conditions\Condition_Base { |
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
| /** | |
| * Checks form textarea content is english to reduce spam from non-english bots | |
| **/ | |
| function elementor_form_message_field_validation( $field, $record, $ajax_handler ) { | |
| // Let's check the message field only | |
| if ( empty( $field ) || empty( $field['message'] ) ) { | |
| return; | |
| } | |
| // Validate content format by language | |
| $string = $field['message']; |
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_action( 'elementor/query/myonmarketpropertyquery', 'elementor_query_on_market_only' ); | |
| function elementor_query_on_market_only( $query ) | |
| { | |
| $meta_query = $query->get('meta_query'); | |
| $new_meta_query = $meta_query; | |
| $new_meta_query[] = array( | |
| 'key' => '_on_market', | |
| 'value' => 'yes' |