- Timestamp:
- 03/23/2018 07:10:32 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/classes/class-bp-messages-notices-admin.php
r11870 r11910 37 37 */ 38 38 public $list_table = ''; 39 39 40 40 41 41 /** … … 88 88 89 89 /** 90 * Add the ' All MemberNotices' admin menu item.90 * Add the 'Site Notices' admin menu item. 91 91 * 92 92 * @since 3.0.0 … … 99 99 100 100 $this->screen_id = add_users_page( 101 _x( ' All MemberNotices', 'Notices admin page title', 'buddypress' ),102 _x( ' All MemberNotices', 'Admin Users menu', 'buddypress' ),101 _x( 'Site Notices', 'Notices admin page title', 'buddypress' ), 102 _x( 'Site Notices', 'Admin Users menu', 'buddypress' ), 103 103 'manage_options', 104 104 'bp-notices', … … 155 155 $notice = new BP_Messages_Notice( $notice_id ); 156 156 $success = $notice->delete(); 157 break; 157 break; 158 158 } 159 159 if ( $success ) { … … 186 186 <?php if ( version_compare( $GLOBALS['wp_version'], '4.8', '>=' ) ) : ?> 187 187 188 <h1 class="wp-heading-inline"><?php echo esc_html_x( 'All Member Notices', 'Notices admin page title', 'buddypress' ); ?></h1> 189 190 <a id="add_notice" class="page-title-action" href="#"><?php esc_html_e( 'Add New Notice', 'buddypress' ); ?></a> 191 188 <h1 class="wp-heading-inline"><?php echo esc_html_x( 'Site Notices', 'Notices admin page title', 'buddypress' ); ?></h1> 192 189 <hr class="wp-header-end"> 193 190 194 191 <?php else : ?> 195 192 196 <h1> 197 <?php echo esc_html_x( 'All Member Notices', 'Notices admin page title', 'buddypress' ); ?> 198 <a id="add_notice" class="add-new-h2" href="#"><?php esc_html_e( 'Add New Notice', 'buddypress' ); ?></a> 199 </h1> 193 <h1><?php echo esc_html_x( 'Site Notices', 'Notices admin page title', 'buddypress' ); ?></h1> 200 194 201 195 <?php endif; ?> 202 196 203 <form action=<?php echo esc_url( wp_nonce_url( $this->url, 'new-notice', 'ns-nonce' ) ); ?> method="post"> 204 <table class="widefat"> 205 <tr> 206 <td><label for="bp_notice_subject"><?php esc_html_e( 'Subject', 'buddypress' ); ?></label></td> 207 <td><input type="text" class="widefat" id="bp_notice_subject" name="bp_notice[subject]"/></td> 208 </tr> 209 <tr> 210 <td><label for="bp_notice_content"><?php esc_html_e( 'Content', 'buddypress' ); ?></label></td> 211 <td><textarea class="widefat" id="bp_notice_content" name="bp_notice[content]"></textarea></td> 212 </tr> 213 <tr class="submit"> 214 <td> </td> 215 <td style="float:right"> 216 <input type="reset" value="<?php esc_attr_e( 'Cancel Notice', 'buddypress' ); ?>" class="button-secondary"> 217 <input type="submit" value="<?php esc_attr_e( 'Save Notice', 'buddypress' ); ?>" name="bp_notice[send]" class="button-primary"> 218 </td> 219 </tr> 220 </table> 221 <form> 197 <p class="bp-notice-about"><?php esc_html_e( 'Manage notices shown at front end of your site to all logged-in users.', 'buddypress' ); ?></p> 198 199 <div class="bp-new-notice-panel"> 200 201 <h2 class="bp-new-notice"><?php esc_html_e( 'Add New Notice', 'buddypress' ); ?></h2> 202 203 <form action="<?php echo esc_url( wp_nonce_url( $this->url, 'new-notice', 'ns-nonce' ) ); ?>" method="post"> 204 205 <div> 206 <label for="bp_notice_subject"><?php esc_html_e( 'Subject', 'buddypress' ); ?></label> 207 <input type="text" class="bp-panel-input" id="bp_notice_subject" name="bp_notice[subject]"/> 208 209 <label for="bp_notice_content"><?php esc_html_e( 'Content', 'buddypress' ); ?></label> 210 <textarea class="bp-panel-textarea" id="bp_notice_content" name="bp_notice[content]"></textarea> 211 </div> 212 213 <input type="submit" value="<?php esc_attr_e( 'Publish Notice', 'buddypress' ); ?>" name="bp_notice[send]" class="button button-primary save alignleft"> 214 215 </form> 216 217 </div> 222 218 223 219 <?php if ( isset( $_GET['success'] ) || isset( $_GET['error'] ) ) : ?> … … 231 227 esc_html_e( 'Notice was not created. Please try again.', 'buddypress' ); 232 228 } else { 233 esc_html_e( 'Notice was not updated. Please try again.', 'buddypress' ); 229 esc_html_e( 'Notice was not updated. Please try again.', 'buddypress' ); 234 230 } 235 231 } else { … … 247 243 <?php endif; ?> 248 244 245 <h2 class="bp-notices-list"><?php esc_html_e( 'Notices List', 'buddypress' ); ?></h2> 246 249 247 <?php $this->list_table->display(); ?> 250 248
Note: See TracChangeset
for help on using the changeset viewer.