| 1 | Index: Sewar/WordPress/Plugins/widgets/widgets.php
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | +++ Sewar/WordPress/Plugins/widgets/widgets.php (working copy)
|
|---|
| 4 | @@ -1,7 +1,7 @@
|
|---|
| 5 | <?php
|
|---|
| 6 | /*
|
|---|
| 7 | Plugin Name: Sidebar Widgets
|
|---|
| 8 | -Plugin URI: http://svn.wp-plugins.org/widgets/trunk
|
|---|
| 9 | +Plugin URI: http://automattic.com/code/widgets/
|
|---|
| 10 | Description: Adds "Sidebar Widgets" panel under Presentation menu
|
|---|
| 11 | Author: Automattic, Inc.
|
|---|
| 12 | Author URI: http://automattic.com/
|
|---|
| 13 | @@ -460,13 +460,13 @@
|
|---|
| 14 | function dragChange(o) {
|
|---|
| 15 | el = o.element ? o.element : $(o);
|
|---|
| 16 | var p = Position.page(el);
|
|---|
| 17 | - var right = p[0];
|
|---|
| 18 | + var left = p[0];
|
|---|
| 19 | var top = p[1];
|
|---|
| 20 | - var left = $('shadow').offsetWidth - (el.offsetWidth + left);
|
|---|
| 21 | + var right = $('shadow').offsetWidth - (el.offsetWidth + left);
|
|---|
| 22 | var bottom = $('shadow').offsetHeight - (el.offsetHeight + top);
|
|---|
| 23 | - if ( right < 1 ) el.style.left = 0;
|
|---|
| 24 | + if ( left < 1 ) el.style.left = 0;
|
|---|
| 25 | if ( top < 1 ) el.style.top = 0;
|
|---|
| 26 | - if ( left < 1 ) el.style.left = (left + right) + 'px';
|
|---|
| 27 | + if ( right < 1 ) el.style.left = (left + right) + 'px';
|
|---|
| 28 | if ( bottom < 1 ) el.style.top = (top + bottom) + 'px';
|
|---|
| 29 | }
|
|---|
| 30 | function popControl(elm) {
|
|---|
| 31 | @@ -476,7 +476,7 @@
|
|---|
| 32 | var x = ( document.body.clientWidth - controldims[elm]['width'] ) / 2;
|
|---|
| 33 | var y = ( document.body.parentNode.clientHeight - controldims[elm]['height'] ) / 2;
|
|---|
| 34 | el.style.position = 'absolute';
|
|---|
| 35 | - el.style.right = '' + x + 'px';
|
|---|
| 36 | + el.style.left = '' + x + 'px';
|
|---|
| 37 | el.style.top = '' + y + 'px';
|
|---|
| 38 | el.style.zIndex = 1000;
|
|---|
| 39 | el.className='control';
|
|---|
| 40 | @@ -540,8 +540,8 @@
|
|---|
| 41 | if ( count($registered_sidebars) < 1 ) {
|
|---|
| 42 | ?>
|
|---|
| 43 | <div class="wrap">
|
|---|
| 44 | - <h2><?php _e('About Dynamic Sidebars'); ?></h2>
|
|---|
| 45 | - <p><?php _e("You can modify your theme's sidebar, rearranging and configuring widgets right in this screen! Well, you could if you had a compatible theme. You're seeing this message because your theme isn't ready for widgets. <a href='http://andy.wordpress.com/widgets/get-ready'>Get it ready!</a>"); ?></p>
|
|---|
| 46 | + <h2><?php _e('About Dynamic Sidebars', 'widgets'); ?></h2>
|
|---|
| 47 | + <p><?php _e("You can modify your theme's sidebar, rearranging and configuring widgets right in this screen! Well, you could if you had a compatible theme. You're seeing this message because your theme isn't ready for widgets. <a href='http://andy.wordpress.com/widgets/get-ready'>Get it ready!</a>", 'widgets'); ?></p>
|
|---|
| 48 | </div>
|
|---|
| 49 | <?php
|
|---|
| 50 | return;
|
|---|
| 51 | @@ -600,26 +600,26 @@
|
|---|
| 52 | ?>
|
|---|
| 53 | <?php if ( $_POST['action'] ) { ?>
|
|---|
| 54 | <div class="fade updated" id="message">
|
|---|
| 55 | - <p><?php printf(__('Sidebar Updated. <a href="%s">View site »</a>'), get_settings('home') . '/'); ?></p>
|
|---|
| 56 | + <p><?php printf(__('Sidebar Updated. <a href="%s">View site »</a>', 'widgets'), get_settings('home') . '/'); ?></p>
|
|---|
| 57 | </div>
|
|---|
| 58 | <?php } ?>
|
|---|
| 59 | <div class="wrap">
|
|---|
| 60 | - <h2><?php _e('Sidebar Arrangement'); ?></h2>
|
|---|
| 61 | - <p><?php _e("You can drag and drop widgets into your sidebar below."); ?></p>
|
|---|
| 62 | + <h2><?php _e('Sidebar Arrangement', 'widgets'); ?></h2>
|
|---|
| 63 | + <p><?php _e("You can drag and drop widgets into your sidebar below.", 'widgets'); ?></p>
|
|---|
| 64 | <form id="sbadmin" method="POST" onsubmit="serializeAll()">
|
|---|
| 65 | <div id="zones">
|
|---|
| 66 | <?php $i = 1; foreach ( $registered_sidebars as $index => $sidebar ) : ?>
|
|---|
| 67 | <input type="hidden" id="<?php echo $index; ?>order" name="<?php echo $index; ?>order" value="" />
|
|---|
| 68 | <div class="dropzone">
|
|---|
| 69 | <h3><?php echo $sidebar['name']; ?></h3>
|
|---|
| 70 | - <div id="<?php echo $index; ?>placematt" class="module placematt"><span class="handle"><h4><?php _e('Default Sidebar'); ?></h4><?php _e('Your theme will display its usual sidebar when this box is empty. Dragging widgets into this box will replace the usual sidebar with your customized sidebar.'); ?></span></div>
|
|---|
| 71 | + <div id="<?php echo $index; ?>placematt" class="module placematt"><span class="handle"><h4><?php _e('Default Sidebar', 'widgets'); ?></h4><?php _e('Your theme will display its usual sidebar when this box is empty. Dragging widgets into this box will replace the usual sidebar with your customized sidebar.', 'widgets'); ?></span></div>
|
|---|
| 72 | <ul id="<?php echo $index; ?>"><?php if ( is_array($sidebars_widgets[$index]) ) foreach ( $sidebars_widgets[$index] as $name ) widget_draggable($name); ?></ul>
|
|---|
| 73 | </div>
|
|---|
| 74 | <?php endforeach; ?>
|
|---|
| 75 | <br class="clear" />
|
|---|
| 76 | </div>
|
|---|
| 77 | <div id="palettediv">
|
|---|
| 78 | - <h3><?php _e('Available Widgets'); ?></h3>
|
|---|
| 79 | + <h3><?php _e('Available Widgets', 'widgets'); ?></h3>
|
|---|
| 80 | <ul id="palette"><?php foreach ( $inactive_widgets as $name ) widget_draggable($name); ?><li id="lastmodule"><span></span></li></ul>
|
|---|
| 81 | </div>
|
|---|
| 82 |
|
|---|
| 83 | @@ -634,7 +634,7 @@
|
|---|
| 84 | <p class="submit">
|
|---|
| 85 | <?php wp_nonce_field('widgets-save-widget-order'); ?>
|
|---|
| 86 | <input type="hidden" name="action" id="action" value="save_widget_order" />
|
|---|
| 87 | - <input type="submit" value="<?php _e('Save Changes »', 'widgets'); ?>" />
|
|---|
| 88 | + <input type="submit" value="<?php _e('Save Changes »'); ?>" />
|
|---|
| 89 | </p>
|
|---|
| 90 | <div id="controls">
|
|---|
| 91 | <?php foreach ( $registered_widget_controls as $name => $widget ) : ?>
|
|---|
| 92 | @@ -746,7 +746,7 @@
|
|---|
| 93 | $title = htmlspecialchars($options['title'], ENT_QUOTES);
|
|---|
| 94 | ?>
|
|---|
| 95 | <p><label for="archives-title"><?php _e('Title:'); ?> <input style="width: 250px;" id="archives-title" name="archives-title" type="text" value="<?php echo $title; ?>" /></label></p>
|
|---|
| 96 | - <p style="text-align:right;margin-right:40px;"><label for="archives-count">Show post counts <input class="checkbox" type="checkbox" <?php echo $count; ?> id="archives-count" name="archives-count" /></label></p>
|
|---|
| 97 | + <p style="text-align:right;margin-right:40px;"><label for="archives-count"><?php _e('Show post counts', 'widgets'); ?> <input class="checkbox" type="checkbox" <?php echo $count; ?> id="archives-count" name="archives-count" /></label></p>
|
|---|
| 98 | <input type="hidden" id="archives-submit" name="archives-submit" value="1" />
|
|---|
| 99 | <?php
|
|---|
| 100 | }
|
|---|
| 101 | @@ -754,7 +754,7 @@
|
|---|
| 102 | function widget_meta($args) {
|
|---|
| 103 | extract($args);
|
|---|
| 104 | $options = get_option('widget_meta');
|
|---|
| 105 | - $title = empty($options['title']) ? __('Meta') : $options['title'];
|
|---|
| 106 | + $title = empty($options['title']) ? __('Meta', 'widgets') : $options['title'];
|
|---|
| 107 | ?>
|
|---|
| 108 | <?php echo $before_widget; ?>
|
|---|
| 109 | <?php echo $before_title . $title . $after_title; ?>
|
|---|
| 110 | @@ -1046,7 +1046,7 @@
|
|---|
| 111 | $link = wp_specialchars(strip_tags($item['link']), 1);
|
|---|
| 112 | $title = wp_specialchars(strip_tags($item['title']), 1);
|
|---|
| 113 | if ( empty($title) )
|
|---|
| 114 | - $title = __('Untitled');
|
|---|
| 115 | + $title = __('Untitled', 'widgets');
|
|---|
| 116 | if ( $show_summary ) {
|
|---|
| 117 | $desc = '';
|
|---|
| 118 | $summary = '<div class="rssSummary">' . $item['description'] . '</div>';
|
|---|