3ev Core Wordpress library API
  • Namespace
  • Class

Namespaces

  • Tev
    • Application
      • Bootstrap
    • Author
      • Model
    • Contracts
    • Database
      • CustomTables
    • Field
      • Model
      • Util
    • Plugin
      • Action
      • Shortcode
    • Post
      • Model
      • Repository
    • Taxonomy
      • Model
      • Repository
    • Term
      • Model
      • Repository
    • Util
    • View
      • Exception
  • None

Classes

  • Author

Class Author

Author entity class.

Provides a nicely object-oriented interface to a Wordpress post author.

Tev\Author\Model\Author implements Tev\Contracts\WordpressWrapperInterface
Namespace: Tev\Author\Model
Located at Tev/Author/Model/Author.php

Methods summary

public
# __construct( WP_User $base )

Constructor.

Constructor.

Inject dependencies.

Parameters

$base
Base WP_User object
public integer
# getId( )

Get the author ID.

Get the author ID.

Returns

integer
public string
# getFirstName( )

Get the author first name.

Get the author first name.

Returns

string
public string
# getLastName( )

Get the author last first name.

Get the author last first name.

Returns

string
public string
# getNiceName( )

Get the author nice name.

Get the author nice name.

Returns

string
public string
# getDisplayName( )

Get the author display name.

Get the author display name.

Returns

string
public string
# getEmail( )

Get the author email address.

Get the author email address.

Returns

string
public string
# getUrl( )

Get the author URL (link to their own blog or website).

Get the author URL (link to their own blog or website).

Returns

string
public string
# getPostsUrl( )

Get the URL to the author's posts on this app.

Get the URL to the author's posts on this app.

Returns

string
public integer
# getPostCount( )

Get the total number of published posts the author has.

Get the total number of published posts the author has.

Returns

integer
public string
# getMeta( string $field )

Get a meta field value for this author.

Get a meta field value for this author.

Parameters

$field
Field name

Returns

string
Field data. Empty string if field does not exist
public string
# getAvatarTag( integer $size = 96, string $alt = null )

Get an image tag for this author's avatar.

Get an image tag for this author's avatar.

Parameters

$size
Avatar size. Max 512, default 96
$alt
Alt text. Defaults to display name

Returns

string
public WP_User
# getBaseObject( )

Get the underlying WP_User object.

Get the underlying WP_User object.

Returns

WP_User

Implementation of

Tev\Contracts\WordpressWrapperInterface::getBaseObject()
3ev Core Wordpress library API API documentation generated by ApiGen