';
- break;
+ break;
}
echo '','';
}
@@ -766,7 +765,7 @@ function ign_cmb_editor_footer_scripts() {
jQuery('div[levels]').attr('levels', element_number);
jQuery('#levels').val(element_number);
jQuery('div[levels]').append('
' +
- '
'+(element_number)+' '+
+ '
'+
'
' +
@@ -791,10 +790,9 @@ function ign_cmb_editor_footer_scripts() {
var pre_element_number = element_number - 1;
jQuery('div[levels_2]').attr('levels_2', element_number);
jQuery('#levels_2').val(element_number);
- jQuery('div[levels_2]').append('
');
+ jQuery('div[levels_2]').append('
'+(element_number)+' ' +
+ ' ' +
+ '
');
});
// Add What we’re installing js code end here
// Add Project Timeline js code start here
@@ -805,9 +803,11 @@ function ign_cmb_editor_footer_scripts() {
jQuery('div[levels_3]').attr('levels_3', element_number);
jQuery('#levels_3').val(element_number);
jQuery('div[levels_3]').append('
');
+ '
'+(element_number)+' ' +
+ '
' +
+ ' '+
+ ' ' +
+ '
');
});
// Add Project Timeline js code end here
});
diff --git a/wordpress/wp-content/plugins/ignitiondeck-crowdfunding/ignitiondeck-admin.css b/wordpress/wp-content/plugins/ignitiondeck-crowdfunding/ignitiondeck-admin.css
index a9c691e3052d851c785fbfd7919b559b6f3481c6..8337b1e5d80b564ec75ddcdbcdb14e0b575b42da 100644
--- a/wordpress/wp-content/plugins/ignitiondeck-crowdfunding/ignitiondeck-admin.css
+++ b/wordpress/wp-content/plugins/ignitiondeck-crowdfunding/ignitiondeck-admin.css
@@ -48,6 +48,12 @@
width: 100%;
clear: both;
}
+.wrap ul li.ign_projectmeta_full.new_levels{
+ padding: 0 0 10px;
+}
+.wrap ul li.ign_projectmeta_full input[type=text]{
+ width: 97%;
+}
.wrap ul li.ign_projectmeta_full .customEditor {
padding: 1px;
border: 1px solid #c9c9c9;
@@ -62,8 +68,8 @@
width: 450px;
margin: 10px 0;
}
-.wrap .ign_file_upload .upload_button {
- margin-top: 10px;
+.wrap .img_status{
+ margin: 10px;
}
.wrap .ign_file_upload_image {
padding: 0;
@@ -99,24 +105,19 @@
}
.wrap .ign_projectmeta_reward_price {
padding: 0;
- margin: 0;
+ margin: 0 0 10px;
float: left;
width: 20%;
clear: both;
}
.wrap .ign_projectmeta_reward_limit {
padding: 0;
- margin: 0;
+ margin: 0 0 10px;
float: left;
width: 20%;
clear: left;
}
-.wrap .ign_projectmeta_reward_left .ign_projectmeta_reward_limit {
- margin-top: 65px;
-}
-.wrap .ign_projectmeta_reward_left .ign_projectmeta_reward_limit:last-child {
- margin-top: 0;
-}
+
.wrap .ign_projectmeta_reward_desc {
padding: 0;
margin: 0 2% 0 0;
@@ -138,9 +139,11 @@
display: block;
}
.wrap .projectmeta-levelbox {
- background-color: #f2f3f5;
- margin-bottom: 10px;
- padding: 8px;
+ margin: 0 0 10px;
+ padding: 0 0 30px;
+}
+.wrap .projectmeta-levelbox .ign_projectmeta_full{
+ padding: 0;
}
.wrap .projectmeta_none {
display: none ;
@@ -159,6 +162,7 @@
}
.wrap .projectmeta-levelbox label {
font-weight: bold;
+ margin: 10px 0;
}
.new_levels h4 {
diff --git a/wordpress/wp-content/themes/backer/css/admin-style.css b/wordpress/wp-content/themes/backer/css/admin-style.css
index 57e55499585fc1dec7509cf48e155de24ed9c9fd..99775dfba14cf3a240caa1aed939f40e37352abe 100644
--- a/wordpress/wp-content/themes/backer/css/admin-style.css
+++ b/wordpress/wp-content/themes/backer/css/admin-style.css
@@ -1,3 +1,68 @@
+#poststuff #postbox-container-2 h3{
+ font-size: 1.25rem;
+}
+#poststuff #post-body.columns-2{
+ margin-right: 30%;
+}
+#post-body.columns-2 #postbox-container-1 {
+ float: right;
+ margin-right: -43%;
+ width: 40%;
+}
+#poststuff #post-body.columns-2 #side-sortables{
+ width: auto;
+}
+.metabox-holder label {
+ font-weight: bold;
+ margin-bottom: 10px;
+ display: inline-block;
+}
+.metabox-holder label span{
+ display: block;
+ font-weight: normal;
+}
+.metabox-holder h4{
+ margin: 1rem 0;
+ font-size: 1.2rem;
+ line-height: 1.5rem;
+}
+.metabox-holder h4 span{
+ display: block;
+ font-weight: normal;
+ font-size: .85rem;
+}
+.metabox-holder h5{
+ margin: 1rem 0 0;
+ font-size: 1rem;
+ line-height: 1rem;
+ font-weight: bold;
+}
+.metabox-holder h5 span{
+ display: block;
+ font-weight: normal;
+ font-size: .85rem;
+}
+.metabox-holder .new_levels_2{
+ padding: 0;
+}
+.metabox-holder .new_item{
+ padding: 10px 0;
+}
+.metabox-holder .meta_wrapper{
+ margin: 10px 0;
+ border-top: 1px solid #ccc;
+}
+.metabox-holder .ign_projectmeta_left{
+ float: none;
+}
+.metabox-holder .ign_projectmeta_left label{
+ margin-bottom: 10px;
+ display: inline-block;
+}
+.metabox-holder .ign_projectmeta_full{
+ padding: 10px 0;
+ width: 100%;
+}
#wp-admin-bar-vc-inline-admin-bar-link, td.column-title .edit_vc, .composer-switch .wpb_switch-to-front-composer, .composer-switch span.vc-spacer:nth-of-type(3), #wpb-edit-inline, #message.rs-update-notice-wrap, #wpb-custom-post-css, .vc_row_edit_clone_delete .vc_row_image, .vc_admin_label.admin_label_css_animation.hidden-label, .vc-license-activation-notice, #accordion-section-idc_menu_items {
display: none !important;
}
diff --git a/wordpress/wp-content/themes/backer/functions.php b/wordpress/wp-content/themes/backer/functions.php
index f25843916430297c02e264baa65b9bc6f8a58285..7baf8e2cbfb59486a2d9d620fdf1763e478c28d0 100644
--- a/wordpress/wp-content/themes/backer/functions.php
+++ b/wordpress/wp-content/themes/backer/functions.php
@@ -1,64 +1,4 @@
_x( 'Closed', 'post' ),
- 'public' => true,
- 'show_in_admin_all_list' => true,
- 'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Closed
(%s) ', 'Closed
(%s) ' )
- ) );
- register_post_status( 'completed', array(
- 'label' => _x( 'Completed', 'post' ),
- 'public' => true,
- 'show_in_admin_all_list' => true,
- 'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Completed
(%s) ', 'Completed
(%s) ' )
- ) );
- register_post_status( 'needsediting', array(
- 'label' => _x( 'Needs Editing', 'post' ),
- 'public' => true,
- 'show_in_admin_all_list' => true,
- 'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Needs Editing
(%s) ', 'Needs Editing
(%s) ' )
- ) );
-}
-
-function append_project_status_list(){
- global $post;
- $label = '';
- if($post->post_type == 'ignition_product'){
- $post_value = "";
- $original_status = "";
- if($post->post_status == 'closed'){
- $label = '
Closed ';
- $post_value = '$("#original_publish, #publish").val("Update");';
- } else if($post->post_status == 'completed'){
- $label = '
Completed ';
- $post_value = '$("#original_publish, #publish").val("Update");';
- } else if($post->post_status == 'needsediting'){
- $label = '
Needs Editing ';
- $post_value = '$("#original_publish, #publish").val("Update");';
- }
- echo '
-
- ';
- }
-}
-
/*---------------------------------
Setup OptionTree
------------------------------------*/
@@ -85,6 +25,8 @@ add_filter( 'ot_header_version_text', 'filter_ot_header_version_text');
Include other files
------------------------------------*/
+include( 'includes/overrides/project-status.php' );
+include( 'includes/overrides/project-edit.php' );
include( 'includes/theme-options.php' );
include( 'includes/customizer-options.php' );
include( 'includes/custom-styles.php' );
diff --git a/wordpress/wp-content/themes/backer/includes/ignitiondeck-functions.php b/wordpress/wp-content/themes/backer/includes/ignitiondeck-functions.php
index a84c1a95f5721ea3a7256d54d0c674bd1cb67521..8d828bdceca5ce02a5c2ce7759b4f3c1d3de2d92 100644
--- a/wordpress/wp-content/themes/backer/includes/ignitiondeck-functions.php
+++ b/wordpress/wp-content/themes/backer/includes/ignitiondeck-functions.php
@@ -3,174 +3,6 @@
* This file contains some IgnitionDeck related functions
*/
-/*---------------------------------
- overrides for project admin
------------------------------------*/
-function override_ign_change_columns( $cols ) {
- require ID_PATH.'languages/text_variables.php';
- $cols = array(
- 'cb' => '
',
- 'title' => $tr_Product,
- 'author' => __('Author', 'ignitiondeck'),
- 'type' => __('Type', 'ignitiondeck'),
- 'status' => $tr_Status,
- 'goal' => $tr_Funding_Goal,
- 'raised' => $tr_Pledged,
- 'enddate' => $tr_End_Date,
- 'daysleft' => $tr_Days_Remaining ,
- );
- return apply_filters('id_project_columns', $cols);
-}
-add_filter( "manage_ignition_product_posts_columns", "override_ign_change_columns" );
-
-function override_ign_sortable_columns() {
- $sortable_columns = array(
- 'title' => 'title',
- 'author' => 'author',
- 'type' => 'type',
- 'status' => 'status',
- 'goal' => 'goal',
- 'raised' => 'raised',
- 'enddate' => 'enddate',
- 'daysleft' => 'daysleft',
- );
- return apply_filters('id_sortable_project_columns', $sortable_columns);
-}
-add_filter( "manage_edit-ignition_product_sortable_columns", "override_ign_sortable_columns" );
-
-
-remove_action( 'manage_posts_custom_column', 'manage_ign_product_columns', 10);
-add_action( 'manage_posts_custom_column', 'override_manage_ign_product_columns', 10, 2 );
-
-function override_manage_ign_product_columns($column_name, $id) {
- global $post;
- require ID_PATH.'languages/text_variables.php';
- $post_id = $post->ID;
- $project_id = get_post_meta($id, 'ign_project_id', true);
- $project = new ID_Project($project_id);
- $cCode = $project->currency_code();
- switch ($column_name) {
- // display goal amount with currency formatting
- case 'author':
- echo (!empty($post->post_author) ? $post->post_author : __('None', 'ignitiondeck'));
- break;
-
- case 'type':
- $type = get_post_meta($post_id, 'ign_project_type', true);
- if (isset($type)) {
- if ($type == 'pwyw') {
- $type = __('Pledge What You Want', 'Ignitiondeck');
- }
- else if ($type == 'level-based') {
- $type = __('Level-Based', 'ignitiondeck');
- }
- }
- $type = apply_filters('id_project_type', $type);
- echo (isset($type) ? $type : '');
- break;
-
- case 'status':
- $status = get_post_status_object($post->post_status);
- echo $status->label;
- break;
-
- case 'goal':
- if (get_post_meta( $post->ID, 'ign_fund_goal', true)) {
- $goal_amt = number_format(get_post_meta( $post->ID, 'ign_fund_goal', true), 2, '.', ',');
-
- setlocale(LC_MONETARY, 'en_US');
- echo //money_format('%(#10n', $goal_amt);
- $cCode.$goal_amt;
- } else {
- echo '
'.$tr_No_Goal_set.' ';
- }
- break;
-
- case 'raised':
- if (isset($project_id)) {
- $project = new ID_Project($project_id);
- $post_id = $project->get_project_postid();
- $raised = apply_filters('id_funds_raised', $project->get_project_raised(), $post_id);
- echo $raised;
- }
- break;
- // display end date
- case 'enddate':
- if (get_post_meta( $post->ID, 'ign_fund_end', true)) {
- echo get_post_meta( $post->ID, 'ign_fund_end', true);
- } else {
- echo '
'.$tr_No_Date_set.' ';
- }
- break;
-
- // calculate days remaining
- case 'daysleft':
- if (get_post_meta( $post->ID, 'ign_fund_end', true)) {
- $days_left = $project->days_left();
- //$ending = get_post_meta( $post->ID, 'ign_fund_end', true);
- //$daysleft = ID_Project::days_left($ending);
- echo $days_left;
- } else {
- echo '
'.$tr_No_Date_set.' ';
- }
- break;
-
- // return standard post columns
- default:
- break;
- } // end switch
-}
-
-function filter_by_project_status(){
- $type = 'post';
- if (isset($_GET['post_type'])) {
- $type = $_GET['post_type'];
- }
- //only add filter to post type you want
- if ('ignition_product' == $type){
- //change this to the list of values you want to show
- //in 'label' => 'value' format
- $values = array(
- 'All Status' => 'any',
- 'Closed' => 'closed',
- 'Completed' => 'completed',
- 'Needs Editing' => 'needsediting',
- 'Published' => 'publish',
- 'Pending Review' => 'pending',
- 'Draft ' => 'draft',
- );
- ?>
-
- $value) {
- printf
- (
- '%s ',
- $value,
- $value == $current_v? ' selected="selected"':'',
- $label
- );
- }
- ?>
-
- query_vars['post_status'] = $_GET['project_status'];
- }
-}
-add_filter( 'parse_query', 'status_project_filter' );
-
/*---------------------------------
Raised Funds Filter
------------------------------------*/
diff --git a/wordpress/wp-content/themes/backer/includes/overrides/project-edit.php b/wordpress/wp-content/themes/backer/includes/overrides/project-edit.php
new file mode 100644
index 0000000000000000000000000000000000000000..399075994619adaeb382a4647602c42f62a8d13b
--- /dev/null
+++ b/wordpress/wp-content/themes/backer/includes/overrides/project-edit.php
@@ -0,0 +1,471 @@
+ array(
+ 'name' => $tr_Projects,
+ 'singular_name' => $tr_Project,
+ 'add_new' => $tr_Add_New_Project,
+ 'add_new_item' => $tr_Add_New_Project,
+ 'edit' => $tr_Edit,
+ 'edit_item' => $tr_Edit_Project,
+ 'new_item' => $tr_New_Project,
+ 'view' => $tr_View_Project,
+ 'view_item' => $tr_View_Project,
+ 'search_items' =>$tr_Search_Project,
+ 'not_found' => $tr_No_Products_found ,
+ 'not_found_in_trash' => $tr_No_Product_in_Trash,
+ ),
+ 'public' => true,
+ 'show_in_nav_menus' => true,
+ 'show_ui' => true,
+ 'publicly_queryable' => true,
+ 'exclude_from_search' => false,
+ 'hierarchical' => apply_filters('idcf_hierarchical', false),
+ 'menu_position' => 5,
+ 'capability_type' => 'post',
+ 'menu_icon' => plugins_url('/ignitiondeck-crowdfunding/images/ignitiondeck-menu.png'),
+ 'query_var' => true,
+ 'rewrite' => array( 'slug' => $slug, 'with_front' => true ),
+ 'has_archive' => $slug,
+ 'supports' => array('title', 'author'),
+ 'taxonomies' => array('category', 'post_tag', 'project_category'),
+ )
+ );
+}
+remove_action( 'init', 'ign_create_post_type' );
+add_action( 'init', 'override_ign_create_post_type' );
+
+function override_ign_meta_boxes(array $meta_boxes) {
+ require ID_PATH.'languages/text_variables.php';
+ $prefix = 'ign_';
+ $meta_boxes[] = array(
+ 'id' => 'project_detail',
+ 'title' => 'Project Details',
+ 'pages' => array('ignition_product'),
+ 'context' => 'normal',
+ 'priority' => 'high',
+ 'class' => $prefix . 'projectmeta',
+ 'fields' => array(
+ array(
+ 'name' => 'Project Location',
+ 'desc' => 'This should be exact address of project',
+ 'id' => $prefix . 'product_location',
+ 'class' => $prefix . 'projectmeta_full',
+ 'show_help' => false,
+ 'type' => 'text'
+ ),
+ array(
+ 'name' => 'Project Short Description',
+ 'desc' => 'Max 140 chars',
+ 'id' => $prefix . 'project_description',
+ 'class' => $prefix . 'projectmeta_full tinymce',
+ 'show_help' => false,
+ 'type' => 'textarea_medium'
+ ),
+ array(
+ 'name' => 'Project Long Description',
+ 'desc' => 'History and back story behind the building and the people. No character limit.',
+ 'id' => $prefix . 'project_long_description',
+ 'class' => $prefix . 'projectmeta_full tinymce',
+ 'show_help' => false,
+ 'type' => 'textarea_medium'
+ ),
+ array(
+ 'name' => 'About this Project',
+ 'desc' => 'Specifics about the retrofit itself. No character limit.',
+ 'id' => $prefix . 'about_project',
+ 'class' => $prefix . 'projectmeta_full tinymce',
+ 'show_help' => false,
+ 'type' => 'textarea_medium'
+ ),
+ )
+ );
+ $meta_boxes[] = array(
+ 'id' => 'project_what',
+ 'title' => 'What we’re installing',
+ 'pages' => array('ignition_product'),
+ 'context' => 'normal',
+ 'priority' => 'high',
+ 'class' => $prefix . 'projectmeta',
+ 'fields' => array(
+ array(
+ 'name' => 'The exact details of the retrofit. Ex. New XR5 Boiler',
+ 'type' => 'description',
+ ),
+ array(
+ 'name' => 'Item 1',
+ 'id' => $prefix . 'product_title_2',
+ 'class' => $prefix . 'projectmeta_full',
+ 'type' => 'text'
+ ),
+ array(
+ 'id' => $prefix . 'install_levels',
+ 'class' => $prefix . 'projectmeta_full install_level',
+ 'show_help' => false,
+ 'type' => 'install_level'
+ ),
+ array(
+ 'id' => $prefix . 'add_install_level',
+ 'class' => $prefix . 'projectmeta_full install_level',
+ 'type' => 'add_install_level',
+ ),
+ ),
+ );
+ $meta_boxes[] = array(
+ 'id' => 'project_who',
+ 'title' => 'Who is installing?',
+ 'pages' => array('ignition_product'),
+ 'context' => 'normal',
+ 'priority' => 'high',
+ 'class' => $prefix . 'projectmeta',
+ 'fields' => array(
+ array(
+ 'name' => 'Contractor Information',
+ 'desc' => 'This can be the name, address and website of the contractor',
+ 'id' => $prefix . 'who_is_installing',
+ 'class' => $prefix . 'projectmeta_full tinymce',
+ 'show_help' => false,
+ 'type' => 'textarea_medium'
+ ),
+ ),
+ );
+ $meta_boxes[] = array(
+ 'id' => 'project_funding',
+ 'title' => 'Funding Details',
+ 'pages' => array('ignition_product'),
+ 'context' => 'normal',
+ 'priority' => 'high',
+ 'class' => $prefix . 'projectmeta',
+ 'fields' => array(
+ array(
+ 'name' => 'Funding Goal',
+ 'desc' => 'Amount you are seeking to raise (required)',
+ 'id' => $prefix . 'fund_goal',
+ 'show_help' => false,
+ 'type' => 'text_money'
+ ),
+ array(
+ 'name' => 'Fundraising End Date',
+ 'desc' => 'Date funding will end (recommended)',
+ 'id' => $prefix . 'fund_end',
+ 'show_help' => false,
+ 'type' => 'text_date'
+ ),
+ array(
+ 'name' => 'Funding Levels',
+ 'desc' => 'This part should be completed by an Admin that knows what they are doing. Otherwise leave blank.',
+ 'type' => 'subtitle',
+ ),
+ array(
+ 'type' => 'level1wraptop',
+ 'class' => 'projectmeta_none'
+ ),
+ array(
+ 'name' => 'Funding Level 1',
+ 'id' => $prefix . 'product_title',
+ 'class' => $prefix . 'projectmeta_full',
+ 'show_help' => false,
+ 'type' => 'text'
+ ),
+ array(
+ 'name' => 'Level Price',
+ 'id' => $prefix . 'product_price',
+ 'class' => $prefix . 'projectmeta_reward_price',
+ 'type' => 'text_money'
+ ),
+ array(
+ 'name' => 'Level Short Description',
+ 'desc' => 'Used in widgets sidebars, and in some cases, on the purchase form',
+ 'id' => $prefix . 'product_short_description',
+ 'class' => $prefix . 'projectmeta_reward_desc',
+ 'show_help' => true,
+ 'type' => 'textarea_small'
+ ),
+ array(
+ 'name' => 'Level Long Description',
+ 'desc' => 'For use on the project page and in level shortcodes/widgets',
+ 'id' => $prefix . 'product_details',
+ 'class' => $prefix . 'projectmeta_reward_desc tinymce',
+ 'show_help' => true,
+ 'type' => 'textarea_medium'
+ ),
+ array(
+ 'name' => 'Level Limit',
+ 'desc' => 'Restrict the number of buyers that can back this level',
+ 'id' => $prefix . 'product_limit',
+ 'class' => $prefix . 'projectmeta_reward_limit',
+ 'show_help' => true,
+ 'type' => 'text_small'
+ ),
+ array(
+ 'name' => 'Level Order',
+ 'desc' => 'Enter a number of 0 (first) or higher if you wish to customize the placement of this level',
+ 'id' => $prefix.'projectmeta_level_order',
+ 'class' => $prefix . 'projectmeta_reward_limit',
+ 'show_help' => true,
+ 'type' => 'text_small'
+ ),
+ array(
+ 'type' => 'level1wrapbottom',
+ 'class' => 'projectmeta_none'
+ ),
+ array(
+ 'id' => $prefix . 'level',
+ 'class' => $prefix . 'projectmeta_full new_levels',
+ 'show_help' => false,
+ 'type' => 'product_levels'
+ ),
+ array(
+ 'id' => $prefix . 'addlevels',
+ 'class' => $prefix . 'projectmeta_full new_level',
+ 'type' => 'add_levels',
+ ),
+ ),
+ );
+ $meta_boxes[] = array(
+ 'id' => 'project_timeline',
+ 'title' => 'Project Timeline',
+ 'pages' => array('ignition_product'),
+ 'context' => 'normal',
+ 'priority' => 'high',
+ 'class' => $prefix . 'projectmeta',
+ 'fields' => array(
+ array(
+ 'name' => 'A rough timeline of the overall project. Ex. March 2016 - Contractor chosen',
+ 'type' => 'description',
+ ),
+ array(
+ 'name' => 'Event 1',
+ 'type' => 'subtitle',
+ ),
+ array(
+ 'name' => 'What',
+ 'id' => $prefix . 'product_image_3',
+ 'class' => $prefix . 'projectmeta_full',
+ 'show_help' => false,
+ 'type' => 'text'
+ ),
+ array(
+ 'name' => 'When',
+ 'id' => $prefix . 'product_title_3',
+ 'class' => $prefix . 'projectmeta_full',
+ 'type' => 'text'
+ ),
+ array(
+ 'id' => $prefix . 'project_timelines',
+ 'class' => $prefix . 'projectmeta_full new_levels_3',
+ 'show_help' => false,
+ 'type' => 'project_timeline'
+ ),
+ array(
+ 'id' => $prefix . 'add_project_timeline',
+ 'class' => $prefix . 'projectmeta_full new_level_3',
+ 'type' => 'add_timeline',
+ ),
+ ),
+ );
+ $meta_boxes[] = array(
+ 'id' => 'project_invest',
+ 'title' => 'Why Invest',
+ 'pages' => array('ignition_product'),
+ 'context' => 'normal',
+ 'priority' => 'high',
+ 'class' => $prefix . 'projectmeta',
+ 'fields' => array(
+ array(
+ 'name' => 'A quantifiable reasoning behind investing in projects',
+ 'type' => 'description',
+ ),
+ array(
+ 'name' => 'Why Invest Description',
+ 'desc' => 'General description about the pronmary reason for investing in this project 200-300 characters',
+ 'id' => $prefix . 'why_invest',
+ 'class' => $prefix . 'projectmeta_full tinymce',
+ 'show_help' => false,
+ 'type' => 'textarea_medium'
+ ),
+ array(
+ 'name' => 'Health Impact',
+ 'type' => 'title',
+ ),
+ array(
+ 'name' => 'Health Rating',
+ 'id' => $prefix . 'test_select',
+ 'show_option_none' => true,
+ 'type' => 'select',
+ 'options' => array(
+ '1' => __( '1', 'cmb2' ),
+ '2' => __( '2', 'cmb2' ),
+ '3' => __( '3', 'cmb2' ),
+ '4' => __( '4', 'cmb2' ),
+ '5' => __( '5', 'cmb2' ),
+ '6' => __( '6', 'cmb2' ),
+ '7' => __( '7', 'cmb2' ),
+ '8' => __( '8', 'cmb2' ),
+ '9' => __( '9', 'cmb2' ),
+ '10' => __( '10', 'cmb2' ),
+ ),
+ ),
+ array(
+ 'name' => 'Health',
+ 'desc' => 'Describe why this project gets the health rating it has been given. Max 140 characters',
+ 'id' => $prefix . 'health',
+ 'class' => $prefix . 'projectmeta_full tinymce',
+ 'show_help' => false,
+ 'type' => 'textarea_medium'
+ ),
+ array(
+ 'name' => 'Financial Impact',
+ 'type' => 'title',
+ ),
+ array(
+ 'name' => 'Financial Rating',
+ 'id' => $prefix . 'test_select2',
+ 'show_option_none' => true,
+ 'type' => 'select',
+ 'options' => array(
+ '1' => __( '1', 'cmb2' ),
+ '2' => __( '2', 'cmb2' ),
+ '3' => __( '3', 'cmb2' ),
+ '4' => __( '4', 'cmb2' ),
+ '5' => __( '5', 'cmb2' ),
+ '6' => __( '6', 'cmb2' ),
+ '7' => __( '7', 'cmb2' ),
+ '8' => __( '8', 'cmb2' ),
+ '9' => __( '9', 'cmb2' ),
+ '10' => __( '10', 'cmb2' ),
+ ),
+ ),
+ array(
+ 'name' => 'Financial',
+ 'desc' => 'Describe why this project gets the financial rating it has been given. Max 140 characters',
+ 'id' => $prefix . 'Financial',
+ 'class' => $prefix . 'projectmeta_full tinymce',
+ 'show_help' => false,
+ 'type' => 'textarea_medium'
+ ),
+ array(
+ 'name' => 'Environmental Impact',
+ 'type' => 'title',
+ ),
+ array(
+ 'name' => 'Environmental Rating',
+ 'id' => $prefix . 'test_select1',
+ 'show_option_none' => true,
+ 'type' => 'select',
+ 'options' => array(
+ '1' => __( '1', 'cmb2' ),
+ '2' => __( '2', 'cmb2' ),
+ '3' => __( '3', 'cmb2' ),
+ '4' => __( '4', 'cmb2' ),
+ '5' => __( '5', 'cmb2' ),
+ '6' => __( '6', 'cmb2' ),
+ '7' => __( '7', 'cmb2' ),
+ '8' => __( '8', 'cmb2' ),
+ '9' => __( '9', 'cmb2' ),
+ '10' => __( '10', 'cmb2' ),
+ ),
+ ),
+ array(
+ 'name' => 'Environmental',
+ 'desc' => 'Describe why this project gets the environmental rating it has been given. Max 140 characters',
+ 'id' => $prefix . 'Environmental',
+ 'class' => $prefix . 'projectmeta_full tinymce',
+ 'show_help' => false,
+ 'type' => 'textarea_medium'
+ ),
+ array(
+ 'name' => 'Social Impact',
+ 'type' => 'title',
+ ),
+ array(
+ 'name' => 'Social Rating',
+ 'id' => $prefix . 'test_select3',
+ 'show_option_none' => true,
+ 'type' => 'select',
+ 'options' => array(
+ '1' => __( '1', 'cmb2' ),
+ '2' => __( '2', 'cmb2' ),
+ '3' => __( '3', 'cmb2' ),
+ '4' => __( '4', 'cmb2' ),
+ '5' => __( '5', 'cmb2' ),
+ '6' => __( '6', 'cmb2' ),
+ '7' => __( '7', 'cmb2' ),
+ '8' => __( '8', 'cmb2' ),
+ '9' => __( '9', 'cmb2' ),
+ '10' => __( '10', 'cmb2' ),
+ ),
+ ),
+ array(
+ 'name' => 'Social',
+ 'desc' => 'Describe why this project gets the social rating it has been given. Max 140 characters',
+ 'id' => $prefix . 'Social',
+ 'class' => $prefix . 'projectmeta_full tinymce',
+ 'show_help' => false,
+ 'type' => 'textarea_medium'
+ ),
+ ),
+ );
+ $meta_boxes[] = array(
+ 'id' => 'project_media',
+ 'title' => 'Media',
+ 'pages' => array('ignition_product'),
+ 'context' => 'normal',
+ 'priority' => 'high',
+ 'class' => $prefix . 'projectmeta',
+ 'fields' => array(
+ array(
+ 'name' => 'Featured Image 1024px x 340px',
+ 'desc' => 'First photo and thumbnail seen all over the site and posted to socail media',
+ 'id' => $prefix . 'product_image1',
+ 'class' => $prefix . 'projectmeta_full',
+ 'show_help' => false,
+ 'type' => 'file'
+ ),
+ array(
+ 'name' => 'Image 2 1024px x 340px',
+ 'desc' => 'Additonal photos to show on produc pages',
+ 'id' => $prefix . 'product_image2',
+ 'class' => $prefix . 'projectmeta_full',
+ 'show_help' => false,
+ 'type' => 'file'
+ ),
+ array(
+ 'name' => 'Image 3 1024px x 340px',
+ 'desc' => 'Additonal photos to show on produc pages',
+ 'id' => $prefix . 'product_image3',
+ 'class' => $prefix . 'projectmeta_full',
+ 'show_help' => false,
+ 'type' => 'file'
+ ),
+ array(
+ 'name' => 'Image 4 1024px x 340px',
+ 'desc' => 'Additonal photos to show on produc pages',
+ 'id' => $prefix . 'product_image4',
+ 'class' => $prefix . 'projectmeta_full',
+ 'show_help' => false,
+ 'type' => 'file'
+ ),
+ ),
+ );
+ return apply_filters('id_postmeta_boxes', $meta_boxes);
+}
+
+function override_install_ign_metaboxes() {
+ global $pagenow;
+ if ($pagenow == 'post.php' || 'post-new.php') {
+ add_filter('overrides_ign_cmb_meta_boxes', 'override_ign_meta_boxes');
+ require_once(ID_PATH.'ign_metabox/init.php');
+ require_once('project-meta-boxes.php');
+ }
+}
+remove_action('init', 'install_ign_metaboxes');
+add_action('init', 'override_install_ign_metaboxes');
+
+?>
\ No newline at end of file
diff --git a/wordpress/wp-content/themes/backer/includes/overrides/project-meta-boxes.php b/wordpress/wp-content/themes/backer/includes/overrides/project-meta-boxes.php
new file mode 100644
index 0000000000000000000000000000000000000000..f74be8cdeb709f294c42dd8e81e0754b10193f9d
--- /dev/null
+++ b/wordpress/wp-content/themes/backer/includes/overrides/project-meta-boxes.php
@@ -0,0 +1,703 @@
+_meta_box = $meta_box;
+
+ $upload = false;
+ foreach ( $meta_box['fields'] as $field ) {
+ if ( $field['type'] == 'file' || $field['type'] == 'file_list' || $field['type'] == 'wysiwyg') {
+ $upload = true;
+ break;
+ }
+ }
+
+ $current_page = substr(strrchr($_SERVER['PHP_SELF'], '/'), 1, -4);
+
+ if ( $upload && ( $current_page == 'page' || $current_page == 'page-new' || $current_page == 'post' || $current_page == 'post-new' ) ) {
+ add_action('admin_head', array(&$this, 'add_post_enctype'));
+ }
+
+ add_action( 'admin_menu', array(&$this, 'add') );
+ add_action( 'save_post', array(&$this, 'save'), 3, 2 );
+ }
+
+ function add_post_enctype() {
+ echo '
+ ';
+ }
+
+ /// Add metaboxes
+ function add() {
+ $this->_meta_box['context'] = empty($this->_meta_box['context']) ? 'normal' : $this->_meta_box['context'];
+ $this->_meta_box['priority'] = empty($this->_meta_box['priority']) ? 'high' : $this->_meta_box['priority'];
+ foreach ($this->_meta_box['pages'] as $page) {
+ add_meta_box($this->_meta_box['id'], $this->_meta_box['title'], array(&$this, 'show'), $page, $this->_meta_box['context'], $this->_meta_box['priority']);
+ }
+ }
+
+ // Show fields
+ function show() {
+ global $post;
+
+ // Use nonce for verification
+ echo '
';
+ echo '