| 1 |
<?php |
| 2 |
/** |
| 3 |
* This template contains the Automatic Status list table. |
| 4 |
* |
| 5 |
* @version 1.0 |
| 6 |
* @package Friends |
| 7 |
*/ |
| 8 |
|
| 9 |
// Much of this page has been adapted from wp-admin/edit.php. |
| 10 |
|
| 11 |
?><div class="wrap"> |
| 12 |
<h1 class="wp-heading-inline"> |
| 13 |
<?php |
| 14 |
esc_html_e( 'Automatically Generated Statuses', 'friends' ); |
| 15 |
?> |
| 16 |
</h1> |
| 17 |
|
| 18 |
<hr class="wp-header-end"> |
| 19 |
|
| 20 |
<p><?php esc_html_e( 'For certain actions that you take in the Friends plugin, a status post is created automatically. Here you can review them and publish them as you like.', 'friends' ); ?></p> |
| 21 |
<details> |
| 22 |
<summary><?php esc_html_e( /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ 'Settings' ); ?></summary> |
| 23 |
<form method="post"> |
| 24 |
<?php wp_nonce_field( 'friends-automatic-status' ); ?> |
| 25 |
<table class="form-table"> |
| 26 |
<tbody> |
| 27 |
<tr> |
| 28 |
<td><input type="checkbox" name="enabled" <?php checked( ! get_option( 'friends_automatic_status_disabled' ) ); ?> id="automatic-status-enabled" /> |
| 29 |
<label for="automatic-status-enabled"><?php esc_html_e( 'Enable automatic status', 'friends' ); ?></label> |
| 30 |
<p class="description"><?php esc_html_e( 'When disabled, no draft posts will be automatically created.', 'friends' ); ?></p> |
| 31 |
</td> |
| 32 |
</tr> |
| 33 |
</tbody> |
| 34 |
</table> |
| 35 |
|
| 36 |
<p class="submit"> |
| 37 |
<input type="submit" id="submit" class="button button-primary" value="<?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( 'Save Changes' ); ?>"> |
| 38 |
</p> |
| 39 |
</form> |
| 40 |
</details> |
| 41 |
|
| 42 |
<?php $args['wp_list_table']->views(); ?> |
| 43 |
|
| 44 |
<form id="posts-filter" method="get" action="edit.php"> |
| 45 |
|
| 46 |
<input type="hidden" name="post_status" class="post_status_page" value="draft" /> |
| 47 |
<input type="hidden" name="post_format" value="status" /> |
| 48 |
<input type="hidden" name="post_type" class="post_type_page" value="<?php echo esc_attr( $args['post_type'] ); ?>" /> |
| 49 |
|
| 50 |
|
| 51 |
<?php $args['wp_list_table']->display(); ?> |
| 52 |
|
| 53 |
</form> |
| 54 |
|
| 55 |
<?php |
| 56 |
if ( $args['wp_list_table']->has_items() ) { |
| 57 |
$args['wp_list_table']->inline_edit(); |
| 58 |
} |
| 59 |
?> |
| 60 |
|
| 61 |
</div> |
| 62 |
|