wp/wp-includes/customize/class-wp-customize-partial.php
changeset 9 177826044cd9
parent 7 cf61fcea0001
child 16 a86126ab1dd4
equal deleted inserted replaced
8:c7c34916027a 9:177826044cd9
   157 		}
   157 		}
   158 
   158 
   159 		// Process settings.
   159 		// Process settings.
   160 		if ( ! isset( $this->settings ) ) {
   160 		if ( ! isset( $this->settings ) ) {
   161 			$this->settings = array( $id );
   161 			$this->settings = array( $id );
   162 		} else if ( is_string( $this->settings ) ) {
   162 		} elseif ( is_string( $this->settings ) ) {
   163 			$this->settings = array( $this->settings );
   163 			$this->settings = array( $this->settings );
   164 		}
   164 		}
   165 
   165 
   166 		if ( empty( $this->primary_setting ) ) {
   166 		if ( empty( $this->primary_setting ) ) {
   167 			$this->primary_setting = current( $this->settings );
   167 			$this->primary_setting = current( $this->settings );
   199 		$rendered = false;
   199 		$rendered = false;
   200 
   200 
   201 		if ( ! empty( $this->render_callback ) ) {
   201 		if ( ! empty( $this->render_callback ) ) {
   202 			ob_start();
   202 			ob_start();
   203 			$return_render = call_user_func( $this->render_callback, $this, $container_context );
   203 			$return_render = call_user_func( $this->render_callback, $this, $container_context );
   204 			$ob_render = ob_get_clean();
   204 			$ob_render     = ob_get_clean();
   205 
   205 
   206 			if ( null !== $return_render && '' !== $ob_render ) {
   206 			if ( null !== $return_render && '' !== $ob_render ) {
   207 				_doing_it_wrong( __FUNCTION__, __( 'Partial render must echo the content or return the content string (or array), but not both.' ), '4.5.0' );
   207 				_doing_it_wrong( __FUNCTION__, __( 'Partial render must echo the content or return the content string (or array), but not both.' ), '4.5.0' );
   208 			}
   208 			}
   209 
   209