Created
December 19, 2017 22:35
-
-
Save wpcrmsystem/aa25a7d1fee08217f9e2b244cef23304 to your computer and use it in GitHub Desktop.
Programmatically Create an Organization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wpcrmsystem_add_record(){ | |
$fields = array( | |
'title' => 'Autobots', | |
'phone' => '555-555-5555', | |
'email' => 'ng@autobot.com', | |
'url' => 'http://autobot.com', | |
'address_1' => '123 Main St', | |
'address_2' => '#100', | |
'city' => 'Anytown', | |
'state' => 'AZ', | |
'postal' => '85858', | |
'country' => 'USA', | |
'additional' => 'This is some extra content.', | |
); | |
$custom_fields = array( | |
'Hours' => '9-5', | |
); | |
$categories = 'Client, Another Category'; | |
$status = 'publish'; | |
$author = '1'; | |
$update = false; | |
$create = new WPCRM_System_Create; | |
$create->organizations( $fields, $custom_fields, $categories, $status, $author, $update ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment