PHP Класс RTMediaAlbum, rtMedia

Автор: Udit Desai ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$media RTMediaMedia Media object associated with the album. It works as an interface for the actions specific the media from this album

Открытые методы

Метод Описание
__construct ( )
add ( string $title = '', boolean | integer $author_id = false, boolean | type $new = true, boolean | integer $post_id = false, boolean $context = false, boolean $context_id = false ) : type Adds a new album
add_global ( string $title = '' ) : boolean Wrapper method to add a global album
delete ( integer $id ) : boolean Generic method to delete any album
delete_global ( integer $id ) : boolean Wrapper method to delete a global album
get_current_author ( ) : integer returns user_id of the current logged in user in wordpress
get_default ( ) : type There is a default global album which works as a Wall Post Album for the user.
get_globals ( ) : bool/mixed/void Get the list of all global albums
merge ( integer $primary_album_id, integer $secondary_album_id ) : int/bool Generic function to merge two albums
register_post_types ( ) Register Custom Post Types required by rtMedia
rtmedia_album_custom_post_status ( )
save_globals ( $album_ids = false ) : boolean Save global albums for newly added album
set_queries_per_page ( integer $per_page, string $table_name ) : integer Helper function to set number of queries in pagination
update ( integer $id, string $title = '' ) : boolean Update any album. Generic method for all the user.
update_global ( integer $id, string $title = '' ) : boolean Wrapper method to update details for any global album
verify_nonce ( type $mode ) : boolean Method verifies the nonce passed while performing any CRUD operations on the album.

Описание методов

__construct() публичный Метод

public __construct ( )

add() публичный Метод

Adds a new album
public add ( string $title = '', boolean | integer $author_id = false, boolean | type $new = true, boolean | integer $post_id = false, boolean $context = false, boolean $context_id = false ) : type
$title string
$author_id boolean | integer
$new boolean | type
$post_id boolean | integer
$context boolean
$context_id boolean
Результат type

add_global() публичный Метод

Wrapper method to add a global album
public add_global ( string $title = '' ) : boolean
$title string
Результат boolean

delete() публичный Метод

Generic method to delete any album
public delete ( integer $id ) : boolean
$id integer
Результат boolean

delete_global() публичный Метод

Wrapper method to delete a global album
public delete_global ( integer $id ) : boolean
$id integer
Результат boolean

get_current_author() публичный Метод

returns user_id of the current logged in user in wordpress
public get_current_author ( ) : integer
Результат integer

get_default() статический публичный Метод

There is a default global album which works as a Wall Post Album for the user.
static public get_default ( ) : type
Результат type

get_globals() статический публичный Метод

Get the list of all global albums
static public get_globals ( ) : bool/mixed/void
Результат bool/mixed/void

merge() публичный Метод

Generic function to merge two albums
public merge ( integer $primary_album_id, integer $secondary_album_id ) : int/bool
$primary_album_id integer
$secondary_album_id integer
Результат int/bool

register_post_types() публичный Метод

Register Custom Post Types required by rtMedia
public register_post_types ( )

rtmedia_album_custom_post_status() публичный Метод

save_globals() публичный Метод

Save global albums for newly added album
public save_globals ( $album_ids = false ) : boolean
Результат boolean

set_queries_per_page() публичный Метод

Helper function to set number of queries in pagination
public set_queries_per_page ( integer $per_page, string $table_name ) : integer
$per_page integer
$table_name string
Результат integer

update() публичный Метод

Update any album. Generic method for all the user.
public update ( integer $id, string $title = '' ) : boolean
$id integer
$title string
Результат boolean

update_global() публичный Метод

Wrapper method to update details for any global album
public update_global ( integer $id, string $title = '' ) : boolean
$id integer
$title string
Результат boolean

verify_nonce() публичный Метод

Method verifies the nonce passed while performing any CRUD operations on the album.
public verify_nonce ( type $mode ) : boolean
$mode type
Результат boolean

Описание свойств

$media публичное свойство

Media object associated with the album. It works as an interface for the actions specific the media from this album
public RTMediaMedia $media
Результат RTMediaMedia