Example #1
0
function dt_a_benefits_col_thumb($column_name, $id)
{
    if ('dt_benefits_thumbs' === $column_name) {
        dt_admin_thumbnail($id);
    }
}
Example #2
0
/**
 * Show thumbnail in column.
 *
 */
function presscore_display_thumbnails_in_admin($column_name, $id)
{
    static $wa_list = -1;
    if (-1 === $wa_list) {
        $wa_list = presscore_get_widgetareas_options();
    }
    switch ($column_name) {
        case 'presscore-thumbs':
            dt_admin_thumbnail($id);
            break;
        case 'presscore-sidebar':
            $wa = get_post_meta($id, '_dt_sidebar_widgetarea_id', true);
            $wa_title = isset($wa_list[$wa]) ? $wa_list[$wa] : $wa_list['sidebar_1'];
            echo esc_html($wa_title);
            break;
        case 'presscore-footer':
            $wa = get_post_meta($id, '_dt_footer_widgetarea_id', true);
            $wa_title = isset($wa_list[$wa]) ? $wa_list[$wa] : $wa_list['sidebar_2'];
            echo esc_html($wa_title);
            break;
        case 'presscore-slideshow-slug':
            if ($dt_post = get_post($id)) {
                echo $dt_post->post_name;
            } else {
                echo '—';
            }
            break;
    }
}
Example #3
0
function dt_a_portfolio_col_thumb($column_name, $id)
{
    if ('dt_portfolio_thumbs' === $column_name) {
        dt_admin_thumbnail($id);
    }
}
Example #4
0
function dt_a_slider_col_thumb($column_name, $id)
{
    if ($column_name === 'dt_slider_thumbs') {
        dt_admin_thumbnail($id);
    }
}
Example #5
0
function dt_a_team_col_thumb($column_name, $id)
{
    if ('dt_team_thumbs' === $column_name) {
        dt_admin_thumbnail($id);
    }
}
/**
 * Handle custom columns.
 *
 */
function presscore_admin_handle_columns($column_name, $id)
{
    static $wa_list = -1;
    if (-1 === $wa_list) {
        $wa_list = presscore_get_widgetareas_options();
    }
    $__none = __('None', 'backend', 'the7mk2');
    switch ($column_name) {
        case 'presscore-thumbs':
            dt_admin_thumbnail($id);
            break;
        case 'presscore-sidebar':
            $wa = get_post_meta($id, '_dt_sidebar_widgetarea_id', true);
            $wa_title = isset($wa_list[$wa]) ? $wa_list[$wa] : $__none;
            echo esc_html($wa_title);
            break;
        case 'presscore-footer':
            $wa = get_post_meta($id, '_dt_footer_widgetarea_id', true);
            $wa_title = isset($wa_list[$wa]) ? $wa_list[$wa] : $__none;
            echo esc_html($wa_title);
            break;
        case 'presscore-slug':
            if ($dt_post = get_post($id)) {
                echo $dt_post->post_name;
            } else {
                echo '—';
            }
            break;
    }
}
Example #7
0
function dt_a_album_col_thumb($column_name, $id)
{
    if ($column_name === 'dt_album_thumbs') {
        dt_admin_thumbnail($id);
    }
}
Example #8
0
function dt_a_catalog_col_thumb($column_name, $id)
{
    if ('dt_catalog_thumbs' === $column_name) {
        dt_admin_thumbnail($id);
    }
}