Clean up spaces, tabs, indentation, and bracket formatting

This commit is contained in:
Brian Miyaji
2021-11-10 15:41:40 +09:00
parent e58beb1201
commit 3dff686a00
285 changed files with 29638 additions and 24147 deletions

View File

@@ -2,24 +2,28 @@
/**
* Staff Header
*
* @author ThemeBoy
* @package SportsPress/Templates
* @author ThemeBoy
* @package SportsPress/Templates
* @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
if ( ! isset( $id ) )
$id = get_the_ID();
if ( ! isset( $id ) ) {
$id = get_the_ID();
}
$post = function_exists( 'icl_object_id' ) ? get_post( icl_object_id( $id, 'sp_staff', true ) ) : get_post( $id );
$post = function_exists( 'icl_object_id' ) ? get_post( icl_object_id( $id, 'sp_staff', true ) ) : get_post( $id );
$title = $post->post_title;
if ( $title ) {
$staff = new SP_Staff( $id );
$role = $staff->role();
if ( $role )
$title = '<strong class="sp-staff-role">' . $role->name . '</strong> ' . $title;
?>
<h3 class="sp-staff-name"><?php echo $title ?></h3>
<?php
$staff = new SP_Staff( $id );
$role = $staff->role();
if ( $role ) {
$title = '<strong class="sp-staff-role">' . $role->name . '</strong> ' . $title;
}
?>
<h3 class="sp-staff-name"><?php echo $title; ?></h3>
<?php
}