Developer hooks

Houzez

Hook name: propertyhive_houzez_property_query_args

Hook type: Filter

Description: Customise the arguments passed to WP_Query when deciding which properties to sync.

Default: All published properties with 'On Market' ticked

Example usage:

add_filter( 'propertyhive_houzez_property_query_args', 'sync_sales_only' );
function sync_sales_only( $args ) 
{
    // $args (array) - Array of arguments passed to WP_Query

    $args['meta_query'][] = array(
        'key' => '_department',
        'value' => 'residential-sales'
    );
    return $args;
}

Hook name: propertyhive_houzez_property_pre_sync

Hook type: Action

Description: Fired before a property is synced

Example usage:

add_action( 'propertyhive_houzez_property_pre_sync', 'pre_sync' );
function pre_sync( $post_id ) 
{
    // $post_id (int) - WordPress post ID of property in Property Hive

    // do something here...
}

Hook name: propertyhive_houzez_property_synced

Hook type: Action

Description: Fired after a property is synced

Example usage:

add_action( 'propertyhive_houzez_property_synced', 'post_sync', 10, 2 );
function post_sync( $post_id, $synced ) 
{
    // $post_id (int) - WordPress post ID of property in Property Hive
    // $synced (bool) - Was the property synced or skipped (when 'only sync modified properties' setting enabled)

    // do something here...
}

Hook name: propertyhive_houzez_property_deleted

Hook type: Action

Description: Fired after a property is drafted because it's no longer on the market in Property Hive

Example usage:

add_action( 'propertyhive_houzez_property_deleted', 'property_drafted' );
function property_drafted( $post_id ) 
{
    // $post_id (int) - WordPress post ID of property in Property Hive

    // do something here...
}

RealHomes

Hook name: propertyhive_realhomes_property_query_args

Hook type: Filter

Description: Customise the arguments passed to WP_Query when deciding which properties to sync.

Default: All published properties with 'On Market' ticked

Example usage:

add_filter( 'propertyhive_realhomes_property_query_args', 'sync_featured_only' );
function sync_featured_only( $args ) 
{
    // $args (array) - Array of arguments passed to WP_Query

    $args['meta_query'][] = array(
        'key' => '_featured',
        'value' => 'yes'
    );
    return $args;
}

Hook name: propertyhive_realhomes_property_synced

Hook type: Action

Description: Fired after a property is synced

Example usage:

add_action( 'propertyhive_realhomes_property_synced', 'post_sync', 10, 2 );
function post_sync( $post_id, $synced ) 
{
    // $post_id (int) - WordPress post ID of property in Property Hive
    // $synced (bool) - Was the property synced or skipped (when 'only sync modified properties' setting enabled)

    // do something here...
}

Hook name: propertyhive_realhomes_property_deleted

Hook type: Action

Description: Fired after a property is drafted because it's no longer on the market in Property Hive

Example usage:

add_action( 'propertyhive_realhomes_property_deleted', 'property_drafted' );
function property_drafted( $post_id ) 
{
    // $post_id (int) - WordPress post ID of property in Property Hive

    // do something here...
}

WpResidence

Hook name: propertyhive_wpresidence_property_query_args

Hook type: Filter

Description: Customise the arguments passed to WP_Query when deciding which properties to sync.

Default: All published properties with 'On Market' ticked

Example usage:

add_filter( 'propertyhive_wpresidence_property_query_args', 'sync_sales_only' );
function sync_sales_only( $args ) 
{
    // $args (array) - Array of arguments passed to WP_Query

    $args['meta_query'][] = array(
        'key' => '_department',
        'value' => 'residential-sales'
    );
    return $args;
}

Hook name: propertyhive_wpresidence_property_pre_sync

Hook type: Action

Description: Fired before a property is synced

Example usage:

add_action( 'propertyhive_wpresidence_property_pre_sync', 'pre_sync' );
function pre_sync( $post_id ) 
{
    // $post_id (int) - WordPress post ID of property in Property Hive

    // do something here...
}

Hook name: propertyhive_wpresidence_property_synced

Hook type: Action

Description: Fired after a property is synced

Example usage:

add_action( 'propertyhive_wpresidence_property_synced', 'post_sync', 10, 3 );
function post_sync( $ph_post_id, $wpr_post_id, $synced ) 
{
    // $ph_post_id (int) - WordPress post ID of property in Property Hive
    // $wpr_post_id (int) - WordPress post ID of cloned property in WpResidence
    // $synced (bool) - Was the property synced or skipped (when 'only sync modified properties' setting enabled)

    // do something here...
}

Hook name: propertyhive_wpresidence_property_deleted

Hook type: Action

Description: Fired after a property is drafted because it's no longer on the market in Property Hive

Example usage:

add_action( 'propertyhive_wpresidence_property_deleted', 'property_drafted' );
function property_drafted( $post_id ) 
{
    // $post_id (int) - WordPress post ID of property in WpResidence

    // do something here...
}

RealesWP

Hook name: propertyhive_realeswp_property_query_args

Hook type: Filter

Description: Customise the arguments passed to WP_Query when deciding which properties to sync.

Default: All published properties with 'On Market' ticked

Example usage:

add_filter( 'propertyhive_realeswp_property_query_args', 'sync_sales_only' );
function sync_sales_only( $args ) 
{
    // $args (array) - Array of arguments passed to WP_Query

    $args['meta_query'][] = array(
        'key' => '_department',
        'value' => 'residential-sales'
    );
    return $args;
}

Hook name: propertyhive_realeswp_property_synced

Hook type: Action

Description: Fired after a property is synced

Example usage:

add_action( 'propertyhive_realeswp_property_synced', 'post_sync', 10, 2 );
function post_sync( $post_id, $synced ) 
{
    // $post_id (int) - WordPress post ID of property in Property Hive
    // $synced (bool) - Was the property synced or skipped (when 'only sync modified properties' setting enabled)

    // do something here...
}

Hook name: propertyhive_realeswp_property_deleted

Hook type: Action

Description: Fired after a property is drafted because it's no longer on the market in Property Hive

Example usage:

add_action( 'propertyhive_realeswp_property_deleted', 'property_drafted' );
function property_drafted( $post_id ) 
{
    // $post_id (int) - WordPress post ID of property in Property Hive

    // do something here...
}

Hook name: ph_reales_image_size

Hook type: Filter

Description: The size of image to use in the RealesWP gallery.

Default: full

Example usage:

add_filter( 'ph_reales_image_size', 'use_large_image' );
function use_large_image( $size ) 
{
    // $size (string) - Image size ('full', 'large', 'medium', 'thumbnail')
    
    return 'large';
}

Hook name: ph_reales_plan_size

Hook type: Filter

Description: The size of floorplan to use in the RealesWP gallery.

Default: full

Example usage:

add_filter( 'ph_reales_plan_size', 'use_large_floorplan' );
function use_large_floorplan( $size ) 
{
    // $size (string) - Floorplan image size ('full', 'large', 'medium', 'thumbnail')
    
    return 'large';
}

Real Estate 7

Hook name: propertyhive_real_estate_7_property_query_args

Hook type: Filter

Description: Customise the arguments passed to WP_Query when deciding which properties to sync.

Default: All published properties with 'On Market' ticked

Example usage:

add_filter( 'propertyhive_real_estate_7_property_query_args', 'sync_sales_only' );
function sync_sales_only( $args ) 
{
    // $args (array) - Array of arguments passed to WP_Query

    $args['meta_query'][] = array(
        'key' => '_department',
        'value' => 'residential-sales'
    );
    return $args;
}

Hook name: propertyhive_real_estate_7_property_pre_sync

Hook type: Action

Description: Fired before a property is synced

Example usage:

add_action( 'propertyhive_real_estate_7_property_pre_sync', 'pre_sync' );
function popre_synct_sync( $post_id ) 
{
    // $post_id (int) - WordPress post ID of property in Property Hive

    // do something here...
}

Hook name: propertyhive_real_estate_7_property_synced

Hook type: Action

Description: Fired after a property is synced

Example usage:

add_action( 'propertyhive_real_estate_7_property_synced', 'post_sync', 10, 3 );
function post_sync( $ph_post_id, $re7_post_id, $synced ) 
{
    // $ph_post_id (int) - WordPress post ID of property in Property Hive
    // $re7_post_id (int) - WordPress post ID of property in Real Estate 7
    // $synced (bool) - Was the property synced or skipped (when 'only sync modified properties' setting enabled)

    // do something here...
}

Hook name: propertyhive_real_estate_7_property_deleted

Hook type: Action

Description: Fired after a property is drafted because it's no longer on the market in Property Hive

Example usage:

add_action( 'propertyhive_real_estate_7_property_deleted', 'property_drafted' );
function property_drafted( $post_id ) 
{
    // $post_id (int) - WordPress post ID of property in Real Estate 7

    // do something here...
}