<?php class CFSingleProductAdmin { public static function crowdfunding_admin_singleproduct_tab($settings_tabs) { $settings_tabs['crowdfunding_singleproduct'] = __('Single Product Page', 'galaxyfunder'); return $settings_tabs; } public static function crowdfunding_singleproduct_admin_options() { return apply_filters('woocommerce_crowdfunding_singleproduct_settings', array( array( 'name' => __('[displayperk]- Shortcode for displaying Perk Table', 'galaxyfunder'), 'type' => 'title', 'desc' => '', 'id' => '_perk_shortcode_text' ), array( 'name' => __('Contribution Table Settings', 'galaxyfunder'), 'type' => 'title', 'desc' => '', 'id' => '_donation_text' ), array( 'name' => __('Contribution Table Show/Hide', 'galaxyfunder'), 'desc' => __('This Controls the Contribution Table Show or Hide', 'galaxyfunder'), 'id' => 'cf_display_donation_table', 'css' => 'min-width:150px;', 'std' => 'on', // WooCommerce < 2.0 'default' => 'on', // WooCommerce >= 2.0 'newids' => 'cf_display_donation_table', 'type' => 'select', 'options' => array( 'on' => __('Show', 'woocommerce'), 'off' => __('Hide', 'woocommerce'), ), ), array( 'name' => __('S.No Label', 'galaxyfunder'), 'desc' => __('Change S.No Caption in Single Product Page by your Custom Words', 'galaxyfunder'), 'tip' => '', 'id' => 'cf_serial_number_label', 'css' => 'min-width:550px;', 'std' => 'S.No', 'type' => 'text', 'newids' => 'cf_serial_number_label', 'desc_tip' => true, ), array( 'name' => __('S.No Column Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide Serial Number Column in Front End', 'galaxyfunder'), 'id' => 'cf_serial_number_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_serial_number_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Contributor Label', 'galaxyfunder'), 'desc' => __('Change Contributor Caption in Single Product Page by your Custom Words', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_contributor_label', 'std' => 'Contributor', 'type' => 'text', 'newids' => 'cf_contributor_label', 'desc_tip' => true, ), array( 'name' => __('Contributor Column Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide Contributor Name Column in Front End', 'galaxyfunder'), 'id' => 'cf_contributor_name_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_contributor_name_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Contributor Email ID Label', 'galaxyfunder'), 'desc' => __('Change Contributor Email ID Caption in Single Product Page by your Custom Words', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_contributor_email_label', 'std' => 'Email ID', 'type' => 'text', 'newids' => 'cf_contributor_email_label', 'desc_tip' => true, ), array( 'name' => __('Contributor Email ID Column Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide Contributor Email ID Column in Front End', 'galaxyfunder'), 'id' => 'cf_contributor_email_show_hide', 'css' => 'min-width:150px;', 'std' => '2', // WooCommerce < 2.0 'default' => '2', // WooCommerce >= 2.0 'newids' => 'cf_contributor_email_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Contribution Label', 'galaxyfunder'), 'desc' => __('Change Contribution Caption in Single Product Page by your Custom Words', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_donation_label', 'std' => 'Contribution', 'type' => 'text', 'newids' => 'cf_donation_label', 'desc_tip' => true, ), array( 'name' => __('Contribution Column Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide Contribution Column in Front End', 'galaxyfunder'), 'id' => 'cf_contribution_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_contribution_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Perk Name Label', 'galaxyfunder'), 'desc' => __('Change Perk Name Caption in Single Product Page by your Custom Words', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_perk_name_label', 'std' => 'Perk Name', 'type' => 'text', 'newids' => 'cf_perk_name_label', 'desc_tip' => true, ), array( 'name' => __('Perk Name Column Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide Perk Name Column in Front End', 'galaxyfunder'), 'id' => 'cf_perk_name_column_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_perk_name_column_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Perk Amount Label', 'galaxyfunder'), 'desc' => __('Change Perk Amount Caption in Single Product Page by your Custom Words', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_perk_amount_label', 'std' => 'Perk Amount', 'type' => 'text', 'newids' => 'cf_perk_amount_label', 'desc_tip' => true, ), array( 'name' => __('Perk Amount Column Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide Perk Amount Column in Front End', 'galaxyfunder'), 'id' => 'cf_perk_amount_column_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_perk_amount_column_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Perk Quantity Label', 'galaxyfunder'), 'desc' => __('Change Perk Quantity Column in Single Product Page by your Custom Words', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_perk_quantity_label', 'std' => 'Perk Quantity', 'type' => 'text', 'newids' => 'cf_perk_quantity_label', 'desc_tip' => true, ), array( 'name' => __('Perk Quantity Column Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide Perk Quantity Column in Front End Single Product Page', 'galaxyfunder'), 'tip' => '', 'id' => 'cf_perk_quantity_column_show_hide', 'css' => 'min-width:150px;', 'std' => '2', 'default' => '2', 'newids' => 'cf_perk_quantity_column_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Date Label', 'galaxyfunder'), 'desc' => __('Change Date Caption in Single Product Page by your Custom Words', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_date_label', 'std' => 'Date', 'type' => 'text', 'newids' => 'cf_date_label', 'desc_tip' => true, ), array( 'name' => __('Date Column Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide Date Column in Front End', 'galaxyfunder'), 'id' => 'cf_date_column_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_date_column_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Contribution Table Position', 'galaxyfunder'), 'type' => 'radio', 'desc' => '', 'id' => 'cf_donation_table_position', 'options' => array('1' => 'Before Single Product', '2' => 'After Single Product', '3' => 'After Single Product Summary'), 'class' => 'cf_donation_table_position', 'std' => '3', 'newids' => 'cf_donation_table_position', ), array('type' => 'sectionend', 'id' => '_donation_text'), array( 'name' => __('Perk Table Settings', 'galaxyfunder'), 'type' => 'title', 'desc' => '', 'id' => '_cf_perk_table_text' ), array( 'name' => __('Perk Table Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide Perk Table in Front End', 'galaxyfunder'), 'id' => 'cf_perk_table_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_perk_table_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Perk Heading Label', 'galaxyfunder'), 'desc' => __('Change the Head Label in the Single Product Page', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_perk_head_label', 'std' => 'Which perk would you like?', 'type' => 'text', 'newids' => 'cf_perk_head_label', 'desc_tip' => true, ), array( 'name' => __('No Perk Label', 'galaxyfunder'), 'desc' => __('Change the No Perk Label in Single Product Page', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_no_perk_label', 'std' => 'No perk, I just want to contribute.', 'type' => 'text', 'newids' => 'cf_no_perk_label', 'desc_tip' => true, ), array( 'name' => __('Out of Claimed Label', 'galaxyfunder'), 'desc' => __('Change the Out of Claimed Label in Single Product Page', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_out_of_claimed_label', 'std' => 'claimed out of', 'type' => 'text', 'newids' => 'cf_out_of_claimed_label', 'desc_tip' => true, ), array( 'name' => __('Out of Claimed Label for Unlimited Perks', 'galaxyfunder'), 'desc' => __('Change the Out of Claimed Label for Unlimited Perks in Single Product Page', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_out_of_claimed_unlimited_label', 'std' => 'Perks claimed', 'type' => 'text', 'newids' => 'cf_out_of_claimed_unlimited_label', 'desc_tip' => true, ), array( 'name' => __('Estimated Delivery Label', 'galaxyfunder'), 'desc' => __('Change the Estimated Delivery Label in Single Product Page', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_estimated_delivery_label', 'std' => 'Estimated Delivery:', 'type' => 'text', 'newids' => 'cf_estimated_delivery_label', 'desc_tip' => true, ), array( 'name' => __('Perk Table Position', 'galaxyfunder'), 'type' => 'radio', 'desc' => '', 'id' => 'cf_perk_table_position', 'options' => array('1' => 'Before Single Product', '2' => 'After Single Product', '3' => 'After Single Product Summary'), 'class' => 'cf_perk_table_position', 'std' => '3', 'newids' => 'cf_perk_table_position', ), array( 'name' => __('Perk Selection Type', 'galaxyfunder'), 'type' => 'radio', 'desc' => '', 'id' => 'cf_perk_selection_type', 'options' => array('1' => __('Single Selection', 'galaxyfunder'), '2' => __('Multiple Selection', 'galaxyfunder')), 'class' => 'cf_perk_selection_type', 'std' => '1', 'newids' => 'cf_perk_selection_type', ), array( 'name' => __('Perk Quantity Selection', 'galaxyfunder'), 'type' => 'radio', 'desc' => '', 'id' => 'cf_perk_quantity_selection', 'options' => array('1' => __('Enable', 'galaxyfunder'), '2' => __('Disable', 'galaxyfunder')), 'class' => 'cf_perk_quantity_selection', 'std' => '2', 'newids' => 'cf_perk_quantity_selection', ), array( 'name' => __('Perk Quantity Display Position', 'galaxyfunder'), 'type' => 'radio', 'desc' => '', 'id' => 'cf_perk_quantity_display_selection', 'options' => array('1' => __('Top Left', 'galaxyfunder'), '2' => __('Top Right', 'galaxyfunder'), '3' => __('Bottom Left', 'galaxyfunder'), '4' => __('Bottom Right', 'galaxyfunder')), 'class' => 'cf_perk_quantity_display_selection', 'std' => '1', 'newids' => 'cf_perk_quantity_display_selection', ), array('type' => 'sectionend', 'id' => '_cf_perk_table_text'), array( 'name' => __('Author Info Settings', 'galaxyfunder'), 'type' => 'title', 'desc' => '', 'id' => '_cf_authorinfo_settings' ), array( 'name' => __('Author Info Heading', 'galaxyfunder'), 'desc' => __('Customize the Author Info Heading', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_author_info_heading', 'std' => 'Campaign Creator', 'type' => 'text', 'newids' => 'cf_author_info_heading', 'desc_tip' => true, ), array( 'name' => __('Author Info Table Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Author Info Entire Table', 'galaxyfunder'), 'id' => 'cf_author_table_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_author_table_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Author Info Table Position', 'galaxyfunder'), 'type' => 'radio', 'desc' => '', 'id' => 'cf_author_info_table_position', 'options' => array('1' => 'Before Single Product', '2' => 'After Single Product', '3' => 'After Single Product Summary'), 'class' => 'cf_author_info_table_position', 'std' => '3', 'newids' => 'cf_author_info_table_position', ), array( 'name' => __('Display Profile when BuddyPress is Active', 'galaxyfunder'), 'desc' => __('Show or Hide the Profile Link of BuddyPress when it is in active', 'galaxyfunder'), 'id' => 'cf_check_buddypress_link_is_active', 'css' => 'min-width:150px;', 'std' => '1', 'default' => '1', 'newids' => 'cf_check_buddypress_link_is_active', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ) ), array( 'name' => __('Avatar Size', 'galaxyfunder'), 'desc' => __('Customize the Avatar Size by providing common value for width as well as height in pixel', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_avatar_width_height', 'std' => '150', 'type' => 'text', 'newids' => 'cf_avatar_width_height', 'desc_tip' => true, ), array( 'name' => __('Avatar Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Avatar in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_avatar_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_avatar_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Author Name Label', 'galaxyfunder'), 'desc' => __('Customize the Author Name Label', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_author_name_label', 'std' => 'Name', 'type' => 'text', 'newids' => 'cf_author_name_label', 'desc_tip' => true, ), array( 'name' => __('Author Name Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Author Name in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_author_name_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_author_name_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Author Nick Name Label', 'galaxyfunder'), 'desc' => __('Customize the Author Nick Name Label', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_author_nick_name_label', 'std' => 'Nick Name', 'type' => 'text', 'newids' => 'cf_author_nick_name_label', 'desc_tip' => true, ), array( 'name' => __('Author Nick Name Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Author Name in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_author_nick_name_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_author_nick_name_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Author Email Label', 'galaxyfunder'), 'desc' => __('Customize the Author Email Label', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_author_email_label', 'std' => 'Email', 'type' => 'text', 'newids' => 'cf_author_email_label', 'desc_tip' => true, ), array( 'name' => __('Author Email Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Author Email in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_author_email_show_hide', 'css' => 'min-width:150px;', 'std' => '2', // WooCommerce < 2.0 'default' => '2', // WooCommerce >= 2.0 'newids' => 'cf_author_email_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('About Author/Biography Label', 'galaxyfunder'), 'desc' => __('Customize the Author Email Label', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_author_biography_label', 'std' => 'Biography', 'type' => 'text', 'newids' => 'cf_author_biography_label', 'desc_tip' => true, ), array( 'name' => __('About Author/Biography Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Author Biography in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_author_biography_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_author_biography_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Display Country when UserPro is Active', 'galaxyfunder'), 'desc' => __('Show or Hide the Country of UserPro when it is in active', 'galaxyfunder'), 'id' => 'cf_check_userpro_country_is_active', 'css' => 'min-width:150px;', 'std' => '1', 'default' => '1', 'newids' => 'cf_check_userpro_country_is_active', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ) ), array( 'name' => __('Author Country Label', 'galaxyfunder'), 'desc' => __('Customize Author Country Label', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_author_country_label', 'std' => 'Country', 'type' => 'text', 'newids' => 'cf_author_country_label', 'desc_tip' => true, ), array( 'name' => __('Author Country Show/Hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Author Country in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_author_country_show_hide', 'css' => 'min-width:150px;margin-bottom:80px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_author_country_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array('type' => 'sectionend', 'id' => '_cf_authorinfo_settings'), array( 'name' => __('Single Product Page Label', 'galaxyfunder'), 'type' => 'title', 'desc' => '', 'id' => '_cf_product_button_text' ), array( 'name' => __('Minimum Contribution Label', 'galaxyfunder'), 'desc' => __('Please Enter Minimum Contribution Label for Product Page', 'galaxyfunder'), 'tip' => '', 'id' => 'crowdfunding_min_price_tab_product', 'css' => 'min-width:550px;', 'std' => 'Minimum Contribution', 'type' => 'text', 'newids' => 'crowdfunding_min_price_tab_product', 'desc_tip' => true, ), array( 'name' => __('Maximum Contribution Label', 'galaxyfunder'), 'desc' => __('Please Enter Maximum Contribution Label for Campaign', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'crowdfunding_maximum_price_tab_product', 'std' => 'Maximum Contribution', 'type' => 'text', 'newids' => 'crowdfunding_maximum_price_tab_product', 'desc_tip' => true, ), array( 'name' => __('Goal Label', 'galaxyfunder'), 'desc' => __('Please Enter Goal Label for Campaign', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'crowdfunding_target_price_tab_product', 'std' => 'Goal', 'type' => 'text', 'newids' => 'crowdfunding_target_price_tab_product', 'desc_tip' => true, ), array( 'name' => __('CrowdFunding Label', 'galaxyfunder'), 'desc' => __('Please Enter CrowdFunding Label', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'crowdfunding_payyourprice_price_tab_product', 'std' => 'Contribution', 'type' => 'text', 'newids' => 'crowdfunding_payyourprice_price_tab_product', 'desc_tip' => true, ), array( 'name' => __('Total Contribution Label', 'galaxyfunder'), 'desc' => __('Please Enter Total Contribution Label', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'crowdfunding_totalprice_label', 'std' => 'Raised', 'type' => 'text', 'newids' => 'crowdfunding_totalprice_label', 'desc_tip' => true, ), array( 'name' => __('Total Contribution Percent Label', 'galaxyfunder'), 'desc' => __('Please Enter Total Contribution Percent Label', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'crowdfunding_totalprice_percent_label', 'std' => 'Percent', 'type' => 'text', 'newids' => 'crowdfunding_totalprice_percent_label', 'desc_tip' => true, ), /* Contributor Name Field with Show/Hide Option in Galaxy Funder */ array( 'name' => __('Contributor Name Label', 'galaxyfunder'), 'desc' => __("Please Enter Contribution Name Field Label in Single Product Page", 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_contributor_name_caption', 'std' => 'Contributor Name: ', 'type' => 'text', 'newids' => 'cf_contributor_name_caption', 'desc_tip' => true, ), array( 'name' => __('Contributor Name Description', 'galaxyfunder'), 'desc' => __('Please Enter Description of Contributor Name Field in Single Product Page', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;', 'id' => 'cf_contributor_name_description', 'std' => '(First and Last Name will be used if left empty)', 'type' => 'text', 'newids' => 'cf_contributor_name_description', 'desc_tip' => true ), array( 'name' => __('Display Contributor Name Field in Frontend', 'galaxyfunder'), 'desc' => __('Show or Hide Contributor Name Field in Frontend', 'galaxyfunder'), 'id' => 'cf_check_show_hide_contributor_name', 'css' => 'min-width:150px;margin-bottom:80px;', 'std' => '2', 'default' => '2', 'newids' => 'cf_check_show_hide_contributor_name', 'type' => 'select', 'desc_tip' => true, 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ) ), /* Contributor Name Field End with Show/Hide Option in Galaxy Funder */ array( 'name' => __('Inbuilt Design', 'galaxyfunder'), 'desc' => __('Please Select you want to load the Inbuilt Design', 'galaxyfunder'), 'tip' => '', 'id' => 'cf_inbuilt_design', 'css' => '', 'std' => '1', 'type' => 'radio', 'options' => array('1' => 'Inbuilt Design'), 'newids' => 'cf_inbuilt_design', 'desc_tip' => true, ), array( 'name' => __('Select Inbuilt Design', 'galaxyfunder'), 'desc' => __('This helps to load the inbuilt type', 'galaxyfunder'), 'id' => 'load_inbuilt_design', 'css' => 'min-width:150px;', 'std' => '2', // WooCommerce < 2.0 'default' => '2', // WooCommerce >= 2.0 'newids' => 'load_inbuilt_design', 'type' => 'select', 'options' => array( '1' => __('Minimal Style', 'galaxyfunder'), '2' => __('IGG Style', 'galaxyfunder'), '3' => __('KS Style', 'galaxyfunder'), ), ), array( 'name' => __('Select Progress Bar Style', 'galaxyfunder'), 'desc' => __('This helps to select the Progress bar Style', 'galaxyfunder'), 'id' => 'single_product_prog_bar_type', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'single_product_prog_bar_type', 'type' => 'select', 'options' => array( '1' => __('Style 1', 'galaxyfunder'), '2' => __('Style 2', 'galaxyfunder'), ), ), array( 'name' => __('Raised Campaign Amount Show/hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Raised Amount Value in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_raised_amount_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_raised_amount_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Raised Camapaign Percentage Show/hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Raised Percentage in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_raised_percentage_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_raised_percentage_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Target Days Left Show/hide', 'galaxyfunder'), 'desc' => __('Show or Hide Days Left in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_day_left_show_hide', 'css' => 'min-width:150px;', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_day_left_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Number of Funders Details Show/hide', 'galaxyfunder'), 'desc' => __('Show or Hide the Funders count in a Single Product Page', 'galaxyfunder'), 'id' => 'cf_funders_count_show_hide', 'css' => 'min-width:150px;margin-bottom:40px', 'std' => '1', // WooCommerce < 2.0 'default' => '1', // WooCommerce >= 2.0 'newids' => 'cf_funders_count_show_hide', 'type' => 'select', 'options' => array( '1' => __('Show', 'galaxyfunder'), '2' => __('Hide', 'galaxyfunder'), ), ), array( 'name' => __('Inbuilt CSS (Non Editable)', 'galaxyfunder'), 'desc' => __('These are element IDs for the Contribution Table', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;min-height:260px;margin-bottom:80px;', 'id' => 'cf_single_product_contribution_table_default_css', 'std' => ' #cf_update_total_funderers {display:none;} #cf_target_price_labelers {display:none;} #cf_total_raised_in_percentage { display:none; } #cf_total_price_raiser {display:none;} #cf_days_remainings {display:none;} #cf_days_remaining {display:none;} #cf_min_price_label { display:none; } #cf_max_price_label { display:none; } #cf_target_price_label { display:none; } #cf_total_price_raised {display:none;} #cf_total_price_in_percentage_with_bar {display:none;} #cf_total_price_in_percentage {display:none;} #single_product_contribution_table{ } #cf_serial_number_label{ } #cf_contributor_label{ } #cf_contributor_email_label{ } #cf_contribution_label{ } #cf_date_label{ } #serial_id{ } #cf_billing_first_name{ } #cf_billing_email{ } #cf_order_total{ } #cf_target_price_labels{ margin-bottom:0px; } #cf_total_price_raise{ float:left; } #cf_total_price_raise span {font-size:30px; } #cf_total_price_in_percent{ } #cf_total_price_in_percent_with_bar{width: 100%; height:12px; background-color: #ffffff; border-radius:10px; border:1px solid #000000; clear:both; } #cf_percent_bar{ height:10px; border-radius:10px; background-color: green; } #cf_price_new_date_remain small { font-style:italic; } #cf_price_new_date_remain { margin-bottom:0px; float:left; } #singleproductinputfieldcrowdfunding{color:green; } #cf_target_price_labels {font-style:italic; font-size:20px; } #cf_update_total_funders {margin-bottom:0px; float:right; } #cf_total_raised_percentage {float:right; font-size:30px !important; margin-bottom:0px; }', 'type' => 'textarea', 'newids' => 'cf_single_product_contribution_table_default_css', 'desc_tip' => true, ), array( 'name' => __('Custom Design', 'galaxyfunder'), 'desc' => __('Please Select you want to load the Custom Design', 'galaxyfunder'), 'tip' => '', 'id' => 'cf_inbuilt_design', 'css' => '', 'std' => '1', 'type' => 'radio', 'options' => array('2' => 'Custom Design'), 'newids' => 'cf_inbuilt_design', 'desc_tip' => true, ), array( 'name' => __('Custom CSS', 'galaxyfunder'), 'desc' => __('Customize the following element IDs of Frontend Campaign Submission form', 'galaxyfunder'), 'tip' => '', 'css' => 'min-width:550px;min-height:260px;margin-bottom:80px;', 'id' => 'cf_single_product_contribution_table_custom_css', 'std' => '', 'type' => 'textarea', 'newids' => 'cf_single_product_contribution_table_custom_css', 'desc_tip' => true, ), array('type' => 'sectionend', 'id' => '_cf_product_button_text'), array( 'name' => __('Social Settings', 'galaxyfunder'), 'type' => 'title', 'desc' => __('Here you can customize social settings', 'galaxyfunder'), 'id' => '_crowdfunding_social_settings' ), array( 'name' => __('Social Buttons Position', 'galaxyfunder'), 'desc' => __('This helps to Position CrowdFunding Social Buttons in Different Places', 'galaxyfunder'), 'id' => '_crowdfunding_social_button_position', 'css' => 'min-width:150px;', 'std' => '5', 'default' => '5', 'desc_tip' => true, 'newids' => '_crowdfunding_social_button_position', 'type' => 'select', 'options' => array( '1' => __('Before Single Product', 'galaxyfunder'), '2' => __('Before Single Product Summary', 'galaxyfunder'), '3' => __('Single Product Summary', 'galaxyfunder'), '4' => __('After Single Product', 'galaxyfunder'), '5' => __('After Single Product Summary', 'galaxyfunder'), ), ), array('type' => 'sectionend', 'id' => '_crowdfunding_social_settings'), )); } public static function crowdfunding_process_singleproduct_admin_settings() { woocommerce_admin_fields(CFSingleProductAdmin::crowdfunding_singleproduct_admin_options()); } public static function crowdfunding_process_singleproduct_update_settings() { woocommerce_update_options(CFSingleProductAdmin::crowdfunding_singleproduct_admin_options()); } public static function crowdfunding_singleproduct_default_settings() { global $woocommerce; foreach (CFSingleProductAdmin::crowdfunding_singleproduct_admin_options() as $setting) { if (isset($setting['newids']) && ($setting['std'])) { if (get_option($setting['newids']) == FALSE) { add_option($setting['newids'], $setting['std']); } } } } public static function cf_singleproduct_reset_values() { global $woocommerce; if (isset($_POST['reset'])) { foreach (CFSingleProductAdmin::crowdfunding_singleproduct_admin_options() as $setting) if (isset($setting['newids']) && ($setting['std'])) { delete_option($setting['newids']); add_option($setting['newids'], $setting['std']); } } } public static function crowdfunding_social_promotion() { global $woocommerce; global $post; ?> <style type="text/css"> .fb_edge_widget_with_comment span.fb_edge_comment_widget iframe.fb_ltr { display: none !important; } .fb-like{ height: 20px !important; overflow: hidden !important; } </style> <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({ appId: "", xfbml: true, version: 'v2.0' }); }; //console.log('loaded script . . . . . '); (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) { return; } js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); //console.log('script loaded');</script> <script> !function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = "https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); } }(document, "script", "twitter-wjs");</script> <script> var originalCallback = function(o) { console.log(o); console.log('original callback - ' + o.state); var state = o.state; return false; };</script> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"> </script> <style type="text/css"> .fb_iframe_widget { display:inline-flex !important; } .twitter-share-button { width:88px !important; } </style> <?php $enablesharing = get_post_meta($post->ID, '_crowdfundingsocialsharing', true); if ($enablesharing == 'yes') { ?> <table style="display:inline;"> <tr> <?php $enablesharing_facebook = get_post_meta($post->ID, '_crowdfundingsocialsharing_facebook', true); if($enablesharing_facebook == 'yes'){ ?> <td> <div class="fb-like" data-href="<?php echo get_permalink(); ?>" data-layout="button_count" data-action="like" data-show-faces="true" data-share="false"></div></td> <?php } ?> <?php $enablesharing_twitter = get_post_meta($post->ID, '_crowdfundingsocialsharing_twitter', true); if($enablesharing_twitter == 'yes'){ ?> <td><a href="https://twitter.com/share" class="twitter-share-button" data-href="<?php echo get_permalink(); ?>" data-lang="en">Tweet</a></td> <?php } ?> <?php $enablesharing_google = get_post_meta($post->ID, '_crowdfundingsocialsharing_google', true); if($enablesharing_google == 'yes'){ ?> <td> <g:plusone annotation="bubble" class="google-plus-one" href='<?php echo get_permalink(); ?>'></g:plusone></td> <?php } ?> </tr> </table> <?php } } public static function show_hide_options_for_selected_styles() { ?> <script type="text/javascript"> jQuery(document).ready(function () { var selected_style = jQuery('#load_inbuilt_design').val(); if (selected_style == '1') { jQuery('#cf_day_left_show_hide').parent().parent().hide(); jQuery('#cf_funders_count_show_hide').parent().parent().hide(); } else if (selected_style == '2') { jQuery('#cf_day_left_show_hide').parent().parent().show(); jQuery('#cf_funders_count_show_hide').parent().parent().show(); jQuery('#cf_raised_amount_show_hide').parent().parent().show(); jQuery('#cf_raised_percentage_show_hide').parent().parent().show(); } else { jQuery('#cf_raised_percentage_show_hide').parent().parent().hide(); } jQuery('#load_inbuilt_design').change(function () { var selected_styles = jQuery('#load_inbuilt_design').val(); if (selected_styles == '1') { jQuery('#cf_day_left_show_hide').parent().parent().hide(); jQuery('#cf_funders_count_show_hide').parent().parent().hide(); jQuery('#cf_raised_amount_show_hide').parent().parent().show(); jQuery('#cf_raised_percentage_show_hide').parent().parent().show(); } if (selected_styles == '2') { jQuery('#cf_day_left_show_hide').parent().parent().show(); jQuery('#cf_funders_count_show_hide').parent().parent().show(); jQuery('#cf_raised_amount_show_hide').parent().parent().show(); jQuery('#cf_raised_percentage_show_hide').parent().parent().show(); } if (selected_styles == '3') { jQuery('#cf_day_left_show_hide').parent().parent().show(); jQuery('#cf_funders_count_show_hide').parent().parent().hide(); jQuery('#cf_raised_amount_show_hide').parent().parent().show(); jQuery('#cf_raised_percentage_show_hide').parent().parent().show(); } //alert(jQuery('#load_inbuilt_design').val()); // alert("hai"); }); //alert(selected_style); }); </script> <?php } } new CFSingleProductAdmin(); add_action('woocommerce_update_options_crowdfunding_singleproduct', array('CFSingleProductAdmin', 'crowdfunding_process_singleproduct_update_settings')); add_action('init', array('CFSingleProductAdmin', 'crowdfunding_singleproduct_default_settings')); add_action('woocommerce_cf_settings_tabs_crowdfunding_singleproduct', array('CFSingleProductAdmin', 'crowdfunding_process_singleproduct_admin_settings')); add_filter('woocommerce_cf_settings_tabs_array', array('CFSingleProductAdmin', 'crowdfunding_admin_singleproduct_tab'), 100); add_action('admin_init', array('CFSingleProductAdmin', 'cf_singleproduct_reset_values'), 2); add_action('admin_head', array('CFSingleProductAdmin', 'show_hide_options_for_selected_styles')); if (get_option('_crowdfunding_social_button_position') == '1') { add_action('woocommerce_before_single_product', array('CFSingleProductAdmin', 'crowdfunding_social_promotion')); } elseif (get_option('_crowdfunding_social_button_position') == '2') { add_action('woocommerce_before_single_product_summary', array('CFSingleProductAdmin', 'crowdfunding_social_promotion')); } elseif (get_option('_crowdfunding_social_button_position') == '3') { add_action('woocommerce_single_product_summary', array('CFSingleProductAdmin', 'crowdfunding_social_promotion')); } elseif (get_option('_crowdfunding_social_button_position') == '4') { add_action('woocommerce_after_single_product', array('CFSingleProductAdmin', 'crowdfunding_social_promotion')); } else { add_action('woocommerce_after_single_product_summary', array('CFSingleProductAdmin', 'crowdfunding_social_promotion')); } ?>