diff --git a/wordpress/wp-content/themes/backer/footer.php b/wordpress/wp-content/themes/backer/footer.php index 6d174579a3e17562605b95ae03ce41a515e6453a..ba012214cb2fbf6fcf69715ea6626ed65f3c0d05 100644 --- a/wordpress/wp-content/themes/backer/footer.php +++ b/wordpress/wp-content/themes/backer/footer.php @@ -137,12 +137,11 @@ - \ No newline at end of file diff --git a/wordpress/wp-content/themes/backer/functions.php b/wordpress/wp-content/themes/backer/functions.php index f25843916430297c02e264baa65b9bc6f8a58285..e93f70e0c335ba87f1487878803fa4b7a7a77533 100644 --- a/wordpress/wp-content/themes/backer/functions.php +++ b/wordpress/wp-content/themes/backer/functions.php @@ -1,4 +1,32 @@ 'ignition_product', + 'post_status' => array('publish', 'needsediting') + ); + $loop = new WP_Query($query); + while ( $loop->have_posts() ) { + $loop->the_post(); + $pid = $loop->post->ID; + $funds_raised = get_post_meta( $pid, 'ign_percent_raised', true ); + $days_left = get_post_meta( $pid, 'ign_days_left', true ); + if($funds_raised == 100){ + wp_update_post( array( 'ID'=>$pid, 'post_status' => 'completed' ) ); + } + if($funds_raised != 100 && $days_left == 0){ + wp_update_post( array( 'ID'=>$pid, 'post_status' => 'closed' ) ); + } + } +} +add_action( 'check_project_status','check_project_status' ); +if (!wp_next_scheduled('check_project_status')) { + wp_schedule_event(time(), 'hourly', 'check_project_status'); +} + + /*--------------------------------- Custom Project Status -----------------------------------*/ diff --git a/wordpress/wp-content/themes/backer/header-projectsingle.php b/wordpress/wp-content/themes/backer/header-projectsingle.php index 93cd1378b149893bc7516c176cdb886b573b9a3e..449e90533b69dae854d78ef536c39dd64cf73014 100644 --- a/wordpress/wp-content/themes/backer/header-projectsingle.php +++ b/wordpress/wp-content/themes/backer/header-projectsingle.php @@ -12,23 +12,12 @@ - - - - - - + - - - - + + + + @@ -39,54 +28,86 @@ + - - - - - - + + + + + + + ID, 'krown_page_layout', true ) : '' ) . ' no-js' ); ?>> - -