HEX
Server: Apache
System: Linux p3plzcpnl489499.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: dwauav0tm6jp (6177017)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/dwauav0tm6jp/hosted/austinseminoles_com/wp-content/themes/asc2015/functions.php
<?php
/**
 * Austin Seminoles 2015 functions and definitions
 *
 * When using a child theme (see http://codex.wordpress.org/Theme_Development and
 * http://codex.wordpress.org/Child_Themes), you can override certain functions
 * (those wrapped in a function_exists() call) by defining them first in your child theme's
 * functions.php file. The child theme's functions.php file is included before the parent
 * theme's file, so the child theme functions would be used.
 *
 * @package Austin Seminoles 2015
 * @since 0.1.0
 */
 
 // Useful global constants
define( 'ASC15__VERSION', '0.1.0' );
 
 /**
  * Set up theme defaults and register supported WordPress features.
  *
  * @uses load_theme_textdomain() For translation/localization support.
  *
  * @since 0.1.0
  */
 function asc15__setup() {
	/**
	 * Makes Austin Seminoles 2015 available for translation.
	 *
	 * Translations can be added to the /lang directory.
	 * If you're building a theme based on Austin Seminoles 2015, use a find and replace
	 * to change 'asc15_' to the name of your theme in all template files.
	 */
	load_theme_textdomain( 'asc15_', get_template_directory() . '/languages' );
    register_nav_menu( 'primary', __( 'Primary Menu', 'asc15_' ) );
 }
 add_action( 'after_setup_theme', 'asc15__setup' );
 
 /**
  * Enqueue scripts and styles for front-end.
  *
  * @since 0.1.0
  */
 function asc15__scripts_styles() {
	$postfix = ( defined( 'SCRIPT_DEBUG' ) && true === SCRIPT_DEBUG ) ? '' : '.min';

    wp_enqueue_script( 'asc15', get_template_directory_uri() . "/assets/js/austin_seminoles_2015.js", array('jquery'), ASC15__VERSION, true );
    wp_enqueue_script( 'asc15_cycle', get_template_directory_uri() . "/assets/js/jquery.cycle2.min.js", array('jquery'), ASC15__VERSION, true );
		

    wp_enqueue_style( 'bootstrap', get_template_directory_uri() . "/assets/css/bootstrap.min.css", array(), ASC15__VERSION );
    wp_enqueue_style( 'bootstrap-theme', get_template_directory_uri() . "/assets/css/bootstrap-theme.min.css", array(), ASC15__VERSION );
    wp_enqueue_style( 'asc15', get_template_directory_uri() . "/assets/css/austin_seminoles_2015{$postfix}.css", array(), ASC15__VERSION );
 }
 add_action( 'wp_enqueue_scripts', 'asc15__scripts_styles' );

 /**
  * Add support for thumbnails on posts
  **/
 function thumbnail_suppport() {
  add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );
  set_post_thumbnail_size( 283, 150, array('center', 'center') );
}
add_action( 'after_setup_theme', 'thumbnail_suppport' );
 
 /**
  * Add humans.txt to the <head> element.
  */
 function asc15__header_meta() {
	$humans = '<link type="text/plain" rel="author" href="' . get_template_directory_uri() . '/humans.txt" />';
	
	echo apply_filters( 'asc15__humans', $humans );
 }
 add_action( 'wp_head', 'asc15__header_meta' );

/**
 * Remove the admin bar on the frontend for logged in users.
 */
add_action('after_setup_theme', 'remove_admin_bar');

function remove_admin_bar() {
  show_admin_bar(false);
}

/**
 * Register Custom Post Type
 */
function officer_post_type() {

  $labels = array(
    'name'                => _x( 'Officer Types', 'Post Type General Name', 'text_domain' ),
    'singular_name'       => _x( 'Officer Type', 'Post Type Singular Name', 'text_domain' ),
    'menu_name'           => __( 'Officers', 'text_domain' ),
    'name_admin_bar'      => __( 'Officers', 'text_domain' ),
    'parent_item_colon'   => __( 'Parent Item:', 'text_domain' ),
    'all_items'           => __( 'All Items', 'text_domain' ),
    'add_new_item'        => __( 'Add New Item', 'text_domain' ),
    'add_new'             => __( 'Add New', 'text_domain' ),
    'new_item'            => __( 'New Item', 'text_domain' ),
    'edit_item'           => __( 'Edit Item', 'text_domain' ),
    'update_item'         => __( 'Update Item', 'text_domain' ),
    'view_item'           => __( 'View Item', 'text_domain' ),
    'search_items'        => __( 'Search Item', 'text_domain' ),
    'not_found'           => __( 'Not found', 'text_domain' ),
    'not_found_in_trash'  => __( 'Not found in Trash', 'text_domain' ),
  );
  $args = array(
    'label'               => __( 'officer_type', 'text_domain' ),
    'description'         => __( 'Officer Type Description', 'text_domain' ),
    'labels'              => $labels,
    'supports'            => array( 'title', 'custom-fields', ),
    'taxonomies'          => array( ),
    'hierarchical'        => false,
    'public'              => true,
    'show_ui'             => true,
    'show_in_menu'        => true,
    'menu_position'       => 5,
    'show_in_admin_bar'   => true,
    'show_in_nav_menus'   => true,
    'can_export'          => true,
    'has_archive'         => true,
    'exclude_from_search' => true,
    'publicly_queryable'  => true,
    'capability_type'     => 'page',
  );
  register_post_type( 'officer_type', $args );

}

// Hook into the 'init' action
add_action( 'init', 'officer_post_type', 0 );