diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/twitter-tools/twitter-tools-excludecat.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/twitter-tools/twitter-tools-excludecat.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,126 @@ + +#aktt_exclude_cat_options { + list-style: none; +} +#aktt_exclude_cat_options li { + float: left; + margin: 0 0 5px 0; + padding: 3px; + width: 200px; +} + + +
+

'.__('Exclude Categories for Twitter Tools', 'twitter-tools-excludecat').'

+
+ +
+

'.__('Posts in selected categories will be excluded from blog post tweets', 'twitter-tools-excludecat').'

+

'.__('Select All', 'twitter-tools-excludecat').' | '.__('Unselect All', 'twitter-tools-excludecat').'

+
    + '); + + $categories = get_categories('hide_empty=0'); + $exclude_cats = get_option('aktt_excludecats'); + if (!is_array($exclude_cats)) { + $exclude_cats = array(); + } + foreach ($categories as $cat) { + $id = 'aktt_exclude_cat_'.$cat->term_id; + in_array($cat->term_id, $exclude_cats) ? $checked = ' checked="checked"' : $checked = ''; + print(' +
  • + + +
  • + '); + } + print(' +
+
+
+

+ +

+
+
+ '); +} +add_action('aktt_options_form', 'aktt_excludecat_settings_form'); + +function aktt_excludecat_save_settings() { + if (!current_user_can('manage_options')) { + return; + } + $cats = array(); + if (isset($_POST['aktt_exclude_cats']) && is_array($_POST['aktt_exclude_cats'])) { + foreach ($_POST['aktt_exclude_cats'] as $cat_id) { + $cat_id = intval($cat_id); + if ($cat_id) { + $cats[] = $cat_id; + } + } + } + update_option('aktt_excludecats', $cats); +} + +//a:21:{s:11:"plugin_name";s:34:"Twitter Tools - Exclude Categories";s:10:"plugin_uri";s:35:"http://crowdfavorite.com/wordpress/";s:18:"plugin_description";s:72:"Exclude posts in certain categories from being tweeted by Twitter Tools.";s:14:"plugin_version";s:3:"1.0";s:6:"prefix";s:15:"aktt_excludecat";s:12:"localization";s:24:"twitter-tools-excludecat";s:14:"settings_title";s:34:"Exclude Category for Twitter Tools";s:13:"settings_link";s:34:"Exclude Category for Twitter Tools";s:4:"init";b:0;s:7:"install";b:0;s:9:"post_edit";b:0;s:12:"comment_edit";b:0;s:6:"jquery";b:0;s:6:"wp_css";b:0;s:5:"wp_js";b:0;s:9:"admin_css";b:0;s:8:"admin_js";b:0;s:15:"request_handler";s:1:"1";s:6:"snoopy";b:0;s:11:"setting_cat";s:1:"1";s:14:"setting_author";b:0;} + +?> \ No newline at end of file