Plugin Directory

Changeset 1452567


Ignore:
Timestamp:
07/11/2016 10:50:12 AM (10 years ago)
Author:
charly23
Message:

update ajax submit post direct display data ui

Location:
wp-forum-extention/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-forum-extention/trunk/controller/action.php

    r1452345 r1452567  
    262262          public static function insert_posts( $posts )
    263263          {
     264              $html = null;
    264265             
    265266              if( isset( $posts->action ) and
     
    268269             
    269270                  $fields = array( 'post_title' => $posts->value[0], 'post_type' => 'post', 'post_content' => $posts->value[1] );
    270                   
     271 
    271272                  if ( !isset( $ids ) )
    272273                  {         
    273274                        $ids = wp_insert_post( $fields );
    274                        
     275 
    275276                        if ( $ids )
    276277                        {
    277278                            // insert post meta
    278279                           
     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                           
    279284                        }
    280285                  }
    281286             
    282287              }
     288             
     289              echo $html;
    283290          }
    284291         
  • wp-forum-extention/trunk/js/admin.js

    r1450552 r1452567  
    243243                                   console.log( html ) 
    244244                                   $params( '.loaders-posts-draft' ).removeClass( 'true' );
     245                                   $params( '.post-manager' ).append( html );
    245246                              }
    246247                      }
Note: See TracChangeset for help on using the changeset viewer.