protected function templatePartCompat() {

		// The slug is a string in WP and we have an array. So, we're
		// just going to use the first item of the array in this case.
		$slug = $this->slugs ? reset( $this->slugs ) : null;

		// Compat with `get_header|footer|sidebar()`.
		if ( in_array( $this->name, [ 'header', 'footer', 'sidebar' ] ) ) {

			do_action( "get_{$this->name}", $slug );

		// Compat with `get_template_part()`.
		} else {

			do_action( "get_template_part_{$this->name}", $this->name, $slug );
		}
	}
protected function templatePartCompat() {

		// The slug is a string in WP and we have an array. So, we're
		// just going to use the first item of the array in this case.
		$slug = $this->slugs ? reset( $this->slugs ) : null;

		// Compat with `get_header|footer|sidebar()`.
		if ( in_array( $this->name, [ 'header', 'footer', 'sidebar' ] ) ) {

			do_action( "get_{$this->name}", $slug );

		// Compat with `get_template_part()`.
		} else {

			do_action( "get_template_part_{$this->name}", $this->name, $slug );
		}
	}
protected function templatePartCompat ( ) { // The slug is a string in WP and we have an array. So, we're // just going to use the first item of the array in this case. $ slug = $ this -> slugs ? reset ( $ this -> slugs ) : null ; // Compat with `get_header|footer|sidebar()`. if ( in_array ( $ this -> name , [ 'header' , 'footer' , 'sidebar' ] ) ) { do_action ( "get_{$this->name}" , $ slug ) ; // Compat with `get_template_part()`. } else { do_action ( "get_template_part_{$this->name}" , $ this -> name , $ slug ) ; } }
Fires the core WP action hooks for template parts.

Note that WP refers to `$name` and `$slug` differently than we do.
They're the opposite of what we use in our function.

@since  5.0.0
@access protected
@return void
Fires the core WP action hooks for template parts .