Skip to:
Content

BuddyPress.org

Ticket #4669: 4669.01.patch

File 4669.01.patch, 1.5 KB (added by r-a-y, 13 years ago)

Disregard this patch. BP_Theme_Compat class needs to be refactored entirely. New ticket will be created for this.

  • bp-core/bp-core-theme-compatibility.php

    class BP_Theme_Compat { 
    5858         */
    5959        public function __construct( Array $properties = array() ) {
    6060                $this->_data = $properties;
     61
     62                $this->setup_actions();
    6163        }
    6264
    6365        /**
    class BP_Theme_Compat { 
    8385        public function __get( $property ) {
    8486                return array_key_exists( $property, $this->_data ) ? $this->_data[$property] : '';
    8587        }
     88
     89        /**
     90         * Setup actions.
     91         *
     92         * @since BuddyPress (1.7)
     93         */
     94        protected function setup_actions() {
     95                // Adds 'bp_head' hook
     96                add_action( 'wp_head', array( $this, 'bp_head' ), 10 );
     97        }
     98
     99        /**
     100         * Adds the 'bp_head' hook to the header.
     101         *
     102         * @since BuddyPress (1.7)
     103         */
     104        public function bp_head() {
     105                do_action( 'bp_head' );
     106        }
    86107}
    87108
    88109/** Functions *****************************************************************/
  • bp-templates/bp-legacy/buddypress-functions.php

    class BP_Legacy extends BP_Theme_Compat { 
    8585         * @uses add_filter() To add various filters
    8686         * @uses add_action() To add various actions
    8787         */
    88         private function setup_actions() {
     88        protected function setup_actions() {
    8989
    9090                /** Scripts ***********************************************************/
    9191