Add actions, filters, hooks, and scripts

This commit is contained in:
Takumi
2013-07-24 19:09:02 +10:00
parent e3fb4c69dd
commit 3cade7da5d
17 changed files with 180 additions and 94 deletions

View File

@@ -30,7 +30,7 @@ include dirname( __FILE__ ) . '/defaults.php' ;
// Settings
include dirname( __FILE__ ) . '/settings.php' ;
// Custom post types
// Custom Post Types
require_once dirname( __FILE__ ) . '/team.php';
require_once dirname( __FILE__ ) . '/event.php';
require_once dirname( __FILE__ ) . '/player.php';
@@ -46,20 +46,14 @@ require_once dirname( __FILE__ ) . '/venue.php';
require_once dirname( __FILE__ ) . '/position.php';
require_once dirname( __FILE__ ) . '/sponsor.php';
// Stylesheets
include dirname( __FILE__ ) . '/styles.php' ;
// Styles
include_once dirname( __FILE__ ) . '/styles.php' ;
// Flush rewrite rules on activation to make sure permalinks work properly
function sp_rewrite_flush() {
sp_team_cpt_init();
flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'sp_rewrite_flush' );
// Scripts
include_once dirname( __FILE__ ) . '/scripts.php' ;
function sp_init() {
add_theme_support( 'post-thumbnails' );
load_plugin_textdomain ( 'sportspress', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
add_image_size( 'sp_icon', 32, 32, false );
}
add_action( 'plugins_loaded', 'sp_init' );
// Hooks, Actions, and Filters
require_once dirname( __FILE__ ) . '/hooks.php';
require_once dirname( __FILE__ ) . '/actions.php';
require_once dirname( __FILE__ ) . '/filters.php';
?>