@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | // append plugin information |
26 | 26 | // Note: is_admin() was used previously, however this prevents jetpack manage & ManageWP from working |
27 | - add_filter('plugins_api', array($this, 'inject_info'), 20, 3); |
|
27 | + add_filter('plugins_api', array($this, 'inject_info'), 20, 3); |
|
28 | 28 | |
29 | 29 | |
30 | 30 | // append update information |
@@ -59,33 +59,33 @@ discard block |
||
59 | 59 | |
60 | 60 | |
61 | 61 | // validate |
62 | - if( isset($args->slug) && $args->slug == $slug ) { |
|
62 | + if( isset($args->slug) && $args->slug == $slug ) { |
|
63 | 63 | |
64 | - $info = acf_pro_get_remote_info(); |
|
65 | - $sections = acf_extract_vars($info, array( |
|
66 | - 'description', |
|
67 | - 'installation', |
|
68 | - 'changelog', |
|
69 | - 'upgrade_notice', |
|
70 | - )); |
|
64 | + $info = acf_pro_get_remote_info(); |
|
65 | + $sections = acf_extract_vars($info, array( |
|
66 | + 'description', |
|
67 | + 'installation', |
|
68 | + 'changelog', |
|
69 | + 'upgrade_notice', |
|
70 | + )); |
|
71 | 71 | |
72 | - $obj = new stdClass(); |
|
72 | + $obj = new stdClass(); |
|
73 | 73 | |
74 | - foreach( $info as $k => $v ) { |
|
74 | + foreach( $info as $k => $v ) { |
|
75 | 75 | |
76 | - $obj->$k = $v; |
|
76 | + $obj->$k = $v; |
|
77 | 77 | |
78 | - } |
|
78 | + } |
|
79 | 79 | |
80 | - $obj->sections = $sections; |
|
80 | + $obj->sections = $sections; |
|
81 | 81 | |
82 | - return $obj; |
|
82 | + return $obj; |
|
83 | 83 | |
84 | - } |
|
84 | + } |
|
85 | 85 | |
86 | 86 | |
87 | - // return |
|
88 | - return $result; |
|
87 | + // return |
|
88 | + return $result; |
|
89 | 89 | |
90 | 90 | } |
91 | 91 | |
@@ -133,22 +133,22 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | |
136 | - // vars |
|
136 | + // vars |
|
137 | 137 | $info = acf_pro_get_remote_info(); |
138 | 138 | $basename = acf_get_setting('basename'); |
139 | 139 | $slug = acf_get_setting('slug'); |
140 | 140 | |
141 | 141 | |
142 | - // create new object for update |
|
143 | - $obj = new stdClass(); |
|
144 | - $obj->slug = $slug; |
|
145 | - $obj->plugin = $basename; |
|
146 | - $obj->new_version = $info['version']; |
|
147 | - $obj->url = $info['homepage']; |
|
148 | - $obj->package = ''; |
|
142 | + // create new object for update |
|
143 | + $obj = new stdClass(); |
|
144 | + $obj->slug = $slug; |
|
145 | + $obj->plugin = $basename; |
|
146 | + $obj->new_version = $info['version']; |
|
147 | + $obj->url = $info['homepage']; |
|
148 | + $obj->package = ''; |
|
149 | 149 | |
150 | 150 | |
151 | - // license |
|
151 | + // license |
|
152 | 152 | if( acf_pro_is_license_active() ) { |
153 | 153 | |
154 | 154 | $obj->package = acf_pro_get_remote_url('download', array( |
@@ -161,12 +161,12 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | |
164 | - // add to transient |
|
165 | - $transient->response[ $basename ] = $obj; |
|
164 | + // add to transient |
|
165 | + $transient->response[ $basename ] = $obj; |
|
166 | 166 | |
167 | 167 | |
168 | 168 | // return |
169 | - return $transient; |
|
169 | + return $transient; |
|
170 | 170 | |
171 | 171 | } |
172 | 172 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | |
52 | 52 | // do not delete! |
53 | - parent::__construct(); |
|
53 | + parent::__construct(); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 |
@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | * |
6 | 6 | */ |
7 | 7 | function lighthouse_menus() { |
8 | - register_nav_menus( |
|
9 | - array( |
|
10 | - 'header-menu-left' => __( 'Header menu left', 'nav menu location', 'lighthouse' ), |
|
11 | - 'header-menu-right' => __( 'Header menu right' , 'nav menu location', 'lighthouse'), |
|
12 | - 'footer-menu' => __( 'Footer menu' , 'nav menu location', 'lighthouse'), |
|
13 | - 'footer-menu-bottom' => __( 'Footer menu bottom' , 'nav menu location', 'lighthouse') |
|
14 | - ) |
|
15 | - ); |
|
8 | + register_nav_menus( |
|
9 | + array( |
|
10 | + 'header-menu-left' => __( 'Header menu left', 'nav menu location', 'lighthouse' ), |
|
11 | + 'header-menu-right' => __( 'Header menu right' , 'nav menu location', 'lighthouse'), |
|
12 | + 'footer-menu' => __( 'Footer menu' , 'nav menu location', 'lighthouse'), |
|
13 | + 'footer-menu-bottom' => __( 'Footer menu bottom' , 'nav menu location', 'lighthouse') |
|
14 | + ) |
|
15 | + ); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | add_action( 'init', 'lighthouse_menus' ); |
@@ -25,104 +25,104 @@ discard block |
||
25 | 25 | |
26 | 26 | //Left menu |
27 | 27 | function lighthouse_header_menu_left() { |
28 | - if ( has_nav_menu( 'header-menu-left' ) ) { |
|
29 | - wp_nav_menu( |
|
30 | - array( |
|
31 | - 'theme_location' => 'header-menu-left', |
|
32 | - 'menu' => '', |
|
33 | - 'container' => 'div', |
|
34 | - 'container_id' => 'header-menu-left-id', |
|
35 | - 'container_class' => 'header-menu-left-cl', |
|
36 | - 'menu_id' => 'header-menu-id', |
|
37 | - 'menu_class' => 'header-menu-cl', |
|
38 | - 'echo' => true, |
|
39 | - 'fallback_cb' => '', |
|
40 | - 'before' => '', |
|
41 | - 'after' => '', |
|
42 | - 'link_before' => '<span>', |
|
43 | - 'link_after' => '</span>', |
|
44 | - 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
45 | - 'depth' => 0, |
|
46 | - 'walker' => '' |
|
47 | - ) |
|
48 | - ); |
|
49 | - } |
|
28 | + if ( has_nav_menu( 'header-menu-left' ) ) { |
|
29 | + wp_nav_menu( |
|
30 | + array( |
|
31 | + 'theme_location' => 'header-menu-left', |
|
32 | + 'menu' => '', |
|
33 | + 'container' => 'div', |
|
34 | + 'container_id' => 'header-menu-left-id', |
|
35 | + 'container_class' => 'header-menu-left-cl', |
|
36 | + 'menu_id' => 'header-menu-id', |
|
37 | + 'menu_class' => 'header-menu-cl', |
|
38 | + 'echo' => true, |
|
39 | + 'fallback_cb' => '', |
|
40 | + 'before' => '', |
|
41 | + 'after' => '', |
|
42 | + 'link_before' => '<span>', |
|
43 | + 'link_after' => '</span>', |
|
44 | + 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
45 | + 'depth' => 0, |
|
46 | + 'walker' => '' |
|
47 | + ) |
|
48 | + ); |
|
49 | + } |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | //Right menu |
53 | 53 | function lighthouse_header_menu_right() { |
54 | - if ( has_nav_menu( 'header-menu-right' ) ) { |
|
55 | - wp_nav_menu( |
|
56 | - array( |
|
57 | - 'theme_location' => 'header-menu-right', |
|
58 | - 'menu' => '', |
|
59 | - 'container' => 'div', |
|
60 | - 'container_id' => 'header-menu-right-id', |
|
61 | - 'container_class' => 'header-menu-right-cl', |
|
62 | - 'menu_id' => 'header-menu-id', |
|
63 | - 'menu_class' => 'header-menu-cl', |
|
64 | - 'echo' => true, |
|
65 | - 'fallback_cb' => '', |
|
66 | - 'before' => '', |
|
67 | - 'after' => '', |
|
68 | - 'link_before' => '<span>', |
|
69 | - 'link_after' => '</span>', |
|
70 | - 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
71 | - 'depth' => 0, |
|
72 | - 'walker' => '' |
|
73 | - ) |
|
74 | - ); |
|
75 | - } |
|
54 | + if ( has_nav_menu( 'header-menu-right' ) ) { |
|
55 | + wp_nav_menu( |
|
56 | + array( |
|
57 | + 'theme_location' => 'header-menu-right', |
|
58 | + 'menu' => '', |
|
59 | + 'container' => 'div', |
|
60 | + 'container_id' => 'header-menu-right-id', |
|
61 | + 'container_class' => 'header-menu-right-cl', |
|
62 | + 'menu_id' => 'header-menu-id', |
|
63 | + 'menu_class' => 'header-menu-cl', |
|
64 | + 'echo' => true, |
|
65 | + 'fallback_cb' => '', |
|
66 | + 'before' => '', |
|
67 | + 'after' => '', |
|
68 | + 'link_before' => '<span>', |
|
69 | + 'link_after' => '</span>', |
|
70 | + 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
71 | + 'depth' => 0, |
|
72 | + 'walker' => '' |
|
73 | + ) |
|
74 | + ); |
|
75 | + } |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | //Fotter menu |
79 | 79 | function lighthouse_footer_menu() { |
80 | - if ( has_nav_menu( 'footer-menu' ) ) { |
|
81 | - wp_nav_menu( |
|
82 | - array( |
|
83 | - 'theme_location' => 'footer-menu', |
|
84 | - 'menu' => '', |
|
85 | - 'container' => 'div', |
|
86 | - 'container_id' => 'footer-menu-id', |
|
87 | - 'container_class' => 'footer-menu-cl', |
|
88 | - 'menu_id' => 'footer-menu-id', |
|
89 | - 'menu_class' => 'footer-menu-cl', |
|
90 | - 'echo' => true, |
|
91 | - 'fallback_cb' => '', |
|
92 | - 'before' => '', |
|
93 | - 'after' => '', |
|
94 | - 'link_before' => '', |
|
95 | - 'link_after' => '', |
|
96 | - 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
97 | - 'depth' => 0, |
|
98 | - 'walker' => '' |
|
99 | - ) |
|
100 | - ); |
|
101 | - } |
|
80 | + if ( has_nav_menu( 'footer-menu' ) ) { |
|
81 | + wp_nav_menu( |
|
82 | + array( |
|
83 | + 'theme_location' => 'footer-menu', |
|
84 | + 'menu' => '', |
|
85 | + 'container' => 'div', |
|
86 | + 'container_id' => 'footer-menu-id', |
|
87 | + 'container_class' => 'footer-menu-cl', |
|
88 | + 'menu_id' => 'footer-menu-id', |
|
89 | + 'menu_class' => 'footer-menu-cl', |
|
90 | + 'echo' => true, |
|
91 | + 'fallback_cb' => '', |
|
92 | + 'before' => '', |
|
93 | + 'after' => '', |
|
94 | + 'link_before' => '', |
|
95 | + 'link_after' => '', |
|
96 | + 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
97 | + 'depth' => 0, |
|
98 | + 'walker' => '' |
|
99 | + ) |
|
100 | + ); |
|
101 | + } |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | //Menu footer-bottom |
105 | 105 | function lighthouse_footer_menu_bottom() { |
106 | - if ( has_nav_menu( 'footer-menu-bottom' ) ) { |
|
107 | - wp_nav_menu( |
|
108 | - array( |
|
109 | - 'theme_location' => 'footer-menu-bottom', |
|
110 | - 'menu' => '', |
|
111 | - 'container' => 'div', |
|
112 | - 'container_id' => 'footer-menu-bottom-id', |
|
113 | - 'container_class' => 'footer-menu-bottom-cl', |
|
114 | - 'menu_id' => 'footer-menu-id', |
|
115 | - 'menu_class' => 'footer-menu-cl', |
|
116 | - 'echo' => true, |
|
117 | - 'fallback_cb' => '', |
|
118 | - 'before' => '', |
|
119 | - 'after' => '', |
|
120 | - 'link_before' => '', |
|
121 | - 'link_after' => '', |
|
122 | - 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
123 | - 'depth' => 0, |
|
124 | - 'walker' => '' |
|
125 | - ) |
|
126 | - ); |
|
127 | - } |
|
106 | + if ( has_nav_menu( 'footer-menu-bottom' ) ) { |
|
107 | + wp_nav_menu( |
|
108 | + array( |
|
109 | + 'theme_location' => 'footer-menu-bottom', |
|
110 | + 'menu' => '', |
|
111 | + 'container' => 'div', |
|
112 | + 'container_id' => 'footer-menu-bottom-id', |
|
113 | + 'container_class' => 'footer-menu-bottom-cl', |
|
114 | + 'menu_id' => 'footer-menu-id', |
|
115 | + 'menu_class' => 'footer-menu-cl', |
|
116 | + 'echo' => true, |
|
117 | + 'fallback_cb' => '', |
|
118 | + 'before' => '', |
|
119 | + 'after' => '', |
|
120 | + 'link_before' => '', |
|
121 | + 'link_after' => '', |
|
122 | + 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', |
|
123 | + 'depth' => 0, |
|
124 | + 'walker' => '' |
|
125 | + ) |
|
126 | + ); |
|
127 | + } |
|
128 | 128 | } |
129 | 129 | \ No newline at end of file |
@@ -64,31 +64,31 @@ |
||
64 | 64 | */ |
65 | 65 | function tinymce_settings( $settings ) { |
66 | 66 | |
67 | - // html elements being stripped |
|
67 | + // html elements being stripped |
|
68 | 68 | $settings['extended_valid_elements'] = 'div[*],article[*]'; |
69 | 69 | |
70 | - // only html elements to keep |
|
71 | - //$settings['valid_elements'] = 'a,strong/b,div,h1,h2,h3,section'; |
|
70 | + // only html elements to keep |
|
71 | + //$settings['valid_elements'] = 'a,strong/b,div,h1,h2,h3,section'; |
|
72 | 72 | |
73 | 73 | // paste elements to keep |
74 | 74 | //$opts = '*[*]'; |
75 | 75 | //$settings['paste_word_valid_elements'] = $opts; |
76 | 76 | |
77 | - // don't remove line breaks |
|
77 | + // don't remove line breaks |
|
78 | 78 | $settings['remove_linebreaks'] = false; |
79 | 79 | |
80 | 80 | $settings['allow_html_in_named_anchor'] = true; |
81 | 81 | |
82 | - // convert newline characters to BR |
|
82 | + // convert newline characters to BR |
|
83 | 83 | $settings['convert_newlines_to_brs'] = true; |
84 | 84 | |
85 | - // don't remove redundant BR |
|
85 | + // don't remove redundant BR |
|
86 | 86 | $settings['remove_redundant_brs'] = false; |
87 | 87 | |
88 | 88 | // only html elements to keep |
89 | 89 | //$settings['wpautop'] = false; |
90 | 90 | |
91 | - // pass back to wordpress |
|
91 | + // pass back to wordpress |
|
92 | 92 | |
93 | 93 | return $settings; |
94 | 94 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | |
52 | 52 | // do not delete! |
53 | - parent::__construct(); |
|
53 | + parent::__construct(); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | |
52 | 52 | // do not delete! |
53 | - parent::__construct(); |
|
53 | + parent::__construct(); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | |
52 | 52 | // do not delete! |
53 | - parent::__construct(); |
|
53 | + parent::__construct(); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | |
52 | 52 | // do not delete! |
53 | - parent::__construct(); |
|
53 | + parent::__construct(); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | |
52 | 52 | // do not delete! |
53 | - parent::__construct(); |
|
53 | + parent::__construct(); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 |