Make WordPress Core

Ticket #3695: bookmark.diff

File bookmark.diff, 7.6 KB (added by Otto42, 18 years ago)

Bookmark renaming/menu reordering patch

  • edit-link-form.php

     
    11<?php
    22if ( ! empty($link_id) ) {
    3         $heading = __('Edit Link');
     3        $heading = __('Edit Bookmark');
    44        $submit_text = __('Save Changes &raquo;');
    55        $form = '<form name="editlink" id="editlink" method="post" action="link.php">';
    66        $nonce_action = 'update-bookmark_' . $link_id;
    77} else {
    8         $heading = __('Add Link');
     8        $heading = __('Add Bookmark');
    99        $submit_text = __('Add Link &raquo;');
    1010        $form = '<form name="addlink" id="addlink" method="post" action="link.php">';
    1111        $nonce_action = 'add-bookmark';
  • link-add.php

     
    11<?php
    22require_once('admin.php');
    33
    4 $title = __('Add Link');
    5 $this_file = 'link-manager.php';
    6 $parent_file = 'link-manager.php';
     4$title = __('Add Bookmark');
     5$this_file = 'link-add.php';
     6$parent_file = 'edit.php';
     7$submenu_file = 'link-manager.php';
    78
    8 
    99wp_reset_vars(array('action', 'cat_id', 'linkurl', 'name', 'image',
    1010        'description', 'visible', 'target', 'category', 'link_id',
    1111        'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel',
  • link-import.php

     
    33// Copyright (C) 2002 Mike Little -- mike@zed1.com
    44
    55require_once('admin.php');
    6 $parent_file = 'link-manager.php';
    76$title = __('Import Blogroll');
    87$this_file = 'link-import.php';
     8$parent_file = 'edit.php';
     9$submenu_file = 'link-import.php';
    910
    1011$step = $_POST['step'];
    1112if (!$step) $step = 0;
     
    2223
    2324<div class="wrap">
    2425
    25 <h2><?php _e('Import your blogroll from another system') ?> </h2>
     26<h2><?php _e('Import your bookmarks from another system') ?> </h2>
    2627<form enctype="multipart/form-data" action="link-import.php" method="post" name="blogroll">
    2728<?php wp_nonce_field('import-bookmarks') ?>
    2829
     
    4243
    4344</div>
    4445
    45 <p style="clear: both; margin-top: 1em;"><?php _e('Now select a category you want to put these links in.') ?><br />
     46<p style="clear: both; margin-top: 1em;"><?php _e('Now select a category you want to put these bookmarks in.') ?><br />
    4647<?php _e('Category:') ?> <select name="cat_id">
    4748<?php
    4849$categories = get_categories('hide_empty=0');
  • link-manager.php

     
    1616if (empty ($order_by))
    1717        $order_by = 'order_name';
    1818
    19 $title = __('Manage Blogroll');
    20 $this_file = $parent_file = 'link-manager.php';
     19$title = __('Bookmarks');
     20$this_file = 'link-manager.php';
     21$parent_file = 'edit.php';
     22$submenu_file = 'link-manager.php';
     23
    2124include_once ("./admin-header.php");
    2225
    2326if (!current_user_can('manage_links'))
    24         wp_die(__("You do not have sufficient permissions to edit the links for this blog."));
     27        wp_die(__("You do not have sufficient permissions to edit the Bookmarks for this blog."));
    2528
    2629switch ($order_by) {
    2730        case 'order_id' :
     
    6568if ( isset($_GET['deleted']) ) {
    6669        echo '<div style="background-color: rgb(207, 235, 247);" id="message" class="updated fade"><p>';
    6770        $deleted = (int) $_GET['deleted'];
    68         printf(__ngettext('%s link deleted.', '%s links deleted', $deleted), $deleted);
     71        printf(__ngettext('%s bookmark deleted.', '%s bookmarks deleted', $deleted), $deleted);
    6972        echo '</p></div>';
    7073}
    7174?>
    7275
    7376<div class="wrap">
    7477
    75 <h2><?php _e('Blogroll Management'); ?></h2>
    76 <p><?php _e('Here you <a href="link-add.php">add links</a> to sites that you visit often and share them on your blog. When you have a list of links in your sidebar to other blogs, it&#8217;s called a &#8220;blogroll.&#8221;'); ?></p>
     78<h2><?php _e('Bookmark Management'); ?></h2>
     79<p><?php _e('Here you <a href="link-add.php">add bookmarks</a> to sites that you visit often and share them on your blog. When you have a list of bookmarks in your sidebar to other blogs, it&#8217;s called a &#8220;blogroll.&#8221;'); ?></p>
    7780<form id="cats" method="get" action="">
    7881<p><?php
    7982$categories = get_categories("hide_empty=1&type=link");
     
    8487$select_cat .= "</select>\n";
    8588
    8689$select_order = "<select name=\"order_by\">\n";
    87 $select_order .= '<option value="order_id"' . (($order_by == 'order_id') ? " selected='selected'" : '') . '>' .  __('Link ID') . "</option>\n";
     90$select_order .= '<option value="order_id"' . (($order_by == 'order_id') ? " selected='selected'" : '') . '>' .  __('Bookmark ID') . "</option>\n";
    8891$select_order .= '<option value="order_name"' . (($order_by == 'order_name') ? " selected='selected'" : '') . '>' .  __('Name') . "</option>\n";
    8992$select_order .= '<option value="order_url"' . (($order_by == 'order_url') ? " selected='selected'" : '') . '>' .  __('Address') . "</option>\n";
    9093$select_order .= '<option value="order_rating"' . (($order_by == 'order_rating') ? " selected='selected'" : '') . '>' .  __('Rating') . "</option>\n";
    9194$select_order .= "</select>\n";
    9295
    93 printf(__('Currently showing %1$s links ordered by %2$s'), $select_cat, $select_order);
     96printf(__('Currently showing %1$s Bookmarks ordered by %2$s'), $select_cat, $select_order);
    9497?>
    9598<input type="submit" name="action" value="<?php _e('Update &raquo;') ?>" /></p>
    9699</form>
     
    195198
    196199<div id="ajax-response"></div>
    197200
    198 <p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Links') ?> &raquo;" onclick="return confirm('<?php echo js_escape(__("You are about to delete these links permanently.\n'Cancel' to stop, 'OK' to delete.")); ?>')" /></p>
     201<p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Bookmarks') ?> &raquo;" onclick="return confirm('<?php echo js_escape(__("You are about to delete these Bookmarks permanently.\n'Cancel' to stop, 'OK' to delete.")); ?>')" /></p>
    199202</form>
    200203
    201204<?php } ?>
  • menu.php

     
    1616        $menu[10] = array(__('Manage'), 'edit_posts', 'edit.php');
    1717
    1818$menu[15] = array(__('Comments'), 'edit_posts', 'edit-comments.php');
    19 $menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php');
    2019$menu[25] = array(__('Presentation'), 'switch_themes', 'themes.php');
    2120$menu[30] = array(__('Plugins'), 'activate_plugins', 'plugins.php');
    2221if ( current_user_can('edit_users') )
     
    4039$submenu['edit.php'][12] = array(__('Uploads'), 'upload_files', 'upload.php');
    4140$submenu['edit.php'][15] = array(__('Categories'), 'manage_categories', 'categories.php');
    4241$submenu['edit.php'][30] = array(__('Files'), 'edit_files', 'templates.php');
     42$submenu['edit.php'][32] = array(__('Bookmarks'), 'manage_links', 'link-manager.php');
    4343$submenu['edit.php'][35] = array(__('Import'), 'import', 'import.php');
    4444$submenu['edit.php'][40] = array(__('Export'), 'import', 'export.php');
     45$submenu['edit.php'][45] = array(__('Import Bookmarks'), 'manage_links', 'link-import.php');
    4546
    46 $submenu['link-manager.php'][5] = array(__('Manage Blogroll'), 'manage_links', 'link-manager.php');
    47 $submenu['link-manager.php'][10] = array(__('Add Link'), 'manage_links', 'link-add.php');
    48 $submenu['link-manager.php'][20] = array(__('Import Links'), 'manage_links', 'link-import.php');
    4947
    5048if ( current_user_can('edit_users') ) {
    5149        $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.