function column_title($item) { //Build row actions $actions = array('view' => sprintf('<a href="%s">View</a>', $item['permalink']), 'edit' => sprintf('<a href="post.php?post=%s&action=edit">Edit</a>', $item['ID']), 'update' => sprintf('Decay last calculated %s', SocialMetricsTracker::timeago($item['social_aggregate_score_decayed_last_updated']))); //Return the title contents return '<a href="' . $item['permalink'] . '"><b>' . $item['post_title'] . '</b></a>' . $this->row_actions($actions); }
function column_title($item) { //Build row actions $actions = array('edit' => sprintf('<a href="post.php?post=%s&action=edit">Edit</a>', $item['ID']), 'update' => '<a href="' . add_query_arg('smt_sync_now', $item['ID']) . '" title="' . sprintf('Last updated %s', SocialMetricsTracker::timeago($item['socialcount_LAST_UPDATED'])) . '">Update Stats</a>'); //Return the title contents return '<a href="' . $item['permalink'] . '"><b>' . $item['post_title'] . '</b></a>' . $this->row_actions($actions); }
function column_title($item) { //Build row actions $actions = array('edit' => sprintf('<a href="post.php?post=%s&action=edit">Edit Post</a>', $item['ID']), 'update' => '<a href="' . add_query_arg('smt_sync_now', $item['ID']) . '">Update Stats</a>'); // Show details button if there is alt URL data if (count($item['socialcount_url_data']) > 0) { $actions['details'] = '<a href="javascript:void(0);" onClick="jQuery(\'#stat-details-' . $item['ID'] . '\').slideToggle();">URL Details</a>'; } $actions['info'] = sprintf('Updated %s', SocialMetricsTracker::timeago($item['socialcount_LAST_UPDATED'])); //Return the title contents $output = '<a href="' . $item['permalink'] . '"><b>' . $item['post_title'] . '</b></a>' . $this->row_actions($actions); if (count($item['socialcount_url_data']) > 0) { $output .= $this->more_details($item); } return $output; }