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
// Function to display the current user's role | |
function display_current_user_role_shortcode() { | |
// Check if a user is logged in | |
if ( is_user_logged_in() ) { | |
// Get the current user's data | |
$current_user = wp_get_current_user(); | |
// Retrieve the user's roles | |
$roles = $current_user->roles; | |
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: registernewrole | |
Hook: | |
add_action( 'jet-form-builder/custom-action/registernewrole', 'register_new_user_role', 10, 2 ); | |
function register_new_user_role( $request, $handler ) { | |
// Get the role name from the form field (assuming the field name is 'role_name') | |
$role_name = isset( $request['role_name'] ) ? sanitize_text_field( $request['role_name'] ) : ''; | |
// Get the capabilities from the form field (assuming the field name is 'select_capabilities') | |
$capabilities = isset( $request['select_capabilities'] ) ? array_map( 'sanitize_text_field', (array) $request['select_capabilities'] ) : []; |
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
function add_custom_roles_via_snippet() { | |
// Capabilities for CEO, Operational Manager, and Listing Manager | |
$full_capabilities = array( | |
'edit_post' => true, | |
'edit_others_posts' => true, | |
'delete_post' => true, | |
'delete_others_posts' => true, | |
'publish_posts' => true, | |
'read_post' => true, | |
'publish_others_posts' => true, |
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
/* The Modal (background) */ | |
.modal { | |
display: none; /* Hidden by default */ | |
position: fixed; /* Stay in place */ | |
z-index: 1; /* Sit on top */ | |
left: 25%; | |
top: 0; | |
width: 50%; /* Full width */ | |
height: 100%; /* Full height */ | |
overflow: auto; /* Enable scroll if needed */ |
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
#inlinetrytable { | |
width: 100%; | |
border-collapse: collapse; | |
} | |
#inlinetrytable th, #inlinetrytable td { | |
padding: 10px; | |
border: 1px solid #ddd; | |
text-align: left; | |
} |
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
.fixed-overlay-card { | |
position: relative; | |
width: 100%; | |
max-width: 1200px; /* Adjust as needed */ | |
height: 420px; | |
margin-bottom: 20px; /* Space between cards */ | |
border-radius: 8px; | |
overflow: hidden; | |
display: flex; | |
align-items: center; |
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
.overlay-card { | |
position: relative; | |
width: 100%; | |
max-width: 1200px; /* Adjust as needed */ | |
height: 420px; | |
margin-bottom: 20px; /* Space between cards */ | |
border-radius: 8px; | |
overflow: hidden; | |
} |
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
<div class="card accordion"> | |
<div class="card-image"> | |
<img src="https://vipprops.ae/wp-content/uploads/jet-form-builder/2172fde49301047270b2897085e4319d/2024/09/Ocean-terrace.jpg" alt="Ocean Terrace"> | |
</div> | |
<div class="card-content"> | |
<h3>Hazrat Bilal Timber/Twing Accordion Card Layout 03</h3> | |
<div class="accordion-sections"> | |
<div class="accordion-section"> | |
<input type="checkbox" id="section1" class="accordion-toggle"> | |
<label for="section1" class="accordion-header">Section 1</label> |
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
.masonry-horizontal { | |
display: flex; | |
background-color: #f9f9f9; | |
border: 1px solid #ddd; | |
border-radius: 8px; | |
overflow: hidden; | |
height: 100%; | |
} | |
.masonry-image { |
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
.card.tabbed { | |
display: flex; | |
border: 1px solid #ddd; | |
border-radius: 8px; | |
overflow: hidden; | |
background: #fff; | |
margin: 20px; | |
} |
NewerOlder