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
SELECT | |
p.ID AS post_id, | |
p.post_title, | |
p.post_author, | |
p.post_date, | |
tm1.name AS purpose, | |
tm2.name AS type_of_unit, | |
pm1.meta_value AS unit_number, | |
pm2.meta_value AS address_from_termlocation, | |
pm3.meta_value AS price, |
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
SELECT | |
p.ID AS post_id, | |
p.post_title, | |
pm1.meta_value AS property_name, | |
pm2.meta_value AS community_name, | |
pm3.meta_value AS type_owner_data, | |
pm4.meta_value AS area, | |
pm5.meta_value AS owner_number, | |
pm6.meta_value AS bedroom, | |
pm7.meta_value AS responsible_person, |
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
SELECT DISTINCT pm.meta_value AS your_meta_field_name | |
FROM wpd8_posts AS p | |
INNER JOIN wpd8_postmeta AS pm ON p.ID = pm.post_id | |
WHERE p.post_type = 'your_post_type_name' AND pm.meta_key = 'your_meta_field_name'; | |
Example | |
SELECT DISTINCT pm.meta_value AS property_name | |
FROM wpd8_posts AS p | |
INNER JOIN wpd8_postmeta AS pm ON p.ID = pm.post_id |
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
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/2.0.8/css/dataTables.dataTables.css"/> | |
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/3.0.2/css/buttons.dataTables.css"/> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-3.6.0.min.js"></script> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.js"></script> | |
<script type="text/javascript" src="https://cdn.datatables.net/2.0.8/js/dataTables.js"></script> | |
<script type="text/javascript" src="https://cdn.datatables.net/buttons/3.0.2/js/dataTables.buttons.js"></script> | |
<script type="text/javascript" src="https://cdn.datatables.net/buttons/3.0.2/js/buttons.dataTables.js"></script> | |
<script type="text/javascript" src="https://cdn.datatables.net/buttons/3.0.2/js/buttons.print.min.js"></script> | |
<script type="text/javascript" src="https://cdn.datatables.net/buttons/3.0.2/js/buttons.colVis.min.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/l |
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
-- Shortcode | |
[wpnonce action='bricks-nonce-admin'] | |
-- php Snippet or Code Snippet | |
// Function to generate the _wpnonce value | |
function generate_wpnonce_shortcode($atts) { | |
// Extract shortcode attributes, if any (default to 'bricks-nonce-admin' action) |
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
--Hook name | |
registervisitor | |
--PHP Hook | |
add_action( 'jet-form-builder/custom-action/registervisitor', function( $request, $action_handler ) { | |
$username = sanitize_user($_POST['email']); | |
$email = sanitize_email($_POST['email']); | |
$first_name = sanitize_text_field($_POST['first-name']); | |
$user_status = sanitize_text_field($_POST['user-status']); |
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
--Hook Name | |
create_terms | |
--PHP Hook | |
add_action( 'jet-form-builder/custom-action/create_terms', function( $request, $action_handler ) { | |
$terms = explode(',', $request['terms']); | |
$taxonomy = $request['tax']; // Replace with your actual taxonomy 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
--Hook Name | |
assignproperty | |
--Php Hook | |
add_action('jet-form-builder/custom-action/assignproperty', function($request, $action_handler) { | |
// Sanitize the input fields to prevent any security issues | |
$property_name = isset($_POST['select_property']) ? sanitize_text_field($_POST['select_property']) : ''; | |
$community_name = isset($_POST['community-name']) ? sanitize_text_field($_POST['community-name']) : ''; | |
$responsible_person = sanitize_text_field($_POST['responsible_person']); | |
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
--Hook Name | |
deleteownerdata | |
--PHP Hook | |
add_action('jet-form-builder/custom-action/deleteownerdata', function($request, $action_handler) { | |
// Sanitize the input fields to prevent any security issues | |
$property_name = isset($_POST['select_property']) ? sanitize_text_field($_POST['select_property']) : ''; | |
$community_name = isset($_POST['community-name']) ? sanitize_text_field($_POST['community-name']) : ''; | |
$responsible_person = sanitize_text_field($_POST['responsible_person']); | |
OlderNewer