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 src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script> | |
<script src="https://leafletjs.com/examples/choropleth/us-states.js"></script> <!-- US States GeoJSON --> | |
<script src="https://unpkg.com/leaflet-ajax/dist/leaflet.ajax.min.js"></script> <!-- For loading external GeoJSON --> | |
<script> | |
document.addEventListener("DOMContentLoaded", function() { | |
var map = L.map('map', { | |
center: [37.8, -96], | |
zoom: 5, | |
minZoom: 5, |
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
<?php | |
// Website 1 | |
/* API for Post Sync */ | |
function send_post_to_campus($post_id) { | |
if (wp_is_post_revision($post_id)) { | |
error_log('Skipping post revision ID: ' . $post_id); | |
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
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script> | |
<script src="https://leafletjs.com/examples/choropleth/us-states.js"></script> <!-- US States GeoJSON --> | |
<script src="https://unpkg.com/leaflet-ajax/dist/leaflet.ajax.min.js"></script> <!-- For loading external GeoJSON --> | |
<script> | |
$(".get-my-src").each(function() { | |
var src = $(this).attr("src"); | |
var customHrefWrapper = "<a href='" + src + "' target='_blank'></a>"; |
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
<?php | |
/* Event Add to Calendar Shortcode */ | |
// Shortcode function to display Events | |
function display_events() { | |
ob_start(); | |
// Get the current post ID | |
$current_post_id = get_the_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
jQuery(document).ready(function ($) { | |
var $detailsBox = $('#details-box'); | |
var $detailsImg = $('#details-img'); | |
// var $detailsName = $('#details-name'); | |
// var $detailsText = $('#details-text'); | |
// var $detailsLink = $('#details-link'); | |
$(document).on('mouseover', 'path', function (e) { | |
var imgSrc = $(this).data('img'); // Fetching data-img attribute from hovered path | |
// var textContent = $(this).data('name'); // Fetching data-text attribute from hovered path |
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="sidebar-menu"> | |
<h2>Categories</h2> | |
<ul class="footer-menu-list"> | |
{% for link in linklists.collection-menu.links %} | |
<li class="custom-menu-item {{ link.title }}"><a href="{{ link.url }}">{{ link.title }}</a></li> | |
{% endfor %} | |
<li class="vieW_more"><a href="/collections/all">View More</a></li> | |
</ul> | |
</div> |
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
<?php | |
// Add meta box to Products post type | |
function add_product_user_role_meta_box() { | |
add_meta_box( | |
'product_user_role_meta_box', | |
'User Role', | |
'render_product_user_role_meta_box', | |
'product', | |
'side', |
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
jQuery( document ).ready(function($) { | |
var sections = $('.animateiT'), | |
nav = $('.jump-left'), | |
nav_height = nav.outerHeight(); | |
$(window).on('scroll', function() { | |
var cur_pos = $(this).scrollTop(); | |
sections.each(function() { | |
var top = $(this).offset().top - 300; | |
var bottom = top + $(this).outerHeight(); | |
if (cur_pos >= top && cur_pos <= bottom) { |
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
<?php | |
// Update OFF | |
// Remove WP Updates | |
function remove_core_updates(){ | |
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,); | |
} | |
//add_filter('pre_site_transient_update_core','remove_core_updates'); | |
add_filter('pre_site_transient_update_plugins','remove_core_updates'); | |
add_filter('pre_site_transient_update_themes','remove_core_updates'); |
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
<?php | |
/* redirect after form submit */ | |
add_action('template_redirect', function() { | |
// ID of the redirect page | |
if (!is_page(2904)) { | |
return; | |
} | |
// coming from the checkout, so all is fine |
NewerOlder