Skip to content

Instantly share code, notes, and snippets.

@danielmartins
Created March 18, 2013 01:22
Show Gist options
  • Select an option

  • Save danielmartins/5184426 to your computer and use it in GitHub Desktop.

Select an option

Save danielmartins/5184426 to your computer and use it in GitHub Desktop.

Revisions

  1. danielmartins revised this gist Mar 18, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    <?php

    // Create post object
    $newpost = array(
    'post_title' => 'My post',
  2. danielmartins revised this gist Mar 18, 2013. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions gistfile1
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    <?php
    // Create post object
    $newpost = array(
    'post_title' => 'My post',
    'post_content' => 'This is my post.',
    'post_status' => 'publish',
    'post_author' => 1, // admin
    );
    // Create post object
    $newpost = array(
    'post_title' => 'My post',
    'post_content' => 'This is my post.',
    'post_status' => 'publish',
    'post_author' => 1, // admin
    );

    // Insert the post into the database
    wp_insert_post( $newpost );
    // Insert the post into the database
    wp_insert_post( $newpost );
  3. danielmartins created this gist Mar 18, 2013.
    11 changes: 11 additions & 0 deletions gistfile1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    <?php
    // Create post object
    $newpost = array(
    'post_title' => 'My post',
    'post_content' => 'This is my post.',
    'post_status' => 'publish',
    'post_author' => 1, // admin
    );

    // Insert the post into the database
    wp_insert_post( $newpost );