Installing Supervisor on OS X is simple:
sudo pip install supervisor
This assumes you have pip. If you don't:
| <?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; | |
| } |
| <?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; |
| function custom_job_post_type_link( $post_id, $post ) { | |
| // don't add the id if it's already part of the slug | |
| $permalink = $post->post_name; | |
| if ( strpos( $permalink, strval( $post_id ) ) ) { | |
| return; | |
| } | |
| // unhook this function to prevent infinite looping | |
| remove_action( 'save_post_job_listing', 'custom_job_post_type_link', 10, 2 ); |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| // create fake page called "chat-room" | |
| // modify function and variable names with "ABCD" to whatever you like | |
| // modify variable $fakepage_ABCD_url to the fake URL you require | |
| add_filter('the_posts','fakepage_ABCD_detect',-10); | |
| function fakepage_ABCD_detect($posts){ | |
| global $wp; | |
| global $wp_query; | |
| global $fakepage_ABCD_detect; // used to stop double loading |