Changeset 2886957
- Timestamp:
- 03/26/2023 12:00:13 AM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sheet-music-library/trunk/admin/post-meta.php
r2270479 r2886957 48 48 $score_attachment_id = absint( $sml_stored_meta['score-attachment-id'][0] ); 49 49 $score = get_post( $score_attachment_id ); 50 $score_attachment_title = $score->post_title; 50 if ( $score === null ) { 51 $score_attachment_title = ''; 52 } else { 53 $score_attachment_title = $score->post_title; 54 } 51 55 $score_attachment_link = wp_get_attachment_url( $score_attachment_id ); 52 56 $score_attachment_image = esc_url( get_post_meta( $score_attachment_id, 'pdf_thumbnail_url', true ) ); … … 61 65 $parts_attachment_id = absint( $sml_stored_meta['parts-attachment-id'][0] ); 62 66 $parts = get_post( $parts_attachment_id ); 63 $parts_attachment_title = $parts->post_title; 67 if ( $parts === null ) { 68 $parts_attachment_title = ''; 69 } else { 70 $parts_attachment_title = $parts->post_title; 71 } 64 72 $parts_attachment_link = wp_get_attachment_url( $parts_attachment_id ); 65 73 } else { … … 72 80 $audio_attachment_id = absint( $sml_stored_meta['audio-attachment-id'][0] ); 73 81 $audio = get_post( $audio_attachment_id ); 74 $audio_attachment_title = $audio->post_title; 82 if ( $audio === null ) { 83 $audio_attachment_title = ''; 84 } else { 85 $audio_attachment_title = $audio->post_title; 86 } 75 87 $audio_attachment = wp_prepare_attachment_for_js( $audio_attachment_id ); 76 88 } else {
Note: See TracChangeset
for help on using the changeset viewer.