@@ -130,7 +130,9 @@ |
||
| 130 | 130 | function admin_enqueue_scripts() { |
| 131 | 131 | |
| 132 | 132 | // validate page |
| 133 | - if( !$this->validate_page() ) return; |
|
| 133 | + if( !$this->validate_page() ) { |
|
| 134 | + return; |
|
| 135 | + } |
|
| 134 | 136 | |
| 135 | 137 | |
| 136 | 138 | // load acf scripts |
@@ -324,13 +324,16 @@ |
||
| 324 | 324 | width: 100%; |
| 325 | 325 | } |
| 326 | 326 | |
| 327 | -<?php else: ?> |
|
| 327 | +<?php else { |
|
| 328 | + : ?> |
|
| 328 | 329 | |
| 329 | 330 | #registerform p.submit { |
| 330 | 331 | text-align: right; |
| 331 | 332 | } |
| 332 | 333 | |
| 333 | -<?php endif; ?> |
|
| 334 | +<?php endif; |
|
| 335 | +} |
|
| 336 | +?> |
|
| 334 | 337 | |
| 335 | 338 | </style> |
| 336 | 339 | <script type="text/javascript"> |
@@ -94,13 +94,19 @@ |
||
| 94 | 94 | |
| 95 | 95 | <?php if( $active ): ?> |
| 96 | 96 | <a class="acf-button blue" href="<?php echo admin_url('plugins.php?s=Advanced+Custom+Fields+Pro'); ?>"><?php _e('Update Plugin', 'acf'); ?></a> |
| 97 | - <?php else: ?> |
|
| 98 | - <a class="acf-button" disabled="disabled" href="#"><?php _e('Please enter your license key above to unlock updates', 'acf'); ?></a> |
|
| 97 | + <?php else { |
|
| 98 | + : ?> |
|
| 99 | + <a class="acf-button" disabled="disabled" href="#"><?php _e('Please enter your license key above to unlock updates', 'acf'); |
|
| 100 | +} |
|
| 101 | +?></a> |
|
| 99 | 102 | <?php endif; ?> |
| 100 | 103 | |
| 101 | - <?php else: ?> |
|
| 104 | + <?php else { |
|
| 105 | + : ?> |
|
| 102 | 106 | |
| 103 | - <span style="margin-right: 5px;"><?php _e('No', 'acf'); ?></span> |
|
| 107 | + <span style="margin-right: 5px;"><?php _e('No', 'acf'); |
|
| 108 | +} |
|
| 109 | +?></span> |
|
| 104 | 110 | <a class="acf-button" href="<?php echo add_query_arg('force-check', 1); ?>"><?php _e('Check Again', 'acf'); ?></a> |
| 105 | 111 | <?php endif; ?> |
| 106 | 112 | </td> |
@@ -1,6 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
|
| 3 | +if( ! defined( 'ABSPATH' ) ) { |
|
| 4 | + exit; |
|
| 5 | +} |
|
| 6 | +// Exit if accessed directly |
|
| 4 | 7 | |
| 5 | 8 | if( ! class_exists('acf_pro_updates') ) : |
| 6 | 9 | |
@@ -403,8 +403,11 @@ discard block |
||
| 403 | 403 | </thead> |
| 404 | 404 | |
| 405 | 405 | <tbody> |
| 406 | - <?php else: ?> |
|
| 407 | - <div class="acf-fields <?php if($layout['display'] == 'row'): ?>-left<?php endif; ?>"> |
|
| 406 | + <?php else { |
|
| 407 | + : ?> |
|
| 408 | + <div class="acf-fields <?php if($layout['display'] == 'row'): ?>-left<?php endif; |
|
| 409 | +} |
|
| 410 | +?>"> |
|
| 408 | 411 | <?php endif; ?> |
| 409 | 412 | |
| 410 | 413 | <?php |
@@ -448,9 +451,12 @@ discard block |
||
| 448 | 451 | <?php if( $layout['display'] == 'table' ): ?> |
| 449 | 452 | </tbody> |
| 450 | 453 | </table> |
| 451 | - <?php else: ?> |
|
| 454 | + <?php else { |
|
| 455 | + : ?> |
|
| 452 | 456 | </div> |
| 453 | - <?php endif; ?> |
|
| 457 | + <?php endif; |
|
| 458 | +} |
|
| 459 | +?> |
|
| 454 | 460 | |
| 455 | 461 | <?php endif; ?> |
| 456 | 462 | |
@@ -163,22 +163,27 @@ |
||
| 163 | 163 | // loop over attachments |
| 164 | 164 | foreach( $_POST['attachments'] as $id => $changes ) { |
| 165 | 165 | |
| 166 | - if ( !current_user_can( 'edit_post', $id ) ) |
|
| 167 | - wp_send_json_error(); |
|
| 166 | + if ( !current_user_can( 'edit_post', $id ) ) { |
|
| 167 | + wp_send_json_error(); |
|
| 168 | + } |
|
| 168 | 169 | |
| 169 | 170 | $post = get_post( $id, ARRAY_A ); |
| 170 | 171 | |
| 171 | - if ( 'attachment' != $post['post_type'] ) |
|
| 172 | - wp_send_json_error(); |
|
| 172 | + if ( 'attachment' != $post['post_type'] ) { |
|
| 173 | + wp_send_json_error(); |
|
| 174 | + } |
|
| 173 | 175 | |
| 174 | - if ( isset( $changes['title'] ) ) |
|
| 175 | - $post['post_title'] = $changes['title']; |
|
| 176 | + if ( isset( $changes['title'] ) ) { |
|
| 177 | + $post['post_title'] = $changes['title']; |
|
| 178 | + } |
|
| 176 | 179 | |
| 177 | - if ( isset( $changes['caption'] ) ) |
|
| 178 | - $post['post_excerpt'] = $changes['caption']; |
|
| 180 | + if ( isset( $changes['caption'] ) ) { |
|
| 181 | + $post['post_excerpt'] = $changes['caption']; |
|
| 182 | + } |
|
| 179 | 183 | |
| 180 | - if ( isset( $changes['description'] ) ) |
|
| 181 | - $post['post_content'] = $changes['description']; |
|
| 184 | + if ( isset( $changes['description'] ) ) { |
|
| 185 | + $post['post_content'] = $changes['description']; |
|
| 186 | + } |
|
| 182 | 187 | |
| 183 | 188 | if ( isset( $changes['alt'] ) ) { |
| 184 | 189 | $alt = wp_unslash( $changes['alt'] ); |
@@ -71,8 +71,10 @@ |
||
| 71 | 71 | |
| 72 | 72 | |
| 73 | 73 | endwhile; |
| 74 | - else : |
|
| 75 | - echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>'; |
|
| 74 | + else { |
|
| 75 | + : |
|
| 76 | + echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>'; |
|
| 77 | + } |
|
| 76 | 78 | endif; |
| 77 | 79 | echo '</div></div>'; |
| 78 | 80 | |
@@ -26,7 +26,9 @@ discard block |
||
| 26 | 26 | $showitems = ($range * 2)+1; |
| 27 | 27 | |
| 28 | 28 | global $paged; |
| 29 | - if(empty($paged)) $paged = 1; |
|
| 29 | + if(empty($paged)) { |
|
| 30 | + $paged = 1; |
|
| 31 | + } |
|
| 30 | 32 | |
| 31 | 33 | if($pages == '') |
| 32 | 34 | {
|
@@ -41,8 +43,12 @@ discard block |
||
| 41 | 43 | if(1 != $pages) |
| 42 | 44 | {
|
| 43 | 45 | echo "<div class=\"pagination\"><span>Page ".$paged." of ".$pages."</span>"; |
| 44 | - if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>« First</a>"; |
|
| 45 | - if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>"; |
|
| 46 | + if($paged > 2 && $paged > $range+1 && $showitems < $pages) { |
|
| 47 | + echo "<a href='".get_pagenum_link(1)."'>« First</a>"; |
|
| 48 | + } |
|
| 49 | + if($paged > 1 && $showitems < $pages) { |
|
| 50 | + echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>"; |
|
| 51 | + } |
|
| 46 | 52 | |
| 47 | 53 | for ($i=1; $i <= $pages; $i++) |
| 48 | 54 | {
|
@@ -52,8 +58,12 @@ discard block |
||
| 52 | 58 | } |
| 53 | 59 | } |
| 54 | 60 | |
| 55 | - if ($paged < $pages && $showitems < $pages) echo "<a href=\"".get_pagenum_link($paged + 1)."\">Next ›</a>"; |
|
| 56 | - if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last »</a>"; |
|
| 61 | + if ($paged < $pages && $showitems < $pages) { |
|
| 62 | + echo "<a href=\"".get_pagenum_link($paged + 1)."\">Next ›</a>"; |
|
| 63 | + } |
|
| 64 | + if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) { |
|
| 65 | + echo "<a href='".get_pagenum_link($pages)."'>Last »</a>"; |
|
| 66 | + } |
|
| 57 | 67 | echo "</div>\n"; |
| 58 | 68 | } |
| 59 | 69 | } |