Changeset 770568
- Timestamp:
- 09/12/2013 12:09:56 AM (12 years ago)
- Location:
- simple-admin-notes/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
simple-notes.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-admin-notes/trunk/readme.txt
r767213 r770568 4 4 Tags: notes, admin notes, notepad, client notes, notes, help 5 5 Requires at least: 3.5 6 Tested up to: 3.6 7 Stable tag: 1. 2.06 Tested up to: 3.6.1 7 Stable tag: 1.3.0 8 8 9 9 Adds a simple "Notes" section to the admin menu or posts -
simple-admin-notes/trunk/simple-notes.php
r767213 r770568 6 6 Author: Wycks 7 7 Author URI: http://wordpress.org/extend/plugins/profile/wycks 8 Version: 1. 2.08 Version: 1.3.0 9 9 License: GPL2 10 10 */ … … 186 186 * @param string $screens visible in defualt notes section 187 187 * @param string $notesposts query 188 * @param string $get_ids post id string stored in meta field 189 * @param array $id_pieces array of post id's 188 190 */ 189 191 function wpt_box_san($post_id){ … … 204 206 'no_found_rows' => true, 205 207 'meta_query' => array( 206 array( 207 'value' => $post_id, 208 'compare' => 'LIKE', 208 array( 209 'key' => 'note_ids', 210 'value' => array(''), 211 'compare' => 'NOT IN' 209 212 ), 210 213 ) … … 215 218 foreach( $notesposts as $notespost ) : setup_postdata( $notespost ); 216 219 217 $placement_above = get_post_meta( $notespost->ID, 'note_placement_above', true ); 218 $placement_below = get_post_meta( $notespost->ID, 'note_placement_below', true ); 219 220 $title = $notespost->post_title; 221 222 $output = get_the_content(); 223 $output = apply_filters( 'the_content', $output ); 224 $output = str_replace( ']]>', ']]>', $output ); 220 $get_ids = get_post_meta( $notespost->ID, 'note_ids', true ); 221 $id_pieces = explode(",", $get_ids); 222 223 if (in_array($post_id, $id_pieces)) { 224 225 $placement_above = get_post_meta( $notespost->ID, 'note_placement_above', true ); 226 $placement_below = get_post_meta( $notespost->ID, 'note_placement_below', true ); 227 228 $title = $notespost->post_title; 229 230 $output = get_the_content(); 231 $output = apply_filters( 'the_content', $output ); 232 $output = str_replace( ']]>', ']]>', $output ); 233 } 225 234 226 235 endforeach; … … 287 296 function my_notes_options_san(){ 288 297 289 if ( is_admin() ) { ?> 298 $screen = get_current_screen(); 299 if ( is_admin() && ($screen->id = 'note_page_my_notes')) { ?> 290 300 291 301 <script type="text/javascript"> … … 311 321 'meta_query' => array( 312 322 array( 323 'posts_per_page' => -1, 324 'no_found_rows' => true, 313 325 'key' => 'note_placement_yes', 314 326 'value' => '', … … 417 429 }) 418 430 419 jQuery('#san-below').click(function(){431 jQuery('#san-below').click(function(){ 420 432 if (this.checked) { 421 433 jQuery('#san-above').prop('checked', false);
Note: See TracChangeset
for help on using the changeset viewer.