Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Set path to theme specific functions
- define( 'CELTA_LIB', TEMPLATEPATH . '/lib/' );
- $theme_path = get_bloginfo( 'template_directory' );
- // Set variables with theme names
- $themename = 'Temptation';
- $shortname = 'celta';
- $prefix = 'celta_';
- define ( 'LANGUAGE', 'manifest' );
- // Add Theme Options Panel Functions
- require_once ( CELTA_LIB . 'theme-options.php' );
- // Set Theme Setup
- add_action( 'after_setup_theme', 'celta_theme_setup' );
- function celta_theme_setup() {
- // Set path to theme specific functions
- global $theme_path;
- if ( ! isset( $content_width ) ) $content_width = 610;
- add_theme_support( 'automatic-feed-links' );
- // Load Theme Scripts
- require_once ( CELTA_LIB . 'theme-scripts.php' );
- // Apply Translation
- load_theme_textdomain( LANGUAGE, TEMPLATEPATH . '/languages' );
- // Add Theme Thumbnails
- require_once ( CELTA_LIB . 'theme-thumbnails.php' );
- // Add Custom Post Types
- add_action( 'init', 'celta_post_types' );
- // Add Meta Boxes Actions
- add_action( 'admin_menu', 'celta_page_add_box' );
- add_action( 'save_post', 'celta_page_save_data' );
- add_action( 'admin_menu', 'celta_portfolio_add_box' );
- add_action( 'save_post', 'celta_portfolio_save_data' );
- // Add Shortcodes Interface Action
- add_action( 'admin_init', 'celta_add_shortcodes_interface' );
- // Add CSS3 Support in IE Action
- add_action( 'wp_head', 'celta_render_ie' );
- // Add Custom Widgets Action
- add_action( 'widgets_init', 'celta_load_widgets' );
- }
- // Add Custom Comments Function
- require_once ( CELTA_LIB . 'theme-comments.php' );
- // Add Custom Post Types Function
- require_once ( CELTA_LIB . 'theme-post-types.php' );
- // Add Custom Meta Boxes Functions
- require_once ( CELTA_LIB . 'theme-page-meta-boxes.php' );
- require_once ( CELTA_LIB . 'theme-portfolio-meta-boxes.php' );
- // Add Shortcodes Interface Functions
- require_once ( CELTA_LIB . 'theme-shortcodes-interface.php' );
- // Add CSS3 Support in IE Function
- require_once ( CELTA_LIB . 'theme-iefixes.php' );
- // Add Theme Shortcodes
- require_once ( CELTA_LIB . 'theme-shortcodes.php' );
- // Add Custom Widgets Function
- require_once ( CELTA_LIB . 'theme-widgets.php' );
- // Add Images Resize Function
- require_once ( CELTA_LIB . 'theme-thumbnails-resize.php' );
- // Fixes Shortcodes empty paragraphs
- add_filter('the_content', 'shortcode_empty_paragraph_fix');
- function shortcode_empty_paragraph_fix($content) {
- $array = array (
- '<p>[' => '[',
- ']</p>' => ']',
- ']<br />' => ']'
- );
- $content = strtr($content, $array);
- return $content;
- }
- ?>
- <?php
- /**
- * Register our sidebars and widgetized areas.
- *
- */
- function arphabet_widgets_init() {
- register_sidebar( array(
- 'name' => 'Home right sidebar',
- 'id' => 'home_right_1',
- 'before_widget' => '<div>',
- 'after_widget' => '</div>',
- 'before_title' => '<h2 class="rounded">',
- 'after_title' => '</h2>',
- ) );
- }
- add_action( 'widgets_init', 'arphabet_widgets_init' );
- ?>
- <?php
- // This adds more than one menu location
- add_action( 'init', 'paukai_register_multiple_menus' );
- function paukai_register_multiple_menus() {
- register_nav_menus(
- array(
- 'header-nav' => 'Left Navigation',
- 'footer-nav' => 'Footer Navigation'
- )
- );
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement