#Installing ngrok on OSX
- Download ngrok
- Unzip it to your Applications directory
- Create a symlink (instructions below)
Run the following two commands in Terminal to create the symlink.
# cd into your local bin directory
<?php | |
function compareImages($imagePathA, $imagePathB, $accuracy){ | |
//load base image | |
$bim = imagecreatefromjpeg($imagePathA); | |
//create comparison points | |
$bimX = imagesx($bim); | |
$bimY = imagesy($bim); | |
$pointsX = $accuracy*5; | |
$pointsY = $accuracy*5; | |
$sizeX = round($bimX/$pointsX); |
#Installing ngrok on OSX
Run the following two commands in Terminal to create the symlink.
# cd into your local bin directory
/** | |
* Remove the preview step for Job | |
* @param array $steps | |
* @return array | |
*/ | |
if ( !function_exists( 'handyman_custom_submit_job_steps' ) ) { | |
function handyman_custom_submit_job_steps( $steps ) { | |
unset( $steps['preview'] ); | |
return $steps; | |
} |
/** | |
* Allow to remove method for an hook when, it's a class method used and class don't have variable, but you know the class name :) | |
* @see https://github.com/herewithme/wp-filters-extras | |
*/ | |
function remove_filters_for_anonymous_class( $hook_name = '', $class_name ='', $method_name = '', $priority = 0 ) { | |
global $wp_filter; | |
// Take only filters on right hook name and priority | |
if ( !isset($wp_filter[$hook_name][$priority]) || !is_array($wp_filter[$hook_name][$priority]) ) | |
return false; |
function setup_past_application_nav() { | |
global $bp; | |
if ( ! class_exists( 'WP_Job_Manager' ) ) | |
return; | |
if ( ! class_exists( 'BP_Job_Manager' ) ) | |
return; | |
if ( ! class_exists( 'WP_Job_Manager_Applications' ) ) | |
return; |
/** | |
* Allow to remove method for an hook when, it's a class method used and class don't have variable, but you know the class name :) | |
*/ | |
function remove_filters_for_anonymous_class( $hook_name = '', $class_name ='', $method_name = '', $priority = 0 ) { | |
global $wp_filter; | |
// Take only filters on right hook name and priority | |
if ( !isset($wp_filter[$hook_name][$priority]) || !is_array($wp_filter[$hook_name][$priority]) ) | |
return false; | |
// Loop on filters registered | |
foreach( (array) $wp_filter[$hook_name][$priority] as $unique_id => $filter_array ) { |
<?php | |
/** | |
* Remove Class Filter Without Access to Class Object | |
* | |
* In order to use the core WordPress remove_filter() on a filter added with the callback | |
* to a class, you either have to have access to that class object, or it has to be a call | |
* to a static method. This method allows you to remove filters with a callback to a class | |
* you don't have access to. | |
* | |
* Works with WordPress 1.2+ (4.7+ support added 9-19-2016) |
<?php | |
/** | |
* WP_Job_Manager_Form_Register class. | |
*/ | |
class WP_Job_Manager_Form_Register extends WP_Job_Manager_Form { | |
public static $form_name = 'register'; | |
protected static $job_id; | |
protected static $preview_job; | |
protected static $steps; |
<h2 id="titlebar">Showing <span class="count_jobs"></span> Jobs</h2> | |
<ul class="job_listings"> |