Plugin Directory

Changeset 519552


Ignore:
Timestamp:
03/15/2012 08:21:08 PM (14 years ago)
Author:
Albert Bertilsson
Message:

Display more data in fields when displaying a single item. (Eg: post_content)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • database-peek/trunk/database-peek.php

    r515453 r519552  
    360360                    $cn = $col_names[$count];
    361361                    echo "<td>$cn</td>";
    362                     $this->get_cell_formatted($value, $col_links, $col_names[$count]);
     362                    $this->get_cell_formatted($value, $col_links, $col_names[$count], 500);
    363363                    echo '</tr>';
    364364                    $count++;
     
    404404
    405405       
    406         function get_cell_formatted($value, $col_links, $name) {
     406        function get_cell_formatted($value, $col_links, $name, $length = 50) {
    407407            $fk = '';
    408408
    409             if (strlen($value) > 50)
    410                 $value = substr($value, 0, 50) . ' ' . '...';
     409            if (strlen($value) > $length)
     410                $value = substr($value, 0, $length) . ' ' . '...';
    411411            $value = esc_html($value);
    412412
Note: See TracChangeset for help on using the changeset viewer.