Make WordPress Core

Ticket #20706: 20706.patch

File 20706.patch, 1.1 KB (added by SergeyBiryukov, 12 years ago)
  • wp-admin/edit-link-form.php

     
    6262<h2><?php echo esc_html( $title ); ?>  <a href="link-add.php" class="add-new-h2"><?php echo esc_html_x('Add New', 'link'); ?></a></h2>
    6363
    6464<?php if ( isset( $_GET['added'] ) ) : ?>
    65 <div id="message" class="updated"><p><?php _e('Link added.'); ?></p></div>
     65<div id="message" class="updated"><p><?php _e( 'Link added.' ); ?></p></div>
     66<?php elseif ( isset( $_GET['error'] ) ) : ?>
     67<div id="message" class="error"><p><?php _e( 'Could not add link. Make sure you specify a link name and address.' ); ?></p></div>
    6668<?php endif; ?>
    6769
    6870<?php
  • wp-admin/link.php

     
    7070                $redir = wp_get_referer();
    7171                if ( add_link() )
    7272                        $redir = add_query_arg( 'added', 'true', $redir );
     73                else
     74                        $redir = add_query_arg( 'error', 'true', $redir );
    7375
    7476                wp_redirect( $redir );
    7577                exit;