Changeset 1452567
- Timestamp:
- 07/11/2016 10:50:12 AM (10 years ago)
- Location:
- wp-forum-extention/trunk
- Files:
-
- 1 added
- 2 edited
-
controller/action.php (modified) (2 diffs)
-
images/698983-icon-136-document-edit-16.png (added)
-
js/admin.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-forum-extention/trunk/controller/action.php
r1452345 r1452567 262 262 public static function insert_posts( $posts ) 263 263 { 264 $html = null; 264 265 265 266 if( isset( $posts->action ) and … … 268 269 269 270 $fields = array( 'post_title' => $posts->value[0], 'post_type' => 'post', 'post_content' => $posts->value[1] ); 270 271 271 272 if ( !isset( $ids ) ) 272 273 { 273 274 $ids = wp_insert_post( $fields ); 274 275 275 276 if ( $ids ) 276 277 { 277 278 // insert post meta 278 279 280 $edits = get_edit_post_link( $ids ); 281 282 $html .= "<div class='post-contents item-none'><a href='{$edits}'></a>{$posts->value[0]}</div>"; 283 279 284 } 280 285 } 281 286 282 287 } 288 289 echo $html; 283 290 } 284 291 -
wp-forum-extention/trunk/js/admin.js
r1450552 r1452567 243 243 console.log( html ) 244 244 $params( '.loaders-posts-draft' ).removeClass( 'true' ); 245 $params( '.post-manager' ).append( html ); 245 246 } 246 247 }
Note: See TracChangeset
for help on using the changeset viewer.