source/php/ModuleManager.php
public function listTableColumnContent($column, $postId)
    {
        switch ($column) {
            case 'description':
                $description = get_post_meta($postId, 'module-description', true);
                echo !empty($description) ? $description : '';
                break;

            case 'usage':
                $usage = self::getModuleUsage($postId, 3);

                if (count($usage->data) == 0) {
                    echo __('Not used', 'modularity');
                    break;
                }

                $i = 0;

                foreach ($usage->data as $item) {
                    $i++;

                    if ($i > 1) {
                        echo ', ';
                    }

                    echo '<a href="' . get_permalink($item->post_id) . '">' . $item->post_title . '</a>';
                }

                if ($usage->more > 0) {
                    echo ' (' . $usage->more . ' ' . __('more', 'modularity') . ')';
                }

                break;
        }
    }
public function listTableColumnContent($column, $postId)
    {
        switch ($column) {
            case 'description':
                $description = get_post_meta($postId, 'module-description', true);
                echo !empty($description) ? $description : '';
                break;

            case 'usage':
                $usage = self::getModuleUsage($postId, 3);

                if (count($usage->data) == 0) {
                    echo __('Not used', 'modularity');
                    break;
                }

                $i = 0;

                foreach ($usage->data as $item) {
                    $i++;

                    if ($i > 1) {
                        echo ', ';
                    }

                    echo '<a href="' . get_permalink($item->post_id) . '">' . $item->post_title . '</a>';
                }

                if ($usage->more > 0) {
                    echo ' (' . $usage->more . ' ' . __('more', 'modularity') . ')';
                }

                break;
        }
    }
public function listTableColumnContent ( $ column , $ postId ) { switch ( $ column ) { case 'description' : $ description = get_post_meta ( $ postId , 'module-description' , true ) ; echo ! empty ( $ description ) ? $ description : '' ; break ; case 'usage' : $ usage = self :: getModuleUsage ( $ postId , 3 ) ; if ( count ( $ usage -> data ) == 0 ) { echo __ ( 'Not used' , 'modularity' ) ; break ; } $ i = 0 ; foreach ( $ usage -> data as $ item ) { $ i ++ ; if ( $ i > 1 ) { echo ', ' ; } echo '<a href="' . get_permalink ( $ item -> post_id ) . '">' . $ item -> post_title . '</a>' ; } if ( $ usage -> more > 0 ) { echo ' (' . $ usage -> more . ' ' . __ ( 'more' , 'modularity' ) . ')' ; } break ; } }
List table column content
@param  string $column  Column
@param  integer $postId Post id
@return void
List table column content