@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | |
| 58 | 58 | // do not delete! |
| 59 | - parent::__construct(); |
|
| 59 | + parent::__construct(); |
|
| 60 | 60 | |
| 61 | 61 | } |
| 62 | 62 | |
@@ -340,8 +340,8 @@ discard block |
||
| 340 | 340 | |
| 341 | 341 | function get_media_item_args( $vars ) { |
| 342 | 342 | |
| 343 | - $vars['send'] = true; |
|
| 344 | - return($vars); |
|
| 343 | + $vars['send'] = true; |
|
| 344 | + return($vars); |
|
| 345 | 345 | |
| 346 | 346 | } |
| 347 | 347 | |
@@ -62,9 +62,9 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | |
| 64 | 64 | // do not delete! |
| 65 | - parent::__construct(); |
|
| 65 | + parent::__construct(); |
|
| 66 | 66 | |
| 67 | - } |
|
| 67 | + } |
|
| 68 | 68 | |
| 69 | 69 | |
| 70 | 70 | /* |
@@ -377,8 +377,8 @@ discard block |
||
| 377 | 377 | |
| 378 | 378 | function get_media_item_args( $vars ) { |
| 379 | 379 | |
| 380 | - $vars['send'] = true; |
|
| 381 | - return($vars); |
|
| 380 | + $vars['send'] = true; |
|
| 381 | + return($vars); |
|
| 382 | 382 | |
| 383 | 383 | } |
| 384 | 384 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | ); |
| 45 | 45 | |
| 46 | 46 | |
| 47 | - // Create an acf version of the_content filter (acf_the_content) |
|
| 47 | + // Create an acf version of the_content filter (acf_the_content) |
|
| 48 | 48 | if( !empty($GLOBALS['wp_embed']) ) { |
| 49 | 49 | |
| 50 | 50 | add_filter( 'acf_the_content', array( $GLOBALS['wp_embed'], 'run_shortcode' ), 8 ); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | |
| 75 | 75 | // do not delete! |
| 76 | - parent::__construct(); |
|
| 76 | + parent::__construct(); |
|
| 77 | 77 | |
| 78 | 78 | } |
| 79 | 79 | |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | |
| 248 | 248 | |
| 249 | 249 | $form_fields[ 'acf-form-data' ] = array( |
| 250 | - 'label' => '', |
|
| 250 | + 'label' => '', |
|
| 251 | 251 | 'input' => 'html', |
| 252 | 252 | 'html' => $html |
| 253 | 253 | ); |
@@ -284,8 +284,8 @@ discard block |
||
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | |
| 287 | - // validate and save |
|
| 288 | - if( acf_validate_save_post(true) ) { |
|
| 287 | + // validate and save |
|
| 288 | + if( acf_validate_save_post(true) ) { |
|
| 289 | 289 | |
| 290 | 290 | acf_save_post( $post['ID'] ); |
| 291 | 291 | |
@@ -258,8 +258,8 @@ |
||
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | |
| 261 | - // validate and save |
|
| 262 | - if( acf_validate_save_post(true) ) { |
|
| 261 | + // validate and save |
|
| 262 | + if( acf_validate_save_post(true) ) { |
|
| 263 | 263 | |
| 264 | 264 | acf_save_post( "comment_{$comment_id}" ); |
| 265 | 265 | |
@@ -382,8 +382,8 @@ |
||
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | |
| 385 | - // save data |
|
| 386 | - if( acf_validate_save_post(true) ) { |
|
| 385 | + // save data |
|
| 386 | + if( acf_validate_save_post(true) ) { |
|
| 387 | 387 | |
| 388 | 388 | acf_save_post( "user_{$user_id}" ); |
| 389 | 389 | |
@@ -181,8 +181,8 @@ discard block |
||
| 181 | 181 | $id = acf_maybe_get($_POST, 'widget-id'); |
| 182 | 182 | |
| 183 | 183 | |
| 184 | - // save data |
|
| 185 | - if( $id && acf_validate_save_post() ) { |
|
| 184 | + // save data |
|
| 185 | + if( $id && acf_validate_save_post() ) { |
|
| 186 | 186 | |
| 187 | 187 | acf_save_post( "widget_{$id}" ); |
| 188 | 188 | |
@@ -218,8 +218,8 @@ discard block |
||
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | |
| 221 | - // save |
|
| 222 | - if( acf_validate_save_post() ) { |
|
| 221 | + // save |
|
| 222 | + if( acf_validate_save_post() ) { |
|
| 223 | 223 | |
| 224 | 224 | acf_save_post( "widget_{$widget->id}" ); |
| 225 | 225 | |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | function rule_types( $choices ) { |
| 47 | 47 | |
| 48 | - $choices[ __("Forms",'acf') ]['options_page'] = __("Options Page",'acf'); |
|
| 48 | + $choices[ __("Forms",'acf') ]['options_page'] = __("Options Page",'acf'); |
|
| 49 | 49 | |
| 50 | - return $choices; |
|
| 50 | + return $choices; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | |
| 88 | 88 | // return |
| 89 | - return $choices; |
|
| 89 | + return $choices; |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | |
@@ -129,19 +129,19 @@ discard block |
||
| 129 | 129 | // match |
| 130 | 130 | if( $rule['operator'] == "==" ) { |
| 131 | 131 | |
| 132 | - $match = ( $options_page === $rule['value'] ); |
|
| 132 | + $match = ( $options_page === $rule['value'] ); |
|
| 133 | 133 | |
| 134 | - } elseif( $rule['operator'] == "!=" ) { |
|
| 134 | + } elseif( $rule['operator'] == "!=" ) { |
|
| 135 | 135 | |
| 136 | - $match = ( $options_page !== $rule['value'] ); |
|
| 136 | + $match = ( $options_page !== $rule['value'] ); |
|
| 137 | 137 | |
| 138 | - } |
|
| 138 | + } |
|
| 139 | 139 | |
| 140 | 140 | |
| 141 | - // return |
|
| 142 | - return $match; |
|
| 141 | + // return |
|
| 142 | + return $match; |
|
| 143 | 143 | |
| 144 | - } |
|
| 144 | + } |
|
| 145 | 145 | |
| 146 | 146 | |
| 147 | 147 | /* |
@@ -216,17 +216,17 @@ discard block |
||
| 216 | 216 | if( acf_verify_nonce('options') ) { |
| 217 | 217 | |
| 218 | 218 | // save data |
| 219 | - if( acf_validate_save_post(true) ) { |
|
| 219 | + if( acf_validate_save_post(true) ) { |
|
| 220 | 220 | |
| 221 | - // get post_id (allow lang modification) |
|
| 222 | - $post_id = acf_get_valid_post_id($this->page['post_id']); |
|
| 221 | + // get post_id (allow lang modification) |
|
| 222 | + $post_id = acf_get_valid_post_id($this->page['post_id']); |
|
| 223 | 223 | |
| 224 | 224 | |
| 225 | - // set autoload |
|
| 226 | - acf_update_setting('autoload', $this->page['autoload']); |
|
| 225 | + // set autoload |
|
| 226 | + acf_update_setting('autoload', $this->page['autoload']); |
|
| 227 | 227 | |
| 228 | 228 | |
| 229 | - // save |
|
| 229 | + // save |
|
| 230 | 230 | acf_save_post( $post_id ); |
| 231 | 231 | |
| 232 | 232 | |
@@ -132,77 +132,77 @@ |
||
| 132 | 132 | |
| 133 | 133 | |
| 134 | 134 | // validate |
| 135 | - if( empty($info) ) { |
|
| 135 | + if( empty($info) ) { |
|
| 136 | 136 | |
| 137 | - acf_add_admin_notice( __('<b>Error</b>. Could not connect to update server', 'acf'), 'error'); |
|
| 138 | - return; |
|
| 137 | + acf_add_admin_notice( __('<b>Error</b>. Could not connect to update server', 'acf'), 'error'); |
|
| 138 | + return; |
|
| 139 | 139 | |
| 140 | - } |
|
| 140 | + } |
|
| 141 | 141 | |
| 142 | 142 | |
| 143 | - // add info to view |
|
| 144 | - $this->view['remote_version'] = $info['version']; |
|
| 143 | + // add info to view |
|
| 144 | + $this->view['remote_version'] = $info['version']; |
|
| 145 | 145 | |
| 146 | 146 | |
| 147 | - // add changelog if the remote version is '>' than the current version |
|
| 147 | + // add changelog if the remote version is '>' than the current version |
|
| 148 | 148 | if( acf_pro_is_update_available() ) |
| 149 | - { |
|
| 150 | - $this->view['update_available'] = true; |
|
| 149 | + { |
|
| 150 | + $this->view['update_available'] = true; |
|
| 151 | 151 | |
| 152 | 152 | |
| 153 | - // changelog |
|
| 154 | - $changelogs = explode('<h4>', $info['changelog']); |
|
| 153 | + // changelog |
|
| 154 | + $changelogs = explode('<h4>', $info['changelog']); |
|
| 155 | 155 | |
| 156 | - foreach( $changelogs as $changelog ) |
|
| 157 | - { |
|
| 158 | - // validate (first segment is always empty due to explode) |
|
| 159 | - if( empty($changelog) ) |
|
| 160 | - { |
|
| 161 | - continue; |
|
| 162 | - } |
|
| 156 | + foreach( $changelogs as $changelog ) |
|
| 157 | + { |
|
| 158 | + // validate (first segment is always empty due to explode) |
|
| 159 | + if( empty($changelog) ) |
|
| 160 | + { |
|
| 161 | + continue; |
|
| 162 | + } |
|
| 163 | 163 | |
| 164 | 164 | |
| 165 | - // explode |
|
| 166 | - $changelog = explode('</h4>', $changelog); |
|
| 167 | - $changelog_version = trim($changelog[0]); |
|
| 168 | - $changelog_text = trim($changelog[1]); |
|
| 169 | - $changelog_text = str_replace('<ul>', '<ul class="ul-disc">', $changelog_text); |
|
| 165 | + // explode |
|
| 166 | + $changelog = explode('</h4>', $changelog); |
|
| 167 | + $changelog_version = trim($changelog[0]); |
|
| 168 | + $changelog_text = trim($changelog[1]); |
|
| 169 | + $changelog_text = str_replace('<ul>', '<ul class="ul-disc">', $changelog_text); |
|
| 170 | 170 | |
| 171 | - if( version_compare($this->view['remote_version'], $changelog_version, '==') ) |
|
| 172 | - { |
|
| 173 | - $this->view['changelog'] = $changelog_text; |
|
| 174 | - break; |
|
| 175 | - } |
|
| 171 | + if( version_compare($this->view['remote_version'], $changelog_version, '==') ) |
|
| 172 | + { |
|
| 173 | + $this->view['changelog'] = $changelog_text; |
|
| 174 | + break; |
|
| 175 | + } |
|
| 176 | 176 | |
| 177 | - } |
|
| 177 | + } |
|
| 178 | 178 | |
| 179 | 179 | |
| 180 | - // upgrade_notice |
|
| 181 | - $upgrade_notices = explode('<h4>', $info['upgrade_notice']); |
|
| 180 | + // upgrade_notice |
|
| 181 | + $upgrade_notices = explode('<h4>', $info['upgrade_notice']); |
|
| 182 | 182 | |
| 183 | - foreach( $upgrade_notices as $upgrade_notice ) |
|
| 184 | - { |
|
| 185 | - // validate (first segment is always empty due to explode) |
|
| 186 | - if( empty($upgrade_notice) ) |
|
| 187 | - { |
|
| 188 | - continue; |
|
| 189 | - } |
|
| 183 | + foreach( $upgrade_notices as $upgrade_notice ) |
|
| 184 | + { |
|
| 185 | + // validate (first segment is always empty due to explode) |
|
| 186 | + if( empty($upgrade_notice) ) |
|
| 187 | + { |
|
| 188 | + continue; |
|
| 189 | + } |
|
| 190 | 190 | |
| 191 | 191 | |
| 192 | - // explode |
|
| 193 | - $upgrade_notice = explode('</h4>', $upgrade_notice); |
|
| 194 | - $upgrade_version = trim($upgrade_notice[0]); |
|
| 195 | - $upgrade_text = trim($upgrade_notice[1]); |
|
| 196 | - $upgrade_text = str_replace('<ul>', '<ul class="ul-disc">', $upgrade_text); |
|
| 192 | + // explode |
|
| 193 | + $upgrade_notice = explode('</h4>', $upgrade_notice); |
|
| 194 | + $upgrade_version = trim($upgrade_notice[0]); |
|
| 195 | + $upgrade_text = trim($upgrade_notice[1]); |
|
| 196 | + $upgrade_text = str_replace('<ul>', '<ul class="ul-disc">', $upgrade_text); |
|
| 197 | 197 | |
| 198 | - if( version_compare($this->view['current_version'], $upgrade_version, '<') ) |
|
| 199 | - { |
|
| 200 | - $this->view['upgrade_notice'] = $upgrade_text; |
|
| 201 | - break; |
|
| 202 | - } |
|
| 198 | + if( version_compare($this->view['current_version'], $upgrade_version, '<') ) |
|
| 199 | + { |
|
| 200 | + $this->view['upgrade_notice'] = $upgrade_text; |
|
| 201 | + break; |
|
| 202 | + } |
|
| 203 | 203 | |
| 204 | - } |
|
| 205 | - } |
|
| 204 | + } |
|
| 205 | + } |
|
| 206 | 206 | |
| 207 | 207 | |
| 208 | 208 | } |