Actions

Actions do nothing unless applied to a Hook. Actions call PHP functions which build HTML. Hooks locate that HTML in the right place on the page. Please reference our Hooks dev doc.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// If WP 3.1 add the new WP Admin bar else add the Ashford Admin bar
if (function_exists('show_admin_bar')) {
  add_action('admin_bar_menu', 'ashford_admin_bar_menu',999);
} else {
  add_action('ashford_body_open', 'ashford_user_bar',1);
}
// add custom background
add_action('init', 'ashford_background',2);
 
// add custom header
add_action('init', 'ashford_header',3);
 
// register all sidebars
add_action( 'widgets_init', 'ashford_register_sidebars',1);
 
// load JavaScript which is printed at bottom of HTML
add_action('ashford_init', 'ashford_theme_init_js',1);
 
// add function to print browser title
add_action('ashford_head_open', 'ashford_title',1);
 
// add fuction to add built-in SEO unless detects All In One SEO plugin
add_action('ashford_head_open', 'ashford_seo',2);
 
// adds function to load default style.css
add_action('ashford_head_css', 'ashford_default_css',2);
 
// add function to load colors entered into Ashford Options
add_action('ashford_head_css', 'ashford_theme_colorize',3);
 
// add function to load print.css
add_action('ashford_head_css', 'ashford_print_css',4);
 
// add function to load page specific CSS entered into custom field
add_action('ashford_head_css', 'ashford_custom_css',100);
 
// add function to print favicon
add_action('ashford_head_close', 'ashford_favicon',1);
 
// add function to print RSS feed dependant on Ashford Options setting
add_action('ashford_head_close', 'ashford_theme_feedburner',2);
 
// add function to print blog title or custom header
add_action('ashford_top_open', 'ashford_display_blog_name',1);
 
// add function to print Ashford Options selection of navigation
add_action('ashford_region_navigation', 'ashford_theme_navigation_menu',1);
 
// add function to display category subnavigation if selected by Ashford Options
add_action('ashford_top_close', 'ashford_theme_category_submenu',1);
 
// add function to print hero
add_action('ashford_region_hero', 'ashford_theme_hero',1);
 
// add function to print breadcrumbs if selected by Ashford Options
add_action('ashford_box_open', 'ashford_display_breadcrumb',1);
 
// add fuctions to print site stripe if selected by Ashford Options 
add_action('ashford_box_open', 'ashford_sitestripe',2);
 
// add fuction to print author box, related posts, categories/tags and share icons
add_action('ashford_post_meta', 'ashford_meta',1);
 
// add function to print "footer" sidebar at bottom
add_action('ashford_close_box', 'ashford_display_bottom',1);
 
// add function to print "speed dial" buttons if selected by Ashford Options 
add_action('ashford_region_content_bottom', 'ashford_theme_speed_dial',1);
 
// add function to print footer text and navigation links
add_action('ashford_region_content_bottom', 'ashford_theme_display_footer',2);
 
// adds welcome modal
add_action('ashford_close_body', 'ashford_theme_welcome',1);
 
// add Google Analytics if entered by Ashford Options
add_action('ashford_close_body', 'ashford_theme_ga',100);
 
// add Ashford Options promo
add_action('ashford_theme_options', 'ashford_theme_options_buy_pro',1);
 
// adds Google Web Site Optimization A/B test code if entered
add_action('ashford_head_close', 'ashford_test_original_head',99);
add_action('ashford_close_body', 'ashford_test_original_body',99);
add_action('ashford_close_body', 'ashford_test_variation_body',99);
add_action('ashford_close_body', 'ashford_test_conversion_body',99);