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 id="pagin"></div> | |
<script> | |
jQuery(document).ready(function($) { | |
//Pagination | |
pageSize = 10; | |
incremSlide = 10; | |
startPage = 0; | |
numberPage = 0; |
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
<script> | |
jQuery(document).ready(function($) { | |
$('.jet-form-builder__submit').on('click', function() { | |
$('.mylistings').load(window.location.href + ' .mylistings'); | |
setTimeout(function() { | |
$(".jet-form-builder-messages-wrap").fadeOut(); | |
}, 3000); | |
}); | |
}); |
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_action('check_admin_referer', 'logout_without_confirm', 10, 2); | |
function logout_without_confirm($action, $result) | |
{ | |
/** | |
* Allow logout without confirmation | |
*/ | |
if ($action == "log-out" && !isset($_GET['_wpnonce'])) { | |
$redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : 'https://yoursite.com'; | |
$location = str_replace('&', '&', wp_logout_url($redirect_to)); | |
header("Location: $location"); |
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 Sheet_WP(e) { | |
var sheet = e.source.getActiveSheet(); | |
//replace CPT with your sheet name | |
if(sheet.getName() == 'CPT'){ | |
var range = e.range; | |
var affectedRow = range.getRow(); | |
var postId = sheet.getRange(affectedRow, 1).getValue(); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body style="background-color: #f6f6f6; | |
font-family: arial; | |
-webkit-font-smoothing: antialiased; | |
font-size: 16px; |
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
<script> | |
jQuery(document).ready(function($) { | |
$(document).on('click',".fa-check-circle",function () { | |
var cct_id = $(this).siblings('.jet-listing-dynamic-field__content').text(); | |
jQuery.ajax({ | |
type: "post", | |
dataType: "json", |
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_action( 'jet-form-builder/custom-action/send_notification', function( $request, $action_handler ) { | |
$cct_id = $request['inserted_cct_notifications']; | |
$email_notify = $request['email_notify']; | |
$notification_details = $request['notification_details']; | |
$users = get_users(); | |
foreach ($users as $user) { | |
$user_id = $user->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
add_shortcode( 'jet_post_terms', function( $atts = array() ) { | |
$atts = shortcode_atts( array( | |
'tax' => '', | |
'lvl' => '' | |
), $atts, 'jet_post_terms' ); | |
$post_id = get_the_ID(); | |
if ( empty( $atts['tax'] ) ) { | |
return; |
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 calculate_reading_time() { | |
if (is_single()) { | |
global $post; | |
// Adjust the words-per-minute rate according to your preference | |
$words_per_minute = 200; | |
// Get the post content | |
$content = get_post_field('post_content', $post->ID); |
NewerOlder