PluginProbe
FeedWordPress / 2008.1214
FeedWordPress v2008.1214
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.1214, at admin-ui.php

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