Ejemplo n.º 1
0
/**
 * This function return the value of $filed if exists.
 * Applies two filters:
 * <pre>
 * <code>
 *  subscription_content_$field eg: subscription_content_link
 *  subscription_content_$content_type_$field : subscription_content_video_link
 * </code>
 * </pre>
 * 
 * @author Fawaz Tahir <*****@*****.**>
 * @param string $field
 * @return mix $value
 */
function show_content_field($field = 'title')
{
    if (object_has($field)) {
        $current = get_current_subscription_object();
        $value = $current[$field];
        $value = apply_filters($value, 'subscription_content_' . $field);
        $value = apply_filters($value, 'subscription_content_' . $current['content_type'] . '_' . $field);
        if ($value) {
            return $value;
        } else {
            return false;
        }
    }
    return false;
}
Ejemplo n.º 2
0
function add_subscription_seen_feature($url)
{
    $current = get_current_subscription_object();
    return $url . "&feature=subscription&ccid=" . base64_encode($current['content_id'] . ":" . $current['content_type']);
}