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: CHB Meta Box test | |
* Plugin URI: http://www.chrispian.com | |
* Description: Just testing out OOP Meta Boxes. | |
* Version: 0.0.1 | |
* Requires at least: 5.3 | |
* Requires PHP: 7.2 | |
* Author: Chrispian H. Burks | |
* Author URI: http://chrispian.com |
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
# If using artisan tinker you need to pause the listener then start artisan and then restart the listener. | |
# When finished, you need to pause and restart as well. | |
#Set PhpStorm to listen on port 9090, and turn on the listener | |
[xdebug] | |
xdebug.remote_enable=1 | |
xdebug.remote_port=9090 | |
xdebug.idekey=PHPSTORM | |
xdebug.remote_host=localhost | |
xdebug.remote_autostart=on |
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
[Xdebug] | |
# Make sure to point to the correct php version for this local. | |
zend_extension = /opt/php/7.2.0/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so | |
xdebug.remote_enable=1 | |
xdebug.remote_connect_back=On | |
xdebug.remote_port=9090 | |
xdebug.profiler_enable=0 | |
xdebug.remote_host=localhost | |
xdebug.remote_handler=dbgp | |
xdebug.remote_mode=req |
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
{"lastUpload":"2020-09-09T01:47:02.847Z","extensionVersion":"v3.4.3"} |
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 filter_search($query) { | |
if ($query->is_search) { | |
$query->set('post_type', array('post', 'tribe_events', 'page')); | |
}; | |
return $query; | |
}; | |
add_filter('pre_get_posts', 'filter_search'); |
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
#!/bin/sh | |
`dscacheutil -flushcache` | |
echo Done. DNS Restarted. |
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
// FIX PERMALINK OF CATEGORIES MATCHING PRIMARY CATEGORY | |
add_filter( 'wc_product_post_type_link_product_cat', function( $term, $terms, $post ) { | |
// Get the primary term as saved by Yoast | |
$primary_cat_id = get_post_meta( $post->ID, '_yoast_wpseo_primary_product_cat', true ); | |
// If there is a primary and it's not currently chosen as primary | |
if ( $primary_cat_id && $term->term_id != $primary_cat_id ) { | |
// Find the primary term in the term list |
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
//Semaphore properties | |
$key = 1111; // Key can be any unique number | |
$max = 1; // Max number of connections | |
$permissions = 0666; // default permissions | |
$autoRelease = 1; // To keep from a deadlock | |
// Begin Semaphore locking | |
$semaphore = sem_get( $key, $max, $permissions, $autoRelease ); | |
if( !$semaphore ) { | |
// Probably best to log vs. error message. But should exit or return to prevent execution if we can't get the semaphore. |
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
import React from "react" | |
import { Link, graphql } from "gatsby" | |
import Img from "gatsby-image" | |
import Layout from "../components/layout" | |
import SEO from "../components/seo" | |
export default ({ data }) => { | |
return ( | |
<Layout> | |
<SEO title="home" /> |