Skip to:
Content

bbPress.org

Ticket #1649: common-shortcodes.patch

File common-shortcodes.patch, 1.0 KB (added by alex-ye, 9 years ago)
  • shortcodes.php

    # This patch file was generated by NetBeans IDE
    # Following Index: paths are relative to: \includes\common
    # It uses platform neutral UTF-8 encoding and \n newlines.
    # Above lines and this line are ignored by the patching process.
     
    381381         *
    382382         * @uses get_template_part()
    383383         */
    384         public function display_topic_form() {
     384        public function display_topic_form( $attr = '', $content = ''  ) {
    385385
     386                // Sanity check supplied info
     387                if ( !empty( $content ) || (!empty( $attr['forum_id'] ) && (!is_numeric( $attr['forum_id'] ) || !bbp_is_forum( $attr['forum_id'] ) ) ) )
     388                        return $content;
     389                   
     390                if ( !empty( $attr['forum_id'] ) )
     391                        bbp_set_form_topic_custom_value( 'forum', (int) $attr['forum_id'] );               
     392               
    386393                // Start output buffer
    387394                $this->start( 'bbp_topic_form' );
    388395