| @@ -51,9 +51,9 @@ | ||
| 51 | 51 | |
| 52 | 52 | /*static*/ function submitted_link () { |
| 53 | 53 | $link_id = FeedWordPressAdminPage::submitted_link_id(); |
| 54 | 54 | if (is_numeric($link_id) and $link_id) : |
| 55 | - $link =& new SyndicatedLink($link_id); | |
| 55 | + $link = new SyndicatedLink($link_id); | |
| 56 | 56 | else : |
| 57 | 57 | $link = NULL; |
| 58 | 58 | endif; |
| 59 | 59 | return $link; |
| @@ -61,9 +61,9 @@ | ||
| 61 | 61 | |
| 62 | 62 | function stamp_link_id ($field = null) { |
| 63 | 63 | if (is_null($field)) : $field = 'save_link_id'; endif; |
| 64 | 64 | ?> |
| 65 | - <input type="hidden" name="<?php print wp_specialchars($field, 'both'); ?>" value="<?php print ($this->for_feed_settings() ? $this->link->id : '*'); ?>" /> | |
| 65 | + <input type="hidden" name="<?php print esc_html($field); ?>" value="<?php print ($this->for_feed_settings() ? $this->link->id : '*'); ?>" /> | |
| 66 | 66 | <?php |
| 67 | 67 | } /* FeedWordPressAdminPage::stamp_link_id () */ |
| 68 | 68 | |
| 69 | 69 | function these_posts_phrase () { |
| @@ -132,9 +132,9 @@ | ||
| 132 | 132 | min-width: 130px; |
| 133 | 133 | position:relative; |
| 134 | 134 | } |
| 135 | 135 | .fwpfs { |
| 136 | - color: #dddddd; | |
| 136 | + color: #dddddd !important; background-color: #333 !important; | |
| 137 | 137 | background:#797979 url(<?php bloginfo('home') ?>/wp-admin/images/fav.png) repeat-x scroll left center; |
| 138 | 138 | border-color:#777777 #777777 #666666 !important; -moz-border-radius-bottomleft:12px; |
| 139 | 139 | -moz-border-radius-bottomright:12px; |
| 140 | 140 | -moz-border-radius-topleft:12px; |
| @@ -178,9 +178,9 @@ | ||
| 178 | 178 | <p id="post-search"> |
| 179 | 179 | <select name="link_id" class="fwpfs" style="max-width: 20.0em;"> |
| 180 | 180 | <option value="*"<?php if ($this->for_default_settings()) : ?> selected="selected"<?php endif; ?>>- defaults for all feeds -</option> |
| 181 | 181 | <?php if ($links) : foreach ($links as $ddlink) : ?> |
| 182 | - <option value="<?php print (int) $ddlink->link_id; ?>"<?php if (!is_null($this->link) and ($this->link->id==$ddlink->link_id)) : ?> selected="selected"<?php endif; ?>><?php print wp_specialchars($ddlink->link_name, 1); ?></option> | |
| 182 | + <option value="<?php print (int) $ddlink->link_id; ?>"<?php if (!is_null($this->link) and ($this->link->id==$ddlink->link_id)) : ?> selected="selected"<?php endif; ?>><?php print esc_html($ddlink->link_name); ?></option> | |
| 183 | 183 | <?php endforeach; endif; ?> |
| 184 | 184 | </select> |
| 185 | 185 | <input class="button" type="submit" name="go" value="<?php _e('Go') ?> »" /> |
| 186 | 186 | </p> |
| @@ -189,14 +189,14 @@ | ||
| 189 | 189 | |
| 190 | 190 | function display_sheet_header ($pagename = 'Syndication', $all = false) { |
| 191 | 191 | if (FeedWordPressCompatibility::test_version(FWP_SCHEMA_27)) : |
| 192 | 192 | ?> |
| 193 | - <div class="icon32"><img src="<?php print wp_specialchars(WP_PLUGIN_URL.'/'.$GLOBALS['fwp_path'].'/feedwordpress.png', 1); ?>" alt="" /></div> | |
| 193 | + <div class="icon32"><img src="<?php print esc_html(WP_PLUGIN_URL.'/'.$GLOBALS['fwp_path'].'/feedwordpress.png'); ?>" alt="" /></div> | |
| 194 | 194 | <?php |
| 195 | 195 | endif; |
| 196 | 196 | ?> |
| 197 | 197 | |
| 198 | - <h2><?php print wp_specialchars(__($pagename.($all ? '' : ' Settings')), 1); ?><?php if ($this->for_feed_settings()) : ?>: <?php echo wp_specialchars($this->link->link->link_name, 1); ?><?php endif; ?></h2> | |
| 198 | + <h2><?php print esc_html(__($pagename.($all ? '' : ' Settings'))); ?><?php if ($this->for_feed_settings()) : ?>: <?php echo esc_html($this->link->link->link_name); ?><?php endif; ?></h2> | |
| 199 | 199 | <?php |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | 202 | function display_update_notice_if_updated ($pagename = 'Syndication', $mesg = NULL) { |
| @@ -210,9 +210,9 @@ | ||
| 210 | 210 | |
| 211 | 211 | if (!is_null($mesg)) : |
| 212 | 212 | ?> |
| 213 | 213 | <div class="updated"> |
| 214 | - <p><?php print wp_specialchars($mesg, 1); ?></p> | |
| 214 | + <p><?php print esc_html($mesg); ?></p> | |
| 215 | 215 | </div> |
| 216 | 216 | <?php |
| 217 | 217 | endif; |
| 218 | 218 | } /* FeedWordPressAdminPage::display_update_notice_if_updated() */ |
| @@ -220,9 +220,9 @@ | ||
| 220 | 220 | function display_settings_scope_message () { |
| 221 | 221 | if ($this->for_feed_settings()) : |
| 222 | 222 | ?> |
| 223 | 223 | <p>These settings only affect posts syndicated from |
| 224 | - <strong><?php echo wp_specialchars($this->link->link->link_name, 1); ?></strong>.</p> | |
| 224 | + <strong><?php echo esc_html($this->link->link->link_name); ?></strong>.</p> | |
| 225 | 225 | <?php |
| 226 | 226 | else : |
| 227 | 227 | ?> |
| 228 | 228 | <p>These settings affect posts syndicated from any feed unless they are overridden |
| @@ -388,12 +388,35 @@ | ||
| 388 | 388 | if (!is_array($tags)) : $tags = array(); endif; |
| 389 | 389 | |
| 390 | 390 | $desc = "<p style=\"font-size:smaller;font-style:bold;margin:0\">Tag $object as...</p>"; |
| 391 | 391 | |
| 392 | - if (fwp_test_wp_version(FWP_SCHEMA_28)) : // WordPress 2.8+ | |
| 392 | + if (fwp_test_wp_version(FWP_SCHEMA_29)) : // WordPress 2.9+ | |
| 393 | + print $desc; | |
| 394 | + $tax_name = 'post_tag'; | |
| 395 | + $helps = __('Separate tags with commas.'); | |
| 396 | + $box['title'] = __('Tags'); | |
| 397 | + ?> | |
| 398 | + <div class="tagsdiv" id="<?php echo $tax_name; ?>"> | |
| 399 | + <div class="jaxtag"> | |
| 400 | + <div class="nojs-tags hide-if-js"> | |
| 401 | + <p><?php _e('Add or remove tags'); ?></p> | |
| 402 | + <textarea name="<?php echo "tax_input[$tax_name]"; ?>" class="the-tags" id="tax-input[<?php echo $tax_name; ?>]"><?php echo esc_attr(implode(",", $tags)); ?></textarea></div> | |
| 403 | + | |
| 404 | + <div class="ajaxtag hide-if-no-js"> | |
| 405 | + <label class="screen-reader-text" for="new-tag-<?php echo $tax_name; ?>"><?php echo $box['title']; ?></label> | |
| 406 | + <div class="taghint"><?php _e('Add new tag'); ?></div> | |
| 407 | + <input type="text" id="new-tag-<?php echo $tax_name; ?>" name="newtag[<?php echo $tax_name; ?>]" class="newtag form-input-tip" size="16" autocomplete="off" value="" /> | |
| 408 | + <input type="button" class="button tagadd" value="<?php esc_attr_e('Add'); ?>" tabindex="3" /> | |
| 409 | + </div></div> | |
| 410 | + <p class="howto"><?php echo $helps; ?></p> | |
| 411 | + <div class="tagchecklist"></div> | |
| 412 | + </div> | |
| 413 | + <p class="hide-if-no-js"><a href="#titlediv" class="tagcloud-link" id="link-<?php echo $tax_name; ?>"><?php printf( __('Choose from the most used tags in %s'), $box['title'] ); ?></a></p> | |
| 414 | +<?php | |
| 415 | + elseif (fwp_test_wp_version(FWP_SCHEMA_28)) : // WordPress 2.8+ | |
| 393 | 416 | ?> |
| 394 | - <?php print $desc; ?> | |
| 395 | - <div class="tagsdiv" id="post_tag"> | |
| 417 | + <?php print $desc; ?> | |
| 418 | + <div class="tagsdiv" id="post_tag"> | |
| 396 | 419 | <div class="jaxtag"> |
| 397 | 420 | <div class="nojs-tags hide-if-js"> |
| 398 | 421 | <p><?php _e('Add or remove tags'); ?></p> |
| 399 | 422 | <textarea name="tax_input[post_tag]" class="the-tags" id="tax-input[post_tag]"><?php echo implode(",", $tags); ?></textarea> |
| @@ -484,9 +507,17 @@ | ||
| 484 | 507 | .$feed['link/uri']."\">".$feed['link/uri']."</a>> ..."; |
| 485 | 508 | flush(); |
| 486 | 509 | } |
| 487 | 510 | function update_feeds_finish ($feed, $added, $dt) { |
| 488 | - echo " completed in $dt second".(($dt==1)?'':'s')."</li>\n"; | |
| 511 | + if (is_wp_error($added)) : | |
| 512 | + $mesgs = $added->get_error_messages(); | |
| 513 | + foreach ($mesgs as $mesg) : | |
| 514 | + echo "<br/><strong>Feed error:</strong> <code>$mesg</code>"; | |
| 515 | + endforeach; | |
| 516 | + echo "</li>\n"; | |
| 517 | + else : | |
| 518 | + echo " completed in $dt second".(($dt==1)?'':'s')."</li>\n"; | |
| 519 | + endif; | |
| 489 | 520 | } |
| 490 | 521 | |
| 491 | 522 | function fwp_author_list () { |
| 492 | 523 | global $wpdb; |
| @@ -580,8 +611,13 @@ | ||
| 580 | 611 | /*static*/ function fix_toggles_js ($context) { |
| 581 | 612 | ?> |
| 582 | 613 | <script type="text/javascript"> |
| 583 | 614 | jQuery(document).ready( function($) { |
| 615 | + <?php if (FeedWordPressCompatibility::test_version(FWP_SCHEMA_29)) : ?> | |
| 616 | + if ( $('#post_tag').length ) { | |
| 617 | + tagBox.init(); | |
| 618 | + } | |
| 619 | + <?php endif; ?> | |
| 584 | 620 | <?php if (FeedWordPressCompatibility::test_version(FWP_SCHEMA_25, FWP_SCHEMA_27)) : ?> |
| 585 | 621 | // In case someone got here first... |
| 586 | 622 | jQuery('.postbox h3').unbind('click'); |
| 587 | 623 | |