Changeset 1762988
- Timestamp:
- 11/10/2017 01:45:39 PM (8 years ago)
- File:
-
- 1 edited
-
multiple-cropped-images/trunk/dist/MCI_Usage.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
multiple-cropped-images/trunk/dist/MCI_Usage.php
r1753927 r1762988 43 43 if($key !== false) 44 44 { 45 return $mci_entries[ $key];45 return $mci_entries[$key]; 46 46 } 47 47 } … … 62 62 } 63 63 64 $post_id = get_the_ID();65 66 64 $atts = shortcode_atts([ 67 65 'id' => 0, 68 'post-id' => $post_id,66 'post-id' => get_the_ID(), 69 67 'size' => 'cropped' 70 68 ], $atts); … … 72 70 if($atts['id'] > 0) 73 71 { 74 $mci_entry = MCI_Core::getMCIEntry($ post_id, $atts['id']);72 $mci_entry = MCI_Core::getMCIEntry($atts['post-id'], $atts['id']); 75 73 76 74 if(empty($mci_entry)) … … 79 77 } 80 78 81 82 $src = isset($mci_entry[ $atts['size'] ]) ? $mci_entry[ $atts['size'] ] : $mci_entry['cropped']; 79 $src = isset($mci_entry[$atts['size']]) ? $mci_entry[$atts['size']] : $mci_entry['cropped']; 83 80 $seo_alt = !empty($mci_entry['seo_alt']) ? ' alt="' . $mci_entry['seo_alt'] . '"' : ''; 84 81 $seo_title = !empty($mci_entry['seo_title']) ? ' title="' . $mci_entry['seo_title'] . '"' : '';
Note: See TracChangeset
for help on using the changeset viewer.