Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <tr valign="top">
- <th scope="row"><?php _e( 'Last Modified', WP_TABLE_RELOADED_TEXTDOMAIN ); ?>:</th>
- <td><?php echo $this->format_datetime( $table['last_modified'] ); ?> <?php _e( 'by', WP_TABLE_RELOADED_TEXTDOMAIN ); ?> <?php echo $this->get_last_editor( $table['last_editor_id'] ); ?></td>
- </tr>
- <tr valign="top">
- <th scope="row">Appears in:</th>
- <td><?php
- global $wpdb;
- $query = "SELECT * FROM $wpdb->posts WHERE post_status = 'publish'";
- $results = $wpdb->get_results($query);
- $pattern = '/table id=["]?(\d+)/';
- foreach ($results as $post) {
- $m = preg_match($pattern, $post->post_content, $matches);
- if ($m) {
- if ($matches[1] == $table['id']) {
- $link = get_permalink($post->ID);
- $edit = get_edit_post_link($post->ID);
- echo "<a href='$link'>$post->post_title</a> (<a href='$edit'>edit</a>)<br />";
- }
- }
- }
- ?></td>
- </tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement