Make WordPress Core

Ticket #2097: valid.diff

File valid.diff, 4.2 KB (added by skeltoac, 20 years ago)
  • wp-includes/template-functions-post.php

     
    534534                }
    535535        }
    536536
    537         $icon = "<img src=\"{$src}\" title=\"{$post->post_title}\" {$constraint}/>";
     537        $icon = "<img src=\"{$src}\" title=\"{$post->post_title}\" alt=\"{$post->post_title}\" {$constraint}/>";
    538538
    539539        return apply_filters('attachment_icon', $icon, $post->ID);
    540540}
  • wp-admin/inline-uploading.php

     
    232232                        $xpadding = (128 - $image['uwidth']) / 2;
    233233                        $ypadding = (96 - $image['uheight']) / 2;
    234234                        $style .= "#target{$ID} img { padding: {$ypadding}px {$xpadding}px; }\n";
    235                         $script .= "aa[{$ID}] = '<a id=\"{$ID}\" rel=\"attachment\" class=\"imagelink\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$image['post_title']}\">';
     235                        $script .= "aa[{$ID}] = '<a id=\"p{$ID}\" rel=\"attachment\" class=\"imagelink\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$image['post_title']}\">';
    236236ab[{$ID}] = '<a class=\"imagelink\" href=\"{$image['guid']}\" onclick=\"doPopup({$ID});return false;\" title=\"{$image['post_title']}\">';
    237237imga[{$ID}] = '<img id=\"image{$ID}\" src=\"$src\" alt=\"{$image['post_title']}\" $height_width />';
    238238imgb[{$ID}] = '<img id=\"image{$ID}\" src=\"{$image['guid']}\" alt=\"{$image['post_title']}\" $height_width />';
     
    255255                        $filename = basename($attachment['guid']);
    256256                        $icon = get_attachment_icon($ID);
    257257                        $toggle_icon = "<a id=\"I{$ID}\" onclick=\"toggleOtherIcon({$ID});return false;\" href=\"javascript:void()\">$__using_title</a>";
    258                         $script .= "aa[{$ID}] = '<a id=\"{$ID}\" rel=\"attachment\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">{$attachment['post_title']}</a>';
    259 ab[{$ID}] = '<a id=\"{$ID}\" href=\"{$filename}\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">{$attachment['post_title']}</a>';
     258                        $script .= "aa[{$ID}] = '<a id=\"p{$ID}\" rel=\"attachment\" href=\"$href\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">{$attachment['post_title']}</a>';
     259ab[{$ID}] = '<a id=\"p{$ID}\" href=\"{$filename}\" onclick=\"doPopup({$ID});return false;\" title=\"{$title}\">{$attachment['post_title']}</a>';
    260260title[{$ID}] = '{$attachment['post_title']}';
    261261filename[{$ID}] = '{$filename}';
    262262icon[{$ID}] = '{$icon}';
    263263";
    264264                        $html .= "<div id='target{$ID}' class='attwrap left'>
    265265        <div id='div{$ID}' class='otherwrap usingtext' onmousedown=\"selectLink({$ID})\" onclick=\"doPopup({$ID});return false;\">
    266                 <a id=\"{$ID}\" href=\"{$attachment['guid']}\" onmousedown=\"selectLink({$ID});\" onclick=\"return false;\">{$attachment['post_title']}</a>
     266                <a id=\"p{$ID}\" href=\"{$attachment['guid']}\" onmousedown=\"selectLink({$ID});\" onclick=\"return false;\">{$attachment['post_title']}</a>
    267267        </div>
    268268        {$noscript}
    269269</div>
     
    346346function toggleOtherLink(n) {
    347347        od=document.getElementById('div'+n);
    348348        ol=document.getElementById('L'+n);
    349         oi=document.getElementById(n);
     349        oi=document.getElementById('p'+n);
    350350        ih=oi.innerHTML;
    351351        if ( ol.innerHTML == linkedtofile ) {
    352352                od.innerHTML = aa[n];
     
    355355                od.innerHTML = ab[n];
    356356                ol.innerHTML = linkedtofile;
    357357        }
    358         oi=document.getElementById(n);
     358        oi=document.getElementById('p'+n);
    359359        oi.innerHTML = ih;
    360360}
    361361function toggleImage(n) {
     
    371371}
    372372function toggleOtherIcon(n) {
    373373        od = document.getElementById('div'+n);
    374         o = document.getElementById(n);
     374        o = document.getElementById('p'+n);
    375375        oi = document.getElementById('I'+n);
    376376        if ( oi.innerHTML == usingtitle ) {
    377377                o.innerHTML = filename[n];
  • wp-admin/admin-functions.php

     
    9393                return;
    9494
    9595        $i = 0;
    96         $search = "# id=(\"|)(\d+)\\1#i";
     96        $search = "# id=(\"|')p(\d+)\\1#i";
    9797        foreach ( $anchor_matches[0] as $anchor ) {
    9898                if ( 0 == preg_match($search, $anchor, $id_matches) )
    9999                        continue;