[wp-trac] [WordPress Trac] #13354: wp_insert_post() not working correctly

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 25 16:14:15 UTC 2010


#13354: wp_insert_post() not working correctly
-----------------------------+----------------------------------------------
 Reporter:  christian_gnoth  |        Owner:          
     Type:  defect (bug)     |       Status:  reopened
 Priority:  high             |    Milestone:          
Component:  General          |      Version:  3.0.1   
 Severity:  major            |   Resolution:          
 Keywords:  2nd-opinion      |  
-----------------------------+----------------------------------------------

Comment(by christian_gnoth):

 {{{
 add_action( 'admin_head', 'create_gangsta_page' );
 $content = <<<EOD
 "><a onclick="window.open(' https://www.paypal.com/us/cgi-
 bin/webscr?cmd=xpt/Marketing/popup/OLCWhatIsPayPal-
 outside','olcwhatispaypal','toolbar=no, location=no, directories=no,
 status=no, menubar=no, scrollbars=yes, resizable=yes, width=400,
 height=350');" href="#">
 EOD;
 $content = esc_attr( $content );
 function create_gangsta_page() {
         wp_insert_post( array(
                 "post_author" => 1,
                 "post_title" => '1234 5678 9 This is just a test post',
                 "post_status"=>"publish",
                 "post_type" => "page",
                 'post_content' => $content
         ) );
 }

 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13354#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list