← All changes
|
shortcodes/shortcode-wdk-listing-fields-section.php
+3
-14
trunk
→
1.5.9
View file →
| @@ -68,23 +68,12 @@ | ||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | |
| 71 | 71 | $post_data = get_post($post_id); |
| 72 | - if ( | |
| 73 | - !$post_data || | |
| 74 | - $post_data->post_type !== 'wdk-listing' || | |
| 75 | - $post_data->post_status !== 'publish' || | |
| 76 | - post_password_required($post_data) | |
| 77 | - ) { | |
| 78 | - return ''; | |
| 72 | + if (!$post_data || $post_data->post_status != 'publish' || post_password_required($post_data)) { | |
| 73 | + return false; | |
| 79 | 74 | } |
| 80 | - | |
| 81 | - if ( | |
| 82 | - !wdk_field_value('is_activated', $post_id, false) || !wdk_field_value('is_approved', $post_id,false) | |
| 83 | - ) { | |
| 84 | - return __( 'Listing is not public', 'wpdirectorykit' ); | |
| 85 | - } | |
| 86 | - | |
| 75 | + | |
| 87 | 76 | if(!empty($data['settings']['field_id'])) |
| 88 | 77 | $data['field_label'] = wdk_field_label($data['settings']['field_id']); |
| 89 | 78 | |
| 90 | 79 | if(empty($data['section_data'])){ |