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
/** | |
* First of all change prefix if you have different one. As default WordPress has `wp_` | |
*/ | |
// Update home and siteurl. | |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
// Update posts guid. | |
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); |
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
$spaceamounts: ('none', 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 75, 80, 100, 150); // Adjust this to include the pixel amounts you need. | |
$sides: (top, bottom, left, right); // Leave this variable alone | |
@each $space in $spaceamounts { | |
@each $side in $sides { | |
.m-#{str-slice($side, 0, 1)}-#{$space} { | |
@if $space == 'none' { | |
margin-#{$side}: 0px !important; | |
} @else { | |
margin-#{$side}: #{$space}px !important; |
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
var mySwiper = new Swiper('.swiper-container', { | |
slidesPerView: 5, | |
spaceBetween: 30, | |
loop: true, | |
centeredSlides: true, | |
pagination: { | |
el: '.swiper-pagination', | |
clickable: true, | |
}, | |
on: { |
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( 'wpcf7_before_send_mail', 'fordwich_create_post_after_cf7' ); | |
/** | |
* Do stuff for my contact form form. This function shouldn't return aything | |
* | |
* @param WPCF7_ContactForm $contact_form wpcf7 object, passed by refference | |
*/ | |
function fordwich_create_post_after_cf7( $WPCF7_ContactForm ) { |
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
String.prototype.getValueByKey = function(k){ | |
var p = new RegExp('\\b'+k+'\\b','gi'); | |
return this.search(p) != -1 ? decodeURIComponent(this.substr(this.search(p)+k.length+1).substr(0,this.substr(this.search(p)+k.length+1).search(/(&|;|$)/))) : ""; | |
}; |
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
.curex-hero-thumb { | |
position: absolute; | |
left: calc((-100vw + 100%) / 2); | |
right: calc((-100vw + 100%) / 2); | |
height: 100%; | |
} |
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
/** | |
* | |
* Import Class | |
* A helper class for support CS to OCDI | |
* | |
*/ | |
if ( !class_exists( 'OCDI_Plugin' ) ) | |
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 eduprime_get_nested_events() | |
{ | |
// get the meta | |
$event_posts = get_posts(array('post_type' => 'tp_event', 'posts_per_page' => -1)); | |
if( ! $event_posts ) return ''; | |
$status_meta = array(); | |
foreach ($event_posts as $single ) { | |
$meta = get_post_meta( $single->ID, 'tp_event_status', true ); |