Esempio n. 1
0
 function shoestrap_module_advanced_options($sections)
 {
     // Advanced Settings
     $section = array('title' => __('Advanced', 'shoestrap'), 'icon' => 'el-icon-cogs icon-large');
     $fields[] = array('title' => __('Excerpt type', 'shoestrap'), 'desc' => __('Choose how the excerpts should be displayed on the home page, blog and archive pages.', 'shoestrap'), 'id' => 'post_excerpt_type', 'type' => 'button_set', 'options' => array('truncated' => 'Truncated', 'full' => 'Full Text'), 'default' => 'truncated');
     $fields[] = array('title' => __('Excerpt length', 'shoestrap'), 'desc' => __('Choose how many words should be used for truncated excerpts.', 'shoestrap'), 'id' => 'post_excerpt_length', 'default' => 55, 'min' => 10, 'step' => 1, 'max' => 300, 'edit' => 1, 'type' => 'slider', 'required' => array('post_excerpt_type', '=', array('truncated')));
     $fields[] = array('title' => __('"Read more" text', 'shoestrap'), 'desc' => __('Text to replace Read More', 'shoestrap'), 'id' => 'post_excerpt_link_text', 'default' => __('Continued', 'roots'), 'compiler' => true, 'type' => 'text');
     $fields[] = array('title' => __('Smooth scrolling', 'shoestrap'), 'desc' => __('Enable smooth scrolling with the mouse.', 'shoestrap'), 'id' => 'ac_smooth_scrolling', 'default' => 1, 'type' => 'switch');
     $fields[] = array('title' => __('Sticky sidebars for Portfolio pages', 'shoestrap'), 'desc' => __('Allow the sidebar on Portfolio pages to stick to the side of the screen.', 'shoestrap'), 'id' => 'ac_sticky_sidebars', 'default' => 1, 'type' => 'switch');
     $fields[] = array('title' => __('Page load fade in', 'shoestrap'), 'desc' => __('Enable subtle loading transitions.', 'shoestrap'), 'id' => 'ac_fade_in_toggle', 'default' => 1, 'type' => 'switch');
     $fields[] = array('title' => __('Select pagination style', 'shoestrap'), 'desc' => __('Switch between Next/Prev buttons or Page Number pagination.', 'shoestrap'), 'id' => 'pagination', 'type' => 'button_set', 'options' => array('pager' => 'Default Pager', 'pagination' => 'Default Pagination'), 'default' => 'pager', 'customizer' => array());
     $fields[] = array('title' => __('Enable Retina mode', 'shoestrap'), 'desc' => __('Images will be served at 2x size for retina devices.  Requires images to be uploaded at 2x the typical size desired.', 'shoestrap'), 'id' => 'retina_toggle', 'default' => 1, 'type' => 'switch', 'customizer' => array());
     $fields[] = array('title' => __('Google Analytics ID', 'shoestrap'), 'desc' => __('Paste your Google Analytics ID here to enable analytics tracking.  Only non-admin users will be tracked.  Only Universal Analytics properties. Your user ID should be in the form of UA-XXXXX-Y.', 'shoestrap'), 'id' => 'analytics_id', 'default' => '', 'type' => 'text');
     $fields[] = array('title' => 'Border-Radius and Padding Base', 'id' => 'help2', 'desc' => __('The following settings affect various areas of your site, most notably buttons.', 'shoestrap'), 'type' => 'info');
     $fields[] = array('title' => __('Border-Radius', 'shoestrap'), 'desc' => __('You can adjust the corner-radius of all elements in your site here. This will affect buttons, navbars, widgets and many more. Default: 4', 'shoestrap'), 'id' => 'general_border_radius', 'default' => 4, 'min' => 0, 'step' => 1, 'max' => 50, 'advanced' => true, 'compiler' => true, 'type' => 'slider');
     $fields[] = array('title' => __('Padding Base', 'shoestrap'), 'desc' => __('You can adjust the padding base. Default: 8', 'shoestrap'), 'id' => 'padding_base', 'default' => 8, 'min' => 0, 'step' => 1, 'max' => 20, 'advanced' => true, 'compiler' => true, 'type' => 'slider');
     if (ac_woocommerce_is_active()) {
         $fields[] = array('title' => __('WooCommerce Shop Columns', 'shoestrap'), 'desc' => __('Set the number of columns for the shop', 'shoestrap'), 'id' => 'wc_shop_cols', 'default' => 3, 'min' => 1, 'step' => 1, 'max' => 6, 'advanced' => true, 'type' => 'slider');
     }
     $fields[] = array('title' => __('Custom CSS', 'shoestrap'), 'desc' => __('You can write your custom CSS here. This code will appear in a script tag appended in the header section of the page.', 'shoestrap'), 'id' => 'user_css', 'default' => '', 'type' => 'ace_editor', 'mode' => 'css', 'theme' => 'monokai');
     $fields[] = array('title' => __('Custom LESS', 'shoestrap'), 'desc' => __('You can write your custom LESS here. This code will be compiled with the other LESS files of the theme and be appended to the header.', 'shoestrap'), 'id' => 'user_less', 'default' => '', 'type' => 'ace_editor', 'mode' => 'less', 'theme' => 'monokai', 'compiler' => true);
     $fields[] = array('title' => __('Custom JS', 'shoestrap'), 'desc' => __('You can write your custom JavaScript/jQuery here. Include <script> tags.', 'shoestrap'), 'id' => 'user_js', 'default' => '', 'type' => 'ace_editor', 'mode' => 'javascript', 'theme' => 'monokai');
     $fields[] = array('title' => __('Minimize CSS', 'shoestrap'), 'desc' => __('Minimize the generated CSS. This should be ON for production sites. Default: OFF.', 'shoestrap'), 'id' => 'minimize_css', 'default' => 0, 'compiler' => true, 'customizer' => array(), 'type' => 'switch');
     $section['fields'] = $fields;
     $section = apply_filters('shoestrap_module_advanced_options_modifier', $section);
     $sections[] = $section;
     return $sections;
 }
function ac_woocommerce_set_image_sizes()
{
    // Only do this if WooCommerce is active
    if (ac_woocommerce_is_active()) {
        // Don't do if done before
        $ac_wc_images_sizes_set = get_option('ac_wc_images_sizes_set');
        if ($ac_wc_images_sizes_set !== '1') {
            // Update the values
            update_option('shop_catalog_image_size', array('width' => '768', 'height' => '512', 'crop' => true));
            update_option('shop_single_image_size', array('width' => '768', 'height' => '768', 'crop' => false));
            update_option('shop_thumbnail_image_size', array('width' => '90', 'height' => '90', 'crop' => true));
            // Set that this has been done
            update_option('ac_wc_images_sizes_set', '1');
        }
    }
}
Esempio n. 3
0
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-image.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-text-block.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-block-quote.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-featured-post.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-posts-builder-base.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-posts.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-portfolio.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-testimonials.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-people.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-client.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-button.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-galleries.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-gallery.php';
    require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-google-map.php';
    // Check if WooCommerce is active
    if (ac_woocommerce_is_active()) {
        // If WooCommerce is active include the AC Product
        require_once AC_FRAMEWORK_PATH . '/vc-plugins/ac-product.php';
    }
}
/* LOAD FRONTEND & BACKEND INCLUDES
------------------------------------------------------------------- */
if (is_admin()) {
    // Back end
    require_once AC_FRAMEWORK_PATH . '/dd-gallery/dd-gallery-admin.php';
} else {
    // Front end
}
// Some files needs to be front and back, for VC front-end editing, etc.
require_once AC_FRAMEWORK_PATH . '/dd-gallery/dd-gallery-render.php';
/* LOAD STYLESHEETS
function ac_demo_data_for_redux()
{
    ob_start();
    /*
    	 echo '<div id="ac_demo_data_default_section_group' . '" class="redux-group-tab">';
    	  echo '<h3>' . __( 'Import Demo Data Page', 'ac' ) . '</h3>';
    */
    ?>
                 
	  <div class="ac-setup-options">
			<div class="ac-setup-option">
				<img src="<?php 
    echo AC_TEMPLATE_URI;
    ?>
/assets/img/setup_demo.gif" alt="Demo Data" height="100%" width="100%"/>
				<h2><?php 
    _e('Import Demo Data', 'roots');
    ?>
</h2>
				<p><?php 
    _e('Import all the data from the demo site: pages, posts, theme options and placeholder images. Up and running in seconds', 'roots');
    ?>
</p>
				<p><?php 
    _e("Note: The demo website uses the following plugins and it's highly recommended that you install these plugins before importing the demo data.", 'roots');
    ?>
</p>
				<h4><?php 
    _e('Recommended Plugins', 'roots');
    ?>
</h4>
				<table class='dd-plugin-check'>
					<tr>
						<td>Visual Composer</td>
						<td><?php 
    echo ac_activation_get_plugin_status(ac_visual_composer_is_installed());
    ?>
</td>
					</tr>
	<?php 
    /*											<tr>
    						<td>Ultimate Addons for VC</td>
    						<td><?php echo ac_activation_get_plugin_status( ac_vc_ultimate_addons_is_installed() ); ?></td>
    					</tr>
    					<tr>
    						<td>VC Pricing Boxes</td>
    						<td><?php echo ac_activation_get_plugin_status( ac_vc_mnku_pricing_boxes_is_installed() ); ?></td>
    					</tr> */
    ?>
					<tr> 
						<td>Meta Box</td>
						<td><?php 
    echo ac_activation_get_plugin_status(ac_meta_box_is_installed());
    ?>
</td>
					</tr>
	<?php 
    /*											<tr>
    						<td>Revolution Slider</td>
    						<td><?php echo ac_activation_get_plugin_status( ac_revslider_is_installed() ); ?></td>
    					</tr>    			*/
    ?>
					<tr>
						<td>Contact Form 7</td>
						<td><?php 
    echo ac_activation_get_plugin_status(ac_cf7_is_installed());
    ?>
</td>
					</tr>
	<?php 
    /*											<tr>
    						<td>bbPress</td>
    						<td><?php echo ac_activation_get_plugin_status( ac_is_bb_press_installed() ); ?></td>
    					</tr> */
    ?>
			
					<tr>
						<td>WooCommerce</td>
						<td><?php 
    echo ac_activation_get_plugin_status(ac_woocommerce_is_active());
    ?>
</td>
					</tr>
				</table>
				<?php 
    // -- Check if the demo data files exist --
    $missing_demo_files = false;
    $missing_demo_files_message = '';
    // Options
    if (!file_exists(AC_DD_THEME_OPTIONS_TXT_PATH)) {
        $missing_demo_files_message .= "<div class='demo-data-file-missing'>The demo data Options file is missing</div>";
        $missing_demo_files = true;
    }
    // Widgets
    if (!file_exists(AC_DD_WIDGETS_PATH)) {
        $missing_demo_files_message .= "<div class='demo-data-file-missing'>The demo data Widgets file is missing</div>";
        $missing_demo_files = true;
    }
    // XML
    if (!file_exists(AC_DD_THEME_XML_PATH)) {
        $missing_demo_files_message .= "<div class='demo-data-file-missing'>The demo data XML file is missing</div>";
        $missing_demo_files = true;
    }
    if ($missing_demo_files) {
        // Demo data files are missing
        ?>
 
						<hr>
						<div class='demo-data-missing-files'>
							<p>It is not possible to import the demo data as files are missing:</p>
							<?php 
        echo $missing_demo_files_message;
        ?>
<br>
							<p><a class='button button-primary' href='http://alleycatthemes.com/support/forum/theme/bloc/' target='_blank'>Contact Support and let them know</a></p>
						</div>
						<?php 
    } else {
        // Demo data files are all good
        $import_url = add_query_arg(array('ac_do_demo_data' => '1'));
        // Check if demo data already imported
        $ac_demo_data_imported = get_option('ac_demo_data_imported');
        if ($ac_demo_data_imported == '1') {
            ?>
 <a class='button button-primary ac-multi-line-button ac-disable-on-click' href='<?php 
            echo $import_url;
            ?>
'>NOTE:  You have already imported the data.<br>Import Demo Data again</a> <?php 
        } else {
            ?>
 <a class='button button-primary' href='<?php 
            echo $import_url;
            ?>
'>Import Demo Data</a> <?php 
        }
    }
    ?>
			</div>
	  	<div class="ac-setup-option">
	    	<img src="<?php 
    echo AC_TEMPLATE_URI;
    ?>
/assets/img/setup_basic.gif" alt="Demo Data" height="100%" width="100%"/>
	  		<h2><?php 
    _e('Basic Setup', 'roots');
    ?>
</h2>
	  		<p><?php 
    _e('Quickstart by automatically setting up the Front page, Blog page, Permalinks and the navigation menu.', 'roots');
    ?>
</p>
				<?php 
    submit_button('Basic Setup', 'primary', 'ac_do_basic_setup', false);
    ?>
	  	</div>
	  </div>                
	  <?php 
    // 	  echo '</div>';
    $output = ob_get_contents();
    ob_end_clean();
    return $output;
}