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

184 lines 5.8 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_authors_single_submit ($link = NULL) {
48 global $wp_db_version;
49
50 if (fwp_test_wp_version(FWP_SCHEMA_25)) :
51 ?>
52 <div class="submitbox" id="submitlink">
53 <div id="previewview">
54 </div>
55 <div class="inside">
56 </div>
57
58 <p class="submit">
59 <input type="submit" name="save" value="<?php _e('Save') ?>" />
60 </p>
61 </div>
62 <?php
63 endif;
64 }
65
66 function fwp_option_box_opener ($legend, $id, $class = "stuffbox") {
67 global $wp_db_version;
68 if (isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_25) :
69 ?>
70 <div id="<?php print $id; ?>" class="<?php print $class; ?>">
71 <h3><?php print htmlspecialchars($legend); ?></h3>
72 <div class="inside">
73 <?php
74 else :
75 ?>
76 <fieldset class="options"><legend><?php print htmlspecialchars($legend); ?></legend>
77 <?php
78 endif;
79 }
80
81 function fwp_option_box_closer () {
82 global $wp_db_version;
83 if (isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_25) :
84 ?>
85 </div> <!-- class="inside" -->
86 </div> <!-- class="stuffbox" -->
87 <?php
88 else :
89 ?>
90 </fieldset>
91 <?php
92 endif;
93 }
94
95 function fwp_tags_box ($tags) {
96 if (!is_array($tags)) : $tags = array(); endif;
97 ?>
98 <div id="tagsdiv" class="postbox">
99 <h3><?php _e('Tags') ?></h3>
100 <p style="font-size:smaller;font-style:bold;margin:0">Place <?php print $object; ?> under...</p>
101 <div class="inside">
102 <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>
103 <div id="tagchecklist"></div>
104 </div>
105 </div>
106 <?php
107 }
108
109 function fwp_category_box ($checked, $object, $tags = array()) {
110 global $wp_db_version;
111
112 if (isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_25) : // WordPress 2.5.x
113 ?>
114 <div id="category-adder" class="wp-hidden-children">
115 <h4><a id="category-add-toggle" href="#category-add" class="hide-if-no-js" tabindex="3"><?php _e( '+ Add New Category' ); ?></a></h4>
116 <p id="category-add" class="wp-hidden-child">
117 <input type="text" name="newcat" id="newcat" class="form-required form-input-tip" value="<?php _e( 'New category name' ); ?>" tabindex="3" />
118 <?php wp_dropdown_categories( array( 'hide_empty' => 0, 'name' => 'newcat_parent', 'orderby' => 'name', 'hierarchical' => 1, 'show_option_none' => __('Parent category'), 'tab_index' => 3 ) ); ?>
119 <input type="button" id="category-add-sumbit" class="add:categorychecklist:category-add button" value="<?php _e( 'Add' ); ?>" tabindex="3" />
120 <?php wp_nonce_field( 'add-category', '_ajax_nonce', false ); ?>
121 <span id="category-ajax-response"></span>
122 </p>
123 </div>
124
125 <ul id="category-tabs">
126 <li class="ui-tabs-selected"><a href="#categories-all" tabindex="3"><?php _e( 'All posts' ); ?></a>
127 <p style="font-size:smaller;font-style:bold;margin:0">Give <?php print $object; ?> these categories</p>
128 </li>
129 </ul>
130
131 <div id="categories-all" class="ui-tabs-panel">
132 <ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
133 <?php fwp_category_checklist(NULL, false, $checked) ?>
134 </ul>
135 </div>
136 <?php
137 elseif (isset($wp_db_version) and $wp_db_version >= FWP_SCHEMA_20) : // WordPress 2.x
138 ?>
139 <div id="moremeta">
140 <div id="grabit" class="dbx-group">
141 <fieldset id="categorydiv" class="dbx-box">
142 <h3 class="dbx-handle"><?php _e('Categories') ?></h3>
143 <div class="dbx-content">
144 <p style="font-size:smaller;font-style:bold;margin:0">Place <?php print $object; ?> under...</p>
145 <p id="jaxcat"></p>
146 <ul id="categorychecklist"><?php fwp_category_checklist(NULL, false, $checked); ?></ul></div>
147 </fieldset>
148 </div>
149 </div>
150 <?php
151 else : // WordPress 1.5
152 ?>
153 <fieldset id="categorydiv" style="width: 20%; margin-right: 2em">
154 <legend><?php _e('Categories') ?></legend>
155 <p style="font-size:smaller;font-style:bold;margin:0">Place <?php print $object; ?> under...</p>
156 <div style="height: 20em"><?php fwp_category_checklist(NULL, false, $checked); ?></div>
157 </fieldset>
158 <?php
159 endif;
160 }
161
162 function update_feeds_mention ($feed) {
163 echo "<li>Updating <cite>".$feed['link/name']."</cite> from &lt;<a href=\""
164 .$feed['link/uri']."\">".$feed['link/uri']."</a>&gt; ...";
165 flush();
166 }
167 function update_feeds_finish ($feed, $added, $dt) {
168 echo " completed in $dt second".(($dt==1)?'':'s')."</li>\n";
169 }
170
171 function fwp_author_list () {
172 global $wpdb;
173 $ret = array();
174 $users = $wpdb->get_results("SELECT * FROM $wpdb->users ORDER BY display_name");
175 if (is_array($users)) :
176 foreach ($users as $user) :
177 $id = (int) $user->ID;
178 $ret[$id] = $user->display_name;
179 endforeach;
180 endif;
181 return $ret;
182 }
183
184