This file contains hidden or 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 formatDateRange(startDate, endDate) { | |
const start = new Date(startDate); | |
const end = new Date(endDate); | |
const optionsSameYear = { year: 'numeric' }; | |
const optionsSameMonth = { month: 'long', day: 'numeric' }; | |
const optionsFull = { month: 'long', day: 'numeric', year: 'numeric' }; | |
// Check if the start and end dates are the same | |
if (start.getTime() === end.getTime()) { |
This file contains hidden or 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> | |
window.dataLayer = window.dataLayer || []; | |
</script> | |
<script> | |
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({"gtm.start": | |
new Date().getTime(),event:"gtm.js"});var f=d.getElementsByTagName(s)[0], | |
j=d.createElement(s),dl=l!="dataLayer"?"&l="+l:"";j.async=true;j.src= | |
"https://www.googletagmanager.com/gtm.js?id="+i+dl;f.parentNode.insertBefore(j,f); | |
})(window,document,"script","dataLayer","GTM-NQ49BKQ"); | |
</script> |
This file contains hidden or 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 | |
function registering_ppm_addons_reloaded( $widgets_manager ) { | |
require_once( __DIR__ . '/addons.php' ); | |
$widgets_manager->register( new \PPM_Slider_Widget() ); | |
$widgets_manager->register( new \PPM_ImageBox_Widget() ); | |
$widgets_manager->register( new \PPM_Testimonials_Widget() ); | |
$widgets_manager->register( new \PPM_RelatedProducts_Widget() ); |
This file contains hidden or 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
"customizations": { | |
"layout": { | |
"value": null | |
}, | |
"titleGraphic": { | |
"value": null | |
}, | |
"titleGraphicCategory": { | |
"value": null | |
}, |
This file contains hidden or 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
[ | |
{ | |
"_id": "6398bedd741c8e001972d49e", | |
"active": true, | |
"clearance": { | |
"cents": 0.0, | |
"currency_iso": "USD" | |
}, | |
"created_at": null, | |
"min_quantity": 1, |
This file contains hidden or 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
RewriteEngine on | |
RewriteRule ^(.*)$ https://blog.preparedpantry.com/$1 [R=301,L] |
This file contains hidden or 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 | |
// official documentation link: https://theeventscalendar.com/knowledgebase/k/using-tribe_get_events/ | |
$events = tribe_get_events( [ | |
'posts_per_page' => 3, | |
'start_date' => date('Y-m-d') | |
] ); |
This file contains hidden or 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 | |
/* | |
Plugin Name: Ajax Taxonomy | |
Version: 1.0 | |
*/ | |
wp_enqueue_script('jquery'); | |
add_action('wp_ajax_my_prefix_ajax_taxonomy', 'my_prefix_ajax_taxonomy'); | |
add_action('wp_ajax_nopriv_my_prefix_ajax_taxonomy', 'my_prefix_ajax_taxonomy'); |
This file contains hidden or 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 modal_testimonial_btn( $atts, $content = null ) { | |
extract( shortcode_atts( array( | |
'form_id' => '' | |
), $atts ) ); | |
$q = new WP_Query( | |
array('posts_per_page' => -1, 'post_type' => 'review') | |
); |
This file contains hidden or 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 | |
namespace App\Http\Livewire; | |
use App\Models\State; | |
use Livewire\Component; | |
class EditState extends Component | |
{ |
NewerOlder