Created
March 20, 2014 21:54
-
-
Save matheusgimenez/9674741 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Required by WordPress. | |
* | |
* Keep this file clean and only use it for requires. | |
*/ | |
require_once locate_template('/lib/utils.php'); // Utility functions | |
require_once locate_template('/lib/init.php'); // Initial theme setup and constants | |
require_once locate_template('/lib/sidebar.php'); // Sidebar class | |
require_once locate_template('/lib/config.php'); // Configuration | |
require_once locate_template('/lib/activation.php'); // Theme activation | |
require_once locate_template('/lib/cleanup.php'); // Cleanup | |
require_once locate_template('/lib/nav.php'); // Custom nav modifications | |
require_once locate_template('/lib/rewrites.php'); // URL rewriting for assets | |
require_once locate_template('/lib/htaccess.php'); // HTML5 Boilerplate .htaccess | |
require_once locate_template('/lib/widgets.php'); // Sidebars and widgets | |
require_once locate_template('/lib/scripts.php'); // Scripts and stylesheets | |
require_once locate_template('/lib/custom.php'); // Custom functions | |
require_once locate_template('/requires-agenda.php'); // Agenda | |
function onAddAgenda($post_id){ | |
if(get_post_type($post_id) == 'Agenda'){ | |
$conf = array( | |
'post_title' => 'Post temp', | |
'post_author' => 1, | |
'post_status' => 'draft' | |
); | |
wp_insert_post($conf); | |
} | |
} | |
add_action('save_post','onAddAgenda'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment