Easy Property Listings 3.5.15 Code Reference
  • Package
  • Class
  • Tree
  • Todo
  • Hook Reference

Packages

  • EPL
    • Admin
      • Actions
      • Classes
        • ContactsTable
        • ReportsGraph
        • Welcome
      • Contacts
      • ContactsActions
      • ContactsFunctions
      • Elements
      • Functions
      • Help
      • HelpSingle
      • Menus
      • MenusAddons
      • MenusExtensions
      • MenusLicenses
      • Plugins
      • Reports
      • ReportsGraphing
      • User
    • Assets
      • ScriptsStyles
      • SVG
    • Classes
      • AuthorLoader
      • AuthorMeta
      • Contact
      • Cron
      • CustomPostType
      • Forms
      • License
      • ListingAdvanced
      • ListingElements
      • MetaboxesCustomFields
      • Pagination
      • PropertyMeta
      • RenderFields
      • RestAPI
      • Search
      • Session
      • Updater
    • Compatibility
      • Extensions
      • Functions
      • Shortcodes
    • Functions
      • Actions
      • ConditionalTags
      • ErrorTracking
      • Formatting
      • Front
      • Global
      • Install
      • Pagination
      • Settings
      • Templates
    • Hooks
      • EnergyCertificate
      • ExternalLinks
      • FloorPlan
      • Map
      • ReadMore
      • WebLink
    • Meta
      • InitCustomFields
      • Meta
    • PostTypes
      • Business
      • Commercial
      • CommercialLand
      • Contact
      • Functions
      • Land
      • Property
      • Rental
      • Rural
    • Shortcode
      • CommercialListingSearch
      • ContactForm
      • Listing
      • ListingAdvanced
      • ListingAuction
      • ListingCategory
      • ListingFeature
      • ListingLocation
      • ListingMetaDoc
      • ListingOpen
      • ListingResults
      • ListingSearch
      • Map
    • Taxonomy
      • BusinessCategories
      • ContactTag
      • Features
      • Location
    • Templates
      • Themes
        • iThemes
        • iThemesBuilder
    • Widget
      • Admin
        • Dashboard
      • Classes
        • Author
        • ContactCapture
        • Gallery
        • Listing
        • Search
      • Functions
  • None
  • WordPress
    • Session

Classes

  • EPL_Contact

Class EPL_Contact

EPL_Contact Class

Package: EPL\Classes\Contact
Copyright: Copyright (c) 2020, Merv Barrett
License: GNU Public License
Since: 3.0.0
Located at lib/includes/class-epl-contact.php

Methods summary

public
# __construct( boolean $_id_or_email = false )

Get things going

Get things going

Parameters

$_id_or_email
Contact ID or email.

Since

3.0.0
public mixed
# get_contact_email( integer $id )

Get the primary email of contact / alias of get_primary_email

Get the primary email of contact / alias of get_primary_email

Parameters

$id
Contact ID.

Returns

mixed

Since

3.0
public boolean|integer
# update_contact_email( integer $id, string $value )

Update the primary email of contact

Update the primary email of contact

Parameters

$id
Contact ID.
$value
Contact email.

Returns

boolean|integer

Since

3.0
public mixed
# get_contact_by( string $field = 'id', mixed $value = 0 )

Retrieves a single contact from the database

Retrieves a single contact from the database

Parameters

$field
Type of field option, id or email.
$value
The Contact ID or email to search.

Returns

mixed
Upon success, an object of the contact. Upon failure, NULL

Since

3.0
public mixed|WP_Error
# __get( string $key )

Magic __get function to dispatch a call to retrieve a private property

Magic __get function to dispatch a call to retrieve a private property

Parameters

$key
Meta key.

Returns

mixed|WP_Error

Since

3.0.0
public mixed
# create( array $data = array() )

Creates a contact

Creates a contact

Parameters

$data
Array of attributes for a contact.

Returns

mixed
False if not a valid creation, Contact ID if user is found or valid creation

Since

3.0
public boolean|WP_Post
# contact_exists( null $email = null )

Checking for contact

Checking for contact

Parameters

$email
Contact email address.

Returns

boolean|WP_Post

Since

3.0
public boolean
# update( array $data = array() )

Update a contact record

Update a contact record

Parameters

$data
Array of data attributes for a contact (checked via whitelist).

Returns

boolean
If the update was successful or not

Since

3.0
public boolean
# attach_listing( integer $listing_id = 0 )

Attach listing to the contact then triggers increasing stats

Attach listing to the contact then triggers increasing stats

Parameters

$listing_id
The listing ID to attach to the contact.

Returns

boolean
If the attachment was successfully

Since

3.0
public boolean
# remove_listing( integer $listing_id = 0 )

Remove a listing from this contact, then triggers reducing stats

Remove a listing from this contact, then triggers reducing stats

Parameters

$listing_id
The Payment ID to remove.

Returns

boolean
If the removal was successful

Since

3.0
public
# get_listings( )

Get listings of contact

Get listings of contact

Since

3.0
public
# get_listing_count( )

Get listings count

Get listings count

Since

3.0
public array
# get_notes( integer $number = 10, integer $paged = 1, string $orderby = 'comment_date', string $order = 'DESC' )

Get the parsed notes for a contact as an array

Get the parsed notes for a contact as an array

Parameters

$number
Number of notes per page.
$paged
Paged query.
$orderby
Order by option.
$order
Order option.

Returns

array
The notes requested
public integer
# get_notes_count( )

Get the total number of notes we have after parsing

Get the total number of notes we have after parsing

Returns

integer
The number of notes for the contact.

Since

3.0
public string|boolean
# add_note( string $note = '', string $note_type = 'note', integer $listing_id = 0 )

Add a note for the contact

Add a note for the contact

Parameters

$note
The note to add.
$note_type
Type of note.
$listing_id
Listing ID.

Returns

string|boolean
The new note if added successfully, false otherwise

Since

3.0
public
# delete( )

Delete the contact

Delete the contact

Since

3.0
public boolean|integer
# update_meta( string $key, string $value )

Update Contact Meta

Update Contact Meta

Parameters

$key
Meta key name.
$value
Meta value.

Returns

boolean|integer

Since

3.0
public mixed
# get_meta( string $key )

Get Contact Meta

Get Contact Meta

Parameters

$key
Meta key name.

Returns

mixed

Since

3.0
public mixed
# get_activity_type( string $key )

Returns activity type label for activity type

Returns activity type label for activity type

Parameters

$key
Meta key name.

Returns

mixed

Since

3.0
public static mixed
# get_activity_types( )

Returns all activity types

Returns all activity types

Returns

mixed

Since

3.0.0
public mixed
# epl_contact_get_address( )

Returns Contact Address

Returns Contact Address

Returns

mixed

Since

3.0.0
public mixed
# get_primary_email( integer $id )

Returns Contact Primary Email

Returns Contact Primary Email

Parameters

$id
User ID.

Returns

mixed

Since

3.0.0
public mixed
# get_emails( )

Returns Contact Email

Returns Contact Email

Returns

mixed

Since

3.0.0
3.4.1 Added value span wrapper.
public mixed
# get_phones( )

Returns Contact Phone

Returns Contact Phone

Returns

mixed

Since

3.0.0
3.4.1 Renamed emails to phones and added value span wrapper.
public mixed
# get_category_label( )

Returns Contact Category Label

Returns Contact Category Label

Returns

mixed

Since

3.0.0
public mixed
# get_category_name( )

Returns Contact Category Name

Returns Contact Category Name

Returns

mixed

Since

3.0.0

Properties summary

public integer $ID

The contact ID

The contact ID

Since

3.0.0
# 0
public integer $id

The contact ID Fallback

The contact ID Fallback

Since

3.0.0
# 0
public integer $listing_count

The contact's listing count

The contact's listing count

Since

3.0.0
# 0
public string $email

The contact's email

The contact's email

Since

3.0.0
#
public string $name

The contact's name

The contact's name

Since

3.0.0
#
public string $date_created

The contact's creation date

The contact's creation date

Since

3.0.0
#
public string $background_info

The contact's background info

The contact's background info

Since

3.5.0
#
public string $type

The contact's type

The contact's type

Since

3.5.0
#
public string $heading

The contact's heading

The contact's heading

Since

3.5.0
#
public string $listing_ids

The listing IDs associated with the contact

The listing IDs associated with the contact

Since

3.0
#
public string $notes

Contact Notes

Contact Notes

Since

3.0
#
Easy Property Listings 3.5.15 Code Reference API documentation generated by ApiGen