예제 #1
0
/**
 * Get the add-on corresponding to the current single post we are viewing
 *
 * @return CUAR_AddOn|null
 */
function cuar_get_single_content_addon()
{
    $pt = get_post_type();
    $types = cuar()->get_private_types();
    if (isset($types[$pt])) {
        return cuar_addon($types[$pt]['content-page-addon']);
    }
    return null;
}
예제 #2
0
/**
 * @param string $id The ID of the add-on to find
 *
 * @return CUAR_AddOn The addon you are looking for
 */
function cuar_addon($id)
{
    return cuar()->get_addon($id);
}