12
12
/*=====// CUSTOM LOGIN/ADMIN PAGE //===================*/
13
13
14
14
# Calling your own login css so you can style it
15
- function div_login_styles () {
15
+ function df_login_styles () {
16
16
wp_enqueue_style ( 'theme_login_styles ' , THEME_APPEARANCE_URL .'css/login.css ' , false );
17
17
}
18
18
19
- function div_admin_styles () {
19
+ function df_admin_styles () {
20
20
wp_enqueue_style ( 'theme_admin_styles ' , THEME_APPEARANCE_URL .'css/admin.css ' , false );
21
21
}
22
22
23
23
# Calling it only on the login page
24
- add_action ( 'login_enqueue_scripts ' , 'div_login_styles ' , 10 );
24
+ add_action ( 'login_enqueue_scripts ' , 'df_login_styles ' , 10 );
25
25
26
26
# Calling it only admin
27
- add_action ( 'admin_enqueue_scripts ' , 'div_admin_styles ' , 15 );
27
+ add_action ( 'admin_enqueue_scripts ' , 'df_admin_styles ' , 15 );
28
28
29
29
# Custom Backend Footer
30
- add_filter ('admin_footer_text ' , 'div_custom_admin_footer ' );
31
- function div_custom_admin_footer () {
30
+ add_filter ('admin_footer_text ' , 'df_custom_admin_footer ' );
31
+ function df_custom_admin_footer () {
32
32
_e ('<span id="footer-thankyou">Powered by <a href="http://www.divblend.com" target="_blank">The Div Framework</a></span>. ' , 'div-framework ' );
33
33
}
34
34
35
35
/*=====// THEME SUPPORTS //===================*/
36
36
37
37
# TODO: Need to make these theme support options available on a developers options page
38
38
39
- add_theme_support ( 'post-formats ' , apply_filters ( 'div_post_formats ' , array ( 'gallery ' , 'image ' ) ) );
39
+ add_theme_support ( 'post-formats ' , apply_filters ( 'df_post_formats ' , array ( 'gallery ' , 'image ' ) ) );
40
40
add_theme_support ( 'widgets ' );
41
41
add_theme_support ( 'menus ' );
42
42
add_theme_support ( 'post-thumbnails ' );
@@ -48,46 +48,46 @@ function div_custom_admin_footer() {
48
48
# Enable the default menus
49
49
register_nav_menus (
50
50
array (
51
- 'main-nav ' => __ ( 'Main Navigation ' , 'div_framework ' ), // main nav in header
52
- 'mobile-nav ' => __ ( 'Mobile Navigation ' , 'div_framework ' ), // alternative main menu for mobile
51
+ 'main-nav ' => __ ( 'Main Navigation ' , 'df_framework ' ), // main nav in header
52
+ 'mobile-nav ' => __ ( 'Mobile Navigation ' , 'df_framework ' ), // alternative main menu for mobile
53
53
)
54
54
);
55
55
56
- function div_main_nav ($ newOptions = array ()) {
56
+ function df_main_nav ($ newOptions = array ()) {
57
57
$ options = array (
58
58
'container ' => false , // remove nav container
59
59
'container_class ' => 'menu clearfix ' , // class of container (should you choose to use it)
60
- 'menu ' => __ ( 'Main Navigation ' , 'div_framework ' ), // nav name
60
+ 'menu ' => __ ( 'Main Navigation ' , 'df_framework ' ), // nav name
61
61
'menu_class ' => 'nav top-nav clearfix ' , // adding custom nav class
62
62
'theme_location ' => 'main-nav ' , // where it's located in the theme
63
63
'before ' => '' , // before the menu
64
64
'after ' => '' , // after the menu
65
65
'link_before ' => '' , // before each link
66
66
'link_after ' => '' , // after each link
67
67
'depth ' => 0 , // limit the depth of the nav
68
- 'fallback_cb ' => 'div_framework_main_nav_cb ' , // Callback function if no menu found
68
+ 'fallback_cb ' => 'df_framework_main_nav_cb ' , // Callback function if no menu found
69
69
);
70
70
wp_nav_menu (array_merge ($ options , $ newOptions ));
71
- } /* end div_framework main nav */
71
+ } /* end df_framework main nav */
72
72
73
- function div_mobile_nav ($ newOptions = array ()) {
73
+ function df_mobile_nav ($ newOptions = array ()) {
74
74
$ options = array (
75
75
'container ' => false , // remove nav container
76
76
'container_class ' => 'menu clearfix ' , // class of container (should you choose to use it)
77
- 'menu ' => __ ( 'Mobile Navigation ' , 'div_framework ' ), // nav name
77
+ 'menu ' => __ ( 'Mobile Navigation ' , 'df_framework ' ), // nav name
78
78
'menu_class ' => 'nav top-nav clearfix ' , // adding custom nav class
79
79
'theme_location ' => 'mobile-nav ' , // where it's located in the theme
80
80
'before ' => '' , // before the menu
81
81
'after ' => '' , // after the menu
82
82
'link_before ' => '' , // before each link
83
83
'link_after ' => '' , // after each link
84
84
'depth ' => 0 , // limit the depth of the nav
85
- 'fallback_cb ' => 'div_framework_main_nav_cb '
85
+ 'fallback_cb ' => 'df_framework_main_nav_cb '
86
86
);
87
87
wp_nav_menu (array_merge ($ options , $ newOptions ));
88
- } /* end div_framework mobile nav */
88
+ } /* end df_framework mobile nav */
89
89
90
- function div_framework_main_nav_cb (){
90
+ function df_framework_main_nav_cb (){
91
91
echo '<ul id="menu-main-menu-1" class="nav top-nav clearfix"> ' ;
92
92
wp_list_pages ('sort_column=menu_order&title_li= ' );
93
93
echo '</ul> ' ;
0 commit comments