Changeset 7354 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/helphub-post-types/classes/class-helphub-post-types-post-type.php
- Timestamp:
- 07/02/2018 12:47:04 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/helphub-post-types/classes/class-helphub-post-types-post-type.php
r7306 r7354 99 99 100 100 if ( 'edit.php' === $pagenow && isset( $_GET['post_type'] ) && $this->post_type === $_GET['post_type'] ) { // WPCS: input var ok; CSRF ok. 101 add_filter( 'manage_edit-' . $this->post_type . '_columns', array( 102 $this, 103 'register_custom_column_headings', 104 ), 10, 1 ); 101 add_filter( 102 'manage_edit-' . $this->post_type . '_columns', array( 103 $this, 104 'register_custom_column_headings', 105 ), 10, 1 106 ); 105 107 add_action( 'manage_posts_custom_column', array( $this, 'register_custom_columns' ), 10, 2 ); 106 108 } … … 301 303 public function meta_box_setup() { 302 304 if ( 'post' === $this->post_type ) { 303 add_meta_box( $this->post_type . '-display', __( 'Display Settings', 'wporg-forums' ), array( 304 $this, 305 'meta_box_content', 306 ), $this->post_type, 'normal', 'high' ); 305 add_meta_box( 306 $this->post_type . '-display', __( 'Display Settings', 'wporg-forums' ), array( 307 $this, 308 'meta_box_content', 309 ), $this->post_type, 'normal', 'high' 310 ); 307 311 } elseif ( 'helphub_version' === $this->post_type ) { 308 add_meta_box( $this->post_type . '-version-meta', __( 'Display Settings', 'wporg-forums' ), array( 309 $this, 310 'meta_box_version_content', 311 ), $this->post_type, 'normal', 'high' ); 312 add_meta_box( 313 $this->post_type . '-version-meta', __( 'Display Settings', 'wporg-forums' ), array( 314 $this, 315 'meta_box_version_content', 316 ), $this->post_type, 'normal', 'high' 317 ); 312 318 } 313 319 } // End meta_box_setup() … … 370 376 case 'hidden': 371 377 $field = '<input name="' . esc_attr( $k ) . '" type="hidden" id="' . esc_attr( $k ) . '" value="' . esc_attr( $data ) . '" />'; 372 $html .= '<tr valign="top">' . $field . "\n";373 $html .= '</tr>' . "\n";378 $html .= '<tr valign="top">' . $field . "\n"; 379 $html .= '</tr>' . "\n"; 374 380 break; 375 381 case 'text': 376 382 case 'url': 377 383 $field = '<input name="' . esc_attr( $k ) . '" type="text" id="' . esc_attr( $k ) . '" class="regular-text" value="' . esc_attr( $data ) . '" />'; 378 $html .= '<tr valign="top"><th><label for="' . esc_attr( $k ) . '">' . $v['name'] . '</label></th><td>' . $field . "\n";384 $html .= '<tr valign="top"><th><label for="' . esc_attr( $k ) . '">' . $v['name'] . '</label></th><td>' . $field . "\n"; 379 385 if ( isset( $v['description'] ) ) { 380 386 $html .= '<p class="description">' . $v['description'] . '</p>' . "\n"; … … 384 390 case 'textarea': 385 391 $field = '<textarea name="' . esc_attr( $k ) . '" id="' . esc_attr( $k ) . '" class="large-text">' . esc_attr( $data ) . '</textarea>'; 386 $html .= '<tr valign="top"><th><label for="' . esc_attr( $k ) . '">' . $v['name'] . '</label></th><td>' . $field . "\n";392 $html .= '<tr valign="top"><th><label for="' . esc_attr( $k ) . '">' . $v['name'] . '</label></th><td>' . $field . "\n"; 387 393 if ( isset( $v['description'] ) ) { 388 394 $html .= '<p class="description">' . $v['description'] . '</p>' . "\n"; … … 392 398 case 'editor': 393 399 ob_start(); 394 wp_editor( $data, $k, array( 395 'media_buttons' => false, 396 'textarea_rows' => 10, 397 ) ); 400 wp_editor( 401 $data, $k, array( 402 'media_buttons' => false, 403 'textarea_rows' => 10, 404 ) 405 ); 398 406 $field = ob_get_contents(); 399 407 ob_end_clean(); … … 416 424 } 417 425 418 $field = '<input name="' . esc_attr( $k ) . '" type="file" id="' . esc_attr( $k ) . '" class="regular-text helphub-upload-field" />';426 $field = '<input name="' . esc_attr( $k ) . '" type="file" id="' . esc_attr( $k ) . '" class="regular-text helphub-upload-field" />'; 419 427 $field .= '<button id="' . esc_attr( $k ) . '" class="helphub-upload button" ' . $data_atts . '>' . $v['label'] . '</button>'; 420 428 $html .= '<tr valign="top"><th><label for="' . esc_attr( $k ) . '">' . $v['name'] . '</label></th><td>' . $field . "\n"; … … 477 485 } 478 486 $field = '<input name="' . esc_attr( $k ) . '" type="date" id="' . esc_attr( $k ) . '" class="helphub-meta-date" value="' . esc_attr( date_i18n( 'F d, Y', $data ) ) . '" />'; 479 $html .= '<tr valign="top"><th><label for="' . esc_attr( $k ) . '">' . $v['name'] . '</label></th><td>' . $field . "\n";487 $html .= '<tr valign="top"><th><label for="' . esc_attr( $k ) . '">' . $v['name'] . '</label></th><td>' . $field . "\n"; 480 488 if ( isset( $v['description'] ) ) { 481 489 $html .= '<p class="description">' . $v['description'] . '</p>' . "\n";
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)