WordPress.org

Making WordPress.org

Ticket #192: 192.diff

File 192.diff, 6.2 KB (added by markoheijnen, 6 years ago)

First try

  • wordcamp.org/public_html/wp-content/themes/wordcamp-base/lib/structure/class-wcb-element.php

     
    11<?php
    22
    33class WCB_Element {
    4         function render() {
     4        function render( $resume_only=false ) {
    55                $this->before();
    66                $this->content();
    77                $this->after();
  • wordcamp.org/public_html/wp-content/themes/wordcamp-base/lib/structure/class-wcb-sidebar.php

     
    2323                $this->id = register_sidebar( $this->args );
    2424        }
    2525       
    26         function render() {
     26        function render( $resume_only=false ) {
    2727                if ( ! isset( $this->id ) || ! is_active_sidebar( $this->id ) )
    2828                        return;
    2929               
  • wordcamp.org/public_html/wp-content/themes/wordcamp-base/lib/structure/class-wcb-content.php

     
    1818                parent::after();
    1919        }
    2020
    21         function render() {
     21        function render( $resume_only=false ) {
    2222                if ( ! $this->open ) {
    2323                        $this->open = true;
    2424                        $this->before();
  • wordcamp.org/public_html/wp-content/themes/wordcamp-base/lib/utils/class-wcb-metabox.php

     
    1010        var $id_base;
    1111        static $registry;
    1212
    13         // PHP4 Compatible constructor
    14         function WCB_Metabox( $id_base='' ) {
    15                 $this->__construct( $id_base );
    16         }
    17 
    1813        function __construct( $id_base='' ) {
    1914                $this->id_base = ( empty( $id_base ) ) ? get_class( $this ) : $id_base;
    2015
     
    211206         * @todo Add access when php5+.
    212207         * @access protected
    213208         */
    214         function save() {}
     209        function save( $post_id, $post ) {}
    215210
    216211
    217212        /**
     
    223218         * @access protected
    224219         * @return boolean Whether to save the metabox.
    225220         */
    226         function maybe_save() {}
     221        function maybe_save( $post_id, $post ) {}
    227222
    228223        /**
    229224         * Public access, for hooks, but final so it's remains fixed.
  • wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/structure/class-wcb-element.php

     
    11<?php
    22
    33class WCB_Element {
    4         function render() {
     4        function render( $resume_only=false ) {
    55                $this->before();
    66                $this->content();
    77                $this->after();
  • wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/structure/class-wcb-sidebar.php

     
    2323                $this->id = register_sidebar( $this->args );
    2424        }
    2525       
    26         function render() {
     26        function render( $resume_only=false ) {
    2727                if ( ! isset( $this->id ) || ! is_active_sidebar( $this->id ) )
    2828                        return;
    2929               
  • wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/structure/class-wcb-content.php

     
    1818                parent::after();
    1919        }
    2020
    21         function render() {
     21        function render( $resume_only=false ) {
    2222                if ( ! $this->open ) {
    2323                        $this->open = true;
    2424                        $this->before();
  • wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/utils/class-wcb-metabox.php

     
    1010        var $id_base;
    1111        static $registry;
    1212
    13         // PHP4 Compatible constructor
    14         function WCB_Metabox( $id_base='' ) {
    15                 $this->__construct( $id_base );
    16         }
    17 
    1813        function __construct( $id_base='' ) {
    1914                $this->id_base = ( empty( $id_base ) ) ? get_class( $this ) : $id_base;
    2015
     
    211206         * @todo Add access when php5+.
    212207         * @access protected
    213208         */
    214         function save() {}
     209        function save( $post_id, $post ) {}
    215210
    216211
    217212        /**
     
    223218         * @access protected
    224219         * @return boolean Whether to save the metabox.
    225220         */
    226         function maybe_save() {}
     221        function maybe_save( $post_id, $post ) {}
    227222
    228223        /**
    229224         * Public access, for hooks, but final so it's remains fixed.
  • wordcamp.org/public_html/wp-content/themes/wordcamp-base-v2/lib/utils/class-wcb-registry.php

     
    1010         */
    1111        function register( $classname ) {
    1212                if ( ! isset( $this->instances[ $classname ] ) )
    13                         $this->instances[ $classname ] = & new $classname();
     13                        $this->instances[ $classname ] = new $classname();
    1414        }
    1515        /**
    1616         * Retrieve an instance of a class.