1. Docs
  2. Developer Guide
  3. Miscellaneous and Snippets
  4. Changing an Action Button Label on Property Details

Changing an Action Button Label on Property Details

add_filter( 'propertyhive_single_property_actions', 'change_floorplan_button_label' );
function change_floorplan_button_label( $actions )
{
    $new_actions = array();
    foreach ( $actions as $action )
    {
        if ( $action['class'] == 'action-floorplans'  )
        {
            $action['label'] = __( 'Floorplan', 'propertyhive' );
        }

        $new_actions[] = $action;
    }

    return $new_actions;
}
Was this article helpful to you? Yes No