Making WordPress.org


Ignore:
Timestamp:
07/02/2018 12:47:04 PM (8 years ago)
Author:
netweb
Message:

Support Hub: Update Support Hub to latest changes via GitHub

References:

Props clorith, kenshino, netweb.
See #3485.

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  
    9999
    100100                        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                                );
    105107                                add_action( 'manage_posts_custom_column', array( $this, 'register_custom_columns' ), 10, 2 );
    106108                        }
     
    301303        public function meta_box_setup() {
    302304                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                        );
    307311                } 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                        );
    312318                }
    313319        } // End meta_box_setup()
     
    370376                                        case 'hidden':
    371377                                                $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";
    374380                                                break;
    375381                                        case 'text':
    376382                                        case 'url':
    377383                                                $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";
    379385                                                if ( isset( $v['description'] ) ) {
    380386                                                        $html .= '<p class="description">' . $v['description'] . '</p>' . "\n";
     
    384390                                        case 'textarea':
    385391                                                $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";
    387393                                                if ( isset( $v['description'] ) ) {
    388394                                                        $html .= '<p class="description">' . $v['description'] . '</p>' . "\n";
     
    392398                                        case 'editor':
    393399                                                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                                                );
    398406                                                $field = ob_get_contents();
    399407                                                ob_end_clean();
     
    416424                                                }
    417425
    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" />';
    419427                                                $field .= '<button id="' . esc_attr( $k ) . '" class="helphub-upload button" ' . $data_atts . '>' . $v['label'] . '</button>';
    420428                                                $html  .= '<tr valign="top"><th><label for="' . esc_attr( $k ) . '">' . $v['name'] . '</label></th><td>' . $field . "\n";
     
    477485                                                }
    478486                                                $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";
    480488                                                if ( isset( $v['description'] ) ) {
    481489                                                        $html .= '<p class="description">' . $v['description'] . '</p>' . "\n";
Note: See TracChangeset for help on using the changeset viewer.