PluginProbe
FeedWordPress / 2008.1101
FeedWordPress v2008.1101
trunk 0.8 0.9 0.91 0.95 0.96 0.97 0.98 0.981 0.99 0.991 0.992 0.993 2008.1030 2008.1101 2008.1105 2008.1214 2009.0612 2009.0613 2009.0618 2009.0707 2009.1111 2009.1112 2010.0127 2010.0528 All 65 releases
feedwordpress / admin-ui.php

admin-ui.php in FeedWordPress 2008.1101, at admin-ui.php

162 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 function fwp_linkedit_single_submit ($status = NULL) {
3 global $wp_db_version;
4 if (isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_25) :
5 ?>
6 <div class="submitbox" id="submitlink">
7 <div id="previewview"></div>
8 <div class="inside">
9 <?php if (!is_null($status)) : ?>
10 <p><strong>Publication</strong></p>
11 <p>When a new post is syndicated from this feed...</p>
12 <select name="feed_post_status">
13 <option value="site-default" <?php echo $status['post']['site-default']; ?>> Use
14 Syndication Options setting</option>
15 <option value="publish" <?php echo $status['post']['publish']; ?>>Publish it immediately</option>
16
17 <?php if (SyndicatedPost::use_api('post_status_pending')) : ?>
18 <option value="pending" <?php echo $status['post']['pending']; ?>>Hold it Pending Review</option>
19 <?php endif; ?>
20
21 <option value="draft" <?php echo $status['post']['draft']; ?>>Save it as a draft</option>
22 <option value="private" <?php echo $status['post']['private']; ?>>Keep it private</option>
23 </select>
24 <?php endif; ?>
25 </div>
26
27 <p class="submit">
28 <input type="submit" name="submit" value="<?php _e('Save') ?>" />
29 </p>
30 </div>
31 <?php
32 endif;
33 }
34
35 function fwp_linkedit_periodic_submit ($caption = NULL) {
36 global $wp_db_version;
37 if (!(isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_25)) :
38 if (is_null($caption)) : $caption = __('Save Changes &raquo;'); endif;
39 ?>
40 <p class="submit">
41 <input type="submit" name="submit" value="<?php print $caption; ?>" />
42 </p>
43 <?php
44 endif;
45 }
46
47 function fwp_option_box_opener ($legend, $id, $class = "stuffbox") {
48 global $wp_db_version;
49 if (isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_25) :
50 ?>
51 <div id="<?php print $id; ?>" class="<?php print $class; ?>">
52 <h3><?php print htmlspecialchars($legend); ?></h3>
53 <div class="inside">
54 <?php
55 else :
56 ?>
57 <fieldset class="options"><legend><?php print htmlspecialchars($legend); ?></legend>
58 <?php
59 endif;
60 }
61
62 function fwp_option_box_closer () {
63 global $wp_db_version;
64 if (isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_25) :
65 ?>
66 </div> <!-- class="inside" -->
67 </div> <!-- class="stuffbox" -->
68 <?php
69 else :
70 ?>
71 </fieldset>
72 <?php
73 endif;
74 }
75
76 function fwp_tags_box ($tags) {
77 if (!is_array($tags)) : $tags = array(); endif;
78 ?>
79 <div id="tagsdiv" class="postbox">
80 <h3><?php _e('Tags') ?></h3>
81 <p style="font-size:smaller;font-style:bold;margin:0">Place <?php print $object; ?> under...</p>
82 <div class="inside">
83 <p id="jaxtag"><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo implode(",", $tags); ?>" /></p>
84 <div id="tagchecklist"></div>
85 </div>
86 </div>
87 <?php
88 }
89
90 function fwp_category_box ($checked, $object, $tags = array()) {
91 global $wp_db_version;
92
93 if (isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_25) : // WordPress 2.5.x
94 ?>
95 <div id="category-adder" class="wp-hidden-children">
96 <h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
97 <p id="category-add" class="wp-hidden-child">
98 <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" tabindex="3" />
99 <?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
100 <input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _e( 'Add' ); ?>" tabindex="3" />
101 <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
102 <span id="category-ajax-response"></span>
103 </p>
104 </div>
105
106 <ul id="category-tabs">
107 <li class="ui-tabs-selected"><a href="#categories-all" tabindex="3"><?php _e( 'All posts' ); ?></a>
108 <p style="font-size:smaller;font-style:bold;margin:0">Give <?php print $object; ?> these categories</p>
109 </li>
110 </ul>
111
112 <div id="categories-all" class="ui-tabs-panel">
113 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
114 <?php fwp_category_checklist(NULL, false, $checked) ?>
115 </ul>
116 </div>
117 <?php
118 elseif (isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_20) : // WordPress 2.x
119 ?>
120 <div id="moremeta">
121 <div id="grabit" class="dbx-group">
122 <fieldset id="categorydiv" class="dbx-box">
123 <h3 class="dbx-handle"><?php _e('Categories') ?></h3>
124 <div class="dbx-content">
125 <p style="font-size:smaller;font-style:bold;margin:0">Place <?php print $object; ?> under...</p>
126 <p id="jaxcat"></p>
127 <ul id="categorychecklist"><?php fwp_category_checklist(NULL, false, $checked); ?></ul></div>
128 </fieldset>
129 </div>
130 </div>
131 <?php
132 else : // WordPress 1.5
133 ?>
134 <fieldset id="categorydiv" style="width: 20%; margin-right: 2em">
135 <legend><?php _e('Categories') ?></legend>
136 <p style="font-size:smaller;font-style:bold;margin:0">Place <?php print $object; ?> under...</p>
137 <div style="height: 20em"><?php fwp_category_checklist(NULL, false, $checked); ?></div>
138 </fieldset>
139 <?php
140 endif;
141 }
142
143 function update_feeds_mention ($feed) {
144 echo "<li>Updating <cite>".$feed['link/name']."</cite> from &lt;<a href=\""
145 .$feed['link/uri']."\">".$feed['link/uri']."</a>&gt; ...</li>\n";
146 flush();
147 }
148
149 function fwp_author_list () {
150 global $wpdb;
151 $ret = array();
152 $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY display_name");
153 if (is_array($users)) :
154 foreach ($users as $user) :
155 $id = (int) $user->ID;
156 $ret[$id] = $user->display_name;
157 endforeach;
158 endif;
159 return $ret;
160 }
161
162