Skip to content

Instantly share code, notes, and snippets.

View jom's full-sized avatar
🌮

Jake Morrison jom

🌮
View GitHub Profile
@jom
jom / functions.php
Created April 9, 2019 18:55
Change jQuery UI CSS
<?php
add_action( 'wp_loaded', function() {
wp_deregister_style( 'jquery-ui' );
$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.9.2';
wp_register_style( 'jquery-ui', '//code.jquery.com/ui/' . $jquery_version . '/themes/black-tie/jquery-ui.css', array(), $jquery_version );
}, 11 );
@jom
jom / functions.php
Last active December 30, 2020 20:56
Remove Resume Preview Step
<?php
/**
* Remove the preview step when submitting resumes. Code goes in theme functions.php or custom plugin.
* @param array $steps
* @return array
*/
add_filter( 'submit_resume_steps', function( $steps ) {
@jom
jom / redirecToJD.php
Created February 4, 2019 15:54
Redirect to job dashboard after job has been submitted
add_filter( 'job_manager_job_submitted', function() {
if ( wp_redirect( job_manager_get_permalink( 'job_dashboard' ) ) ) {
exit;
}
}, 20 );
@jom
jom / sensei-wc-course-snippet.php
Created December 4, 2018 13:16
Prevent Product Dropdown on Sensei Course Page
<?php
add_action( 'add_meta_boxes', function() {
remove_meta_box( 'course-wc-product', 'course', 'side' );
add_meta_box( 'course-wc-product', __( 'WooCommerce Product', 'woothemes-sensei' ), function() {
if ( ! function_exists( 'Sensei' ) ) { return; }
global $post;
$select_course_woocommerce_product = get_post_meta( $post->ID, '_course_woocommerce_product', true );
echo '<input type="hidden" name="' . esc_attr( 'woo_course_noonce' ) . '" id="' . esc_attr( 'woo_course_noonce' ) . '" value="' . esc_attr( wp_create_nonce( plugin_basename( Sensei()->plugin_path ) ) ) . '" />';
echo '<label for="wc-course-product-id">Product ID</label><br />';
@jom
jom / sp
Created July 26, 2018 13:19
Sequel Pro with Docker Compose
#!/bin/bash
MYSQL_IP="127.0.0.1"
PORT=$(docker-compose port mysql 3306)
DINGHY_IP=$(dinghy ip)
PORT=${PORT/0.0.0.0:/}
FILE="/tmp/connection.spf"
cat > $FILE <<- EOM
<?xml version="1.0" encoding="UTF-8"?>
@jom
jom / functions.php
Created May 23, 2017 18:19
Remove Preview Step for Submitting Resumes
/**
* Remove the preview step. Code goes in theme functions.php or custom plugin.
* @param array $steps
* @return array
*/
function custom_submit_resume_steps( $steps ) {
unset( $steps['preview'] );
return $steps;
}
php integral {
color: #c38392;
background-color: #222;
}