Changeset 435767
- Timestamp:
- 09/09/2011 04:01:06 PM (15 years ago)
- Location:
- admin-dashboard-site-notes/branches/1.2
- Files:
-
- 3 edited
-
admin-styles.css (modified) (2 diffs)
-
dashboard-site-notes.php (modified) (6 diffs)
-
readme.txt (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
admin-dashboard-site-notes/branches/1.2/admin-styles.css
r435307 r435767 69 69 margin-bottom:1em; 70 70 } 71 #dsn_instructions .site_note li ,72 #dsn_dashboard .site_note li {71 #dsn_instructions .site_note li.site_note, 72 #dsn_dashboard .site_note li.site_note { 73 73 margin-left:1em; 74 74 padding-top:0.5em; … … 76 76 } 77 77 78 #dsn_instructions .index ol ,79 #dsn_instructions .index ul ,80 #dsn_instructions .index li ,78 #dsn_instructions .index ol.notes, 79 #dsn_instructions .index ul.notes, 80 #dsn_instructions .index li.site_note, 81 81 #dsn_instructions .index h4 { 82 82 margin:0; 83 83 padding:0; 84 84 } 85 #dsn_instructions ul.index li {85 #dsn_instructions ul.index li.site_note { 86 86 margin-top:0.1em; 87 87 margin-left:1em; -
admin-dashboard-site-notes/branches/1.2/dashboard-site-notes.php
r435307 r435767 22 22 * expirations/time ranges - use http://wordpress.org/extend/plugins/automatic-page-publish-expire/ 23 23 * notes appear outside of admin - use http://wordpress.org/extend/plugins/wp-announcements/ 24 * tweetmemebutton conflict - appears to be abandoned, uses deprecated functions, and appears to be broken for most people in general 25 26 == Changelog == 27 = 1.1 = 28 * css changes to make everything prettier and hopefully more usable 29 * added config option for choosing which roles can create notes 30 * added note option for hiding the title 31 * added config option for enabling application of content filters on notes 32 * added config option for enabling use of excerpts 33 * added config option for title of dashboard widget and instruction manual 34 * added config option for grouping notes 35 * added options page 36 * fixed bug where content_filters were being applied twice 37 * notes sorted by 'menu_order' ascending, then 'post_title' alphabetically 38 39 = 1.0.1 = 40 * fixed bug that was adding extra meta fields to wrong content types 41 42 = 1.0 = 43 * added instruction manual 44 45 = 0.9.2.1 = 46 * fixed fatal error bug and display bug 47 * fixed incorrect screenshots 48 49 = 0.9.2 = 50 * added translation support and English .pot file 51 * added donate links 52 * hierarchy now takes effect on notes on dashboard 53 * if excerpt is available, use that in notices/dashboard, with full text appearing only in manual 54 * major optimization by changing note querying method and removing other stupidity 55 * stored 'everywhere' checkboxes server-side so they work without javascript enabled 56 * added GPLv3 license document 57 * improved auto ("everywhere") checkbox functionality 58 59 = 0.9.1 = 60 * notes can be set to display only for certain user roles 61 62 = 0.9 = 63 * added post type notes by action 64 * added dashboard notes 24 * tweetmemebutton conflict - appears to be abandoned, uses deprecated functions, and appears to be broken in general for a lot of people 65 25 66 26 */ … … 116 76 117 77 // create the site note content type 118 self::add_content_type(); 78 if(!defined('DSN_DISABLE_CHANGES')) { 79 self::add_content_type(); 80 } 119 81 120 82 // add hooks … … 139 101 // add the options page if this user can manage the options 140 102 if(self::user_has_admin()) { 141 add_action('admin_menu', array($this,'add_config_menu')); 142 add_action('admin_init', array($this,'register_settings')); 103 if(!defined('DSN_DISABLE_CHANGES')) { 104 add_action('admin_menu', array($this,'add_config_menu')); 105 add_action('admin_init', array($this,'register_settings')); 106 } 143 107 } 144 108 } … … 410 374 // apply our internal options to content and return what we actually want 411 375 public static function get_content($post,$full_post=false) { 412 $c = $post->post_content; // content filters and excerpts are already handled by get_notes()$c ='';376 $c = ''; 413 377 if(self::$options['support_excerpt']) { 414 378 $c = $post->post_excerpt; … … 419 383 if(!strlen(trim($c)) || $full_post) { 420 384 $c = $post->post_content; 421 }422 if(self::$options['use_content_filter']) {423 $c = apply_filters('the_content', $c);385 if(self::$options['use_content_filter']) { 386 $c = apply_filters('the_content', $c); 387 } 424 388 } 425 389 return $c; … … 668 632 $defaults['role_'.$role] = false; 669 633 if($role=='administrator') { 670 $defaults['role_'.$role] = true; 634 $defaults['role_administrator'] = true; 635 // if role_administrator has never been set before, add capabilities 636 // for using the post type. 637 if(!isset($options['role_administrator'])) { 638 global $wp_roles; 639 $wp_roles->add_cap($role, self::$post_type_name_cap,true); 640 foreach(self::$capabilities as $c=>$val) { 641 $wp_roles->add_cap($role, $val, true); 642 } 643 } 671 644 } 672 645 } -
admin-dashboard-site-notes/branches/1.2/readme.txt
r435307 r435767 13 13 Add notes about the site to various admin locations, as well as compile them into an instruction manual. 14 14 15 This is intended to build instructions into a site for clients, so it is focused on providing abilities only 16 to the highest role of user available on a site, although it can be configured as a general purpose tool 17 to leave temporary notes to any group on your site that has admin access. 18 15 19 == Installation == 16 20 … … 25 29 define('DSN_ADMIN_CONFIG',true); 26 30 27 If you aren't using multisite but still don't see site notes, they're probably disabled. Go toSettings->Site Notes and make sure the box next to Administrator is checked.31 If you aren't using multisite but still don't see site notes, they're probably disabled. Try Settings->Site Notes and make sure the box next to Administrator is checked. 28 32 29 33 = I've added my notes but now I want to hide the Site Notes from other admins. = 30 34 Go to Settings->Site Notes and uncheck the box next to Administrator and they will no longer be editable. To re-enable them, just come back to this page and turn it back on. 35 You can also define('DSN_DISABLE_CHANGES',true); in your functions.php to disable all changes completely, but note that if you do that, NOBODY will be able to make any changes whatsoever until you remove that line. 31 36 32 37 = Why isn't one of my notes showing up in the dashboard/instructions? = … … 34 39 35 40 = Why is one of my notes showing up with empty text? = 36 Make sure that the excerpt field for your note is e ither empty or contains the short content you want to include.41 Make sure that the excerpt field for your note is empty or contains the short content you want to include. If it's still not showing up, trying disabling excerpt, excerpt filters, and/or content filters on the settings page. 37 42 38 43 == Screenshots == … … 46 51 == Changelog == 47 52 = 1.1 = 53 * added constant for allowing normal admins to edit config on multisite 54 * added constant for disabling all changes 48 55 * css changes to make everything prettier and hopefully more usable 56 * added config option for choosing which roles can create notes 49 57 * added note option for hiding the title 50 58 * added config option for enabling application of content filters on notes … … 53 61 * added config option for grouping notes 54 62 * added options page 55 * fixed bug where content_filters were being applied twice56 63 * notes sorted by 'menu_order' ascending, then 'post_title' alphabetically 57 64 … … 60 67 61 68 = 1.0 = 62 * added instruction manual page69 * added instruction manual 63 70 64 71 = 0.9.2.1 = … … 68 75 = 0.9.2 = 69 76 * added translation support and English .pot file 77 * added donate links 70 78 * hierarchy now takes effect on notes on dashboard 71 79 * if excerpt is available, use that in notices/dashboard, with full text appearing only in manual 72 80 * major optimization by changing note querying method and removing other stupidity 73 81 * stored 'everywhere' checkboxes server-side so they work without javascript enabled 82 * added GPLv3 license document 74 83 * improved auto ("everywhere") checkbox functionality 75 84 … … 85 94 = 1.1 = 86 95 Added a bunch of configuration options, permissions options, a bit of css, and some minor bug fixes. 87 MULTISITE NOTE: this will probablyadd permission for normal admins (not just super-admins) to create site notes unless you go to Site Notes Config and disable the administrator permission.96 MULTISITE USERS: this will add permission for normal admins (not just super-admins) to create site notes unless you go to Site Notes Config and disable the administrator permission.
Note: See TracChangeset
for help on using the changeset viewer.