SHOW:
|
|
- or go back to the newest paste.
1 | - | <?php |
1 | + | ***************** PAGE TEMPLATE ***************************** |
2 | <?php | |
3 | - | /** |
3 | + | /* |
4 | - | * Initiate Theme Options |
4 | + | * Template Name: Full Width |
5 | - | * |
5 | + | |
6 | - | * @uses wp_deregister_script() |
6 | + | get_header(); ?> |
7 | - | * @uses wp_register_script() |
7 | + | |
8 | - | * @uses wp_enqueue_script() |
8 | + | |
9 | - | * @uses register_nav_menus() |
9 | + | <?php get_template_part( 'element', 'prepage' ); ?> |
10 | - | * @uses add_theme_support() |
10 | + | |
11 | - | * @uses is_admin() |
11 | + | <div id="txtlzr"></div> |
12 | - | * |
12 | + | <script type="text/javascript"> |
13 | - | * @access public |
13 | + | jQuery(document).ready(function($){ |
14 | - | * @since 1.0.0 |
14 | + | var list = ['first blurb', 'second blurb', 'third blurb']; // list of blurbs |
15 | - | * |
15 | + | |
16 | - | * @return void |
16 | + | var txt = $('#txtlzr'); // The container in which to render the list |
17 | ||
18 | - | * Ok, Now that's out of the way, let's rock and roll! |
18 | + | var options = { |
19 | duration: 1000, // Time (ms) each blurb will remain on screen | |
20 | rearrangeDuration: 1000, // Time (ms) a character takes to reach its position | |
21 | effect: 'random', // Animation effect the characters use to appear | |
22 | centered: true // Centers the text relative to its container | |
23 | - | /* Define our theme URL constant */ |
23 | + | } |
24 | - | if(!defined('WP_THEME_URL')) { |
24 | + | |
25 | - | define( 'WP_THEME_URL', get_bloginfo('stylesheet_directory')); |
25 | + | txt.textualizer(list, options); // textualize it! |
26 | txt.textualizer('start'); // start | |
27 | }); | |
28 | </script> | |
29 | - | /* OPTION TREE */ |
29 | + | |
30 | - | add_filter( 'ot_show_pages', '__return_false' ); |
30 | + | <?php get_footer(); ?> |
31 | - | add_filter( 'ot_theme_mode', '__return_true' ); |
31 | + | ******************* FUNCTIONS.PHP *********************** |
32 | - | include_once( 'option-tree/ot-loader.php' ); |
32 | + | |
33 | - | include_once( 'functions/theme-options.php' ); |
33 | + | /* TEXTUALIZER */ |
34 | if ( ! function_exists( 'textualizer' ) ) : | |
35 | - | function ot_custom_style(){ |
35 | + | add_action( 'wp_enqueue_scripts', 'textualizer' ); |
36 | - | wp_register_style( 'custom_wp_admin_css', get_stylesheet_directory_uri() . '/functions/custom-option-tree/option-tree-custom.css', false, '1.0.0' ); |
36 | + | |
37 | - | wp_enqueue_style( 'custom_wp_admin_css' ); |
37 | + | function textualizer() { |
38 | - | } |
38 | + | wp_register_script( 'textualizer', get_template_directory_uri() . '/assets/js/textualizer.js', |
39 | - | add_action('admin_head', 'ot_custom_style'); |
39 | + | array('jquery'), |
40 | false, true); | |
41 | wp_enqueue_script( 'textualizer'); | |
42 | - | /* Load Theme Specific Widgets, Shortcodes, the ability to pull custom fields on the frontend, and our custom meta-boxes for the theme */ |
42 | + | |
43 | - | include('functions/widgets/search_widget.php'); |
43 | + | |
44 | - | include('functions/widgets/social_widget.php'); |
44 | + | endif; |