/**
  * Goes through all files in 'classes/column' and includes each file.
  *
  * @since 2.0.1
  * @return array Column Classnames | Filepaths
  */
 public function set_columns_filepath()
 {
     require_once CPAC_DIR . 'classes/column.php';
     require_once CPAC_DIR . 'classes/column/default.php';
     require_once CPAC_DIR . 'classes/column/actions.php';
     $columns = array('CPAC_Column_Custom_Field' => CPAC_DIR . 'classes/column/custom-field.php', 'CPAC_Column_Taxonomy' => CPAC_DIR . 'classes/column/taxonomy.php', 'CPAC_Column_Used_By_Menu' => CPAC_DIR . 'classes/column/used-by-menu.php');
     // Add-on placeholders
     if (!cpac_is_pro_active()) {
         // Display ACF placeholder
         if (cpac_is_acf_active()) {
             $columns['CPAC_Column_ACF_Placeholder'] = CPAC_DIR . 'classes/column/acf-placeholder.php';
         }
         // Display WooCommerce placeholder
         if (cpac_is_woocommerce_active()) {
             $columns['CPAC_Column_WC_Placeholder'] = CPAC_DIR . 'classes/column/wc-placeholder.php';
         }
     }
     // Directory to iterate
     $columns_dir = CPAC_DIR . 'classes/column/' . $this->type;
     if (is_dir($columns_dir)) {
         $iterator = new DirectoryIterator($columns_dir);
         foreach ($iterator as $leaf) {
             if ($leaf->isDot() || $leaf->isDir()) {
                 continue;
             }
             // only allow php files, exclude .SVN .DS_STORE and such
             if (substr($leaf->getFilename(), -4) !== '.php') {
                 continue;
             }
             // build classname from filename
             $class_name = 'CPAC_Column_' . ucfirst($this->type) . '_' . implode('_', array_map('ucfirst', explode('-', basename($leaf->getFilename(), '.php'))));
             // classname | filepath
             $columns[$class_name] = $leaf->getPathname();
         }
     }
     /**
      * Filter the available custom column types
      * Use this to register a custom column type
      *
      * @since 2.0
      *
      * @param array $columns Available custom columns ([class_name] => [class file path])
      * @param CPAC_Storage_Model $storage_model Storage model class instance
      */
     $columns = apply_filters('cac/columns/custom', $columns, $this);
     /**
      * Filter the available custom column types for a specific type
      *
      * @since 2.0
      * @see Filter cac/columns/custom
      */
     $columns = apply_filters('cac/columns/custom/type=' . $this->type, $columns, $this);
     /**
      * Filter the available custom column types for a specific type
      *
      * @since 2.0
      * @see Filter cac/columns/custom
      */
     $columns = apply_filters('cac/columns/custom/post_type=' . $this->key, $columns, $this);
     $this->columns_filepath = $columns;
 }
Esempio n. 2
0
    /**
     * @since 1.0
     */
    public function display()
    {
        if ($this->welcome_screen()) {
            return;
        }
        $tabs = array('general' => __('Admin Columns', 'codepress-admin-columns'), 'settings' => __('Settings', 'codepress-admin-columns'), 'addons' => __('Add-ons', 'codepress-admin-columns'));
        /**
         * Filter the tabs on the settings screen
         *
         * @param array $tabs Available tabs
         */
        $tabs = apply_filters('cac/settings/tabs', $tabs);
        $current_tab = empty($_GET['tab']) ? 'general' : sanitize_text_field(urldecode($_GET['tab']));
        ?>
		<div id="cpac" class="wrap">
			<?php 
        screen_icon('codepress-admin-columns');
        ?>
			<h2 class="nav-tab-wrapper cpac-nav-tab-wrapper">
				<?php 
        foreach ($tabs as $name => $label) {
            ?>
					<a href="<?php 
            echo $this->get_settings_url('admin') . "&amp;tab={$name}";
            ?>
"
						class="nav-tab<?php 
            if ($current_tab == $name) {
                echo ' nav-tab-active';
            }
            ?>
"><?php 
            echo $label;
            ?>
</a>
				<?php 
        }
        ?>
			</h2>

			<?php 
        do_action('cpac_messages');
        ?>

			<?php 
        switch ($current_tab) {
            case 'general':
                $keys = array_keys($this->cpac->storage_models);
                $first = array_shift($keys);
                $storage_models_by_type = array();
                foreach ($this->cpac->storage_models as $k => $storage_model) {
                    $storage_models_by_type[$storage_model->menu_type][$k] = $storage_model;
                }
                ?>
					<div class="cpac-menu">
						<?php 
                foreach ($this->get_menu_types() as $menu_type => $label) {
                    if (!empty($storage_models_by_type[$menu_type])) {
                        $count = 0;
                        ?>
								<ul class="subsubsub">
									<li class="first"><?php 
                        echo $label;
                        ?>
:</li>
									<?php 
                        foreach ($storage_models_by_type[$menu_type] as $storage_model) {
                            ?>
										<li>
											<?php 
                            echo $count++ != 0 ? ' | ' : '';
                            ?>
											<a href="#cpac-box-<?php 
                            echo $storage_model->key;
                            ?>
" <?php 
                            echo $storage_model->is_menu_type_current($first) ? ' class="current"' : '';
                            ?>
 ><?php 
                            echo $storage_model->label;
                            ?>
</a>
										</li>
									<?php 
                        }
                        ?>
								</ul>
								<?php 
                    }
                }
                ?>
					</div>

					<?php 
                do_action('cac/settings/after_menu');
                ?>

					<?php 
                foreach ($this->cpac->storage_models as $storage_model) {
                    ?>
					<div class="columns-container" data-type="<?php 
                    echo $storage_model->key;
                    ?>
"<?php 
                    echo $storage_model->is_menu_type_current($first) ? '' : ' style="display:none"';
                    ?>
>

						<div class="columns-left">
							<div id="titlediv">
								<h2>
									<?php 
                    echo $storage_model->label;
                    ?>
									<?php 
                    $storage_model->screen_link();
                    ?>
								</h2>
							</div>

							<?php 
                    if ($storage_model->is_using_php_export()) {
                        ?>
								<div class="error below-h2">
									<p><?php 
                        printf(__('The columns for %s are set up via PHP and can therefore not be edited in the admin panel.', 'codepress-admin-columns'), '<strong>' . $storage_model->label . '</strong>');
                        ?>
</p>
								</div>
							<?php 
                    }
                    ?>
						</div>

						<div class="columns-right">
							<div class="columns-right-inside">
								<?php 
                    if (!$storage_model->is_using_php_export()) {
                        ?>
									<div class="sidebox" id="form-actions">
										<h3>
											<?php 
                        _e('Store settings', 'codepress-admin-columns');
                        ?>
										</h3>
										<?php 
                        $has_been_stored = $storage_model->get_stored_columns() ? true : false;
                        ?>
										<div class="form-update">
											<a href="javascript:;" class="button-primary submit-update"><?php 
                        echo $has_been_stored ? __('Update') : __('Save');
                        echo ' ' . $storage_model->label;
                        ?>
</a>
										</div>
										<?php 
                        if ($has_been_stored) {
                            ?>
											<div class="form-reset">
												<a href="<?php 
                            echo add_query_arg(array('_cpac_nonce' => wp_create_nonce('restore-type'), 'cpac_key' => $storage_model->key, 'cpac_action' => 'restore_by_type'), $this->get_settings_url('admin'));
                            ?>
" class="reset-column-type" onclick="return confirm('<?php 
                            printf(__("Warning! The %s columns data will be deleted. This cannot be undone. \\'OK\\' to delete, \\'Cancel\\' to stop", 'codepress-admin-columns'), $storage_model->label);
                            ?>
');">
													<?php 
                            _e('Restore', 'codepress-admin-columns');
                            ?>
													<?php 
                            echo ' ' . $storage_model->label . ' ';
                            ?>
													<?php 
                            _e('columns', 'codepress-admin-columns');
                            ?>
												</a>
											</div>
										<?php 
                        }
                        ?>

										<?php 
                        do_action('cac/settings/form_actions', $storage_model);
                        ?>

									</div><!--form-actions-->
								<?php 
                    }
                    ?>

								<?php 
                    if (!cpac_is_pro_active()) {
                        ?>
									<?php 
                        $url_args = array('utm_source' => 'plugin-installation', 'utm_medium' => 'banner', 'utm_campaign' => 'plugin-installation');
                        ?>
									<div class="sidebox" id="pro-version">
										<div class="padding-box cta">
											<h3>
												<a href="<?php 
                        echo add_query_arg(array_merge($url_args, array('utm_content' => 'title')), ac_get_site_url());
                        ?>
"><?php 
                        _e('Get Admin Columns Pro', 'codepress-admin-columns');
                        ?>
</a>
											</h3>

											<div class="inside">
												<ul>
													<li>
														<a href="<?php 
                        echo add_query_arg(array_merge($url_args, array('utm_content' => 'usp-sorting')), ac_get_site_url());
                        ?>
"><?php 
                        _e('Add Sorting', 'codepress-admin-columns');
                        ?>
</a>
													</li>
													<li>
														<a href="<?php 
                        echo add_query_arg(array_merge($url_args, array('utm_content' => 'usp-filtering')), ac_get_site_url());
                        ?>
"><?php 
                        _e('Add Filtering', 'codepress-admin-columns');
                        ?>
</a>
													</li>
													<li>
														<a href="<?php 
                        echo add_query_arg(array_merge($url_args, array('utm_content' => 'usp-import-export')), ac_get_site_url());
                        ?>
"><?php 
                        _e('Add Import/Export', 'codepress-admin-columns');
                        ?>
</a>
													</li>
													<li>
														<a href="<?php 
                        echo add_query_arg(array_merge($url_args, array('utm_content' => 'usp-editing')), ac_get_site_url());
                        ?>
"><?php 
                        _e('Add Direct Editing', 'codepress-admin-columns');
                        ?>
</a>
													</li>
												</ul>
												<p>
													<?php 
                        printf(__("Check out <a href='%s'>Admin Columns Pro</a> for more details!", 'codepress-admin-columns'), add_query_arg(array_merge($url_args, array('utm_content' => 'cta')), ac_get_site_url()));
                        ?>
												</p>
											</div>
										</div>
									</div>

									<div class="sidebox" id="direct-feedback">
										<div id="feedback-choice">
											<h3><?php 
                        _e('Are you happy with Admin Columns?', 'codepress-admin-columns');
                        ?>
</h3>

											<div class="inside">
												<a href="#" class="yes">Yes</a>
												<a href="#" class="no">No</a>
											</div>
										</div>
										<div id="feedback-support">
											<div class="inside">
												<p><?php 
                        _e("What's wrong? Need help? Let us know!", 'codepress-admin-columns');
                        ?>
</p>

												<p><?php 
                        _e('Check out our extensive documentation, or you can open a support topic on WordPress.org!', 'codepress-admin-columns');
                        ?>
</p>
												<ul class="share">
													<li>
														<a href="<?php 
                        echo add_query_arg(array('utm_source' => 'plugin-installation', 'utm_medium' => 'feedback-docs-button', 'utm_campaign' => 'plugin-installation'), $this->get_url('documentation'));
                        ?>
" target="_blank">
															<div class="dashicons dashicons-editor-help"></div> <?php 
                        _e('Docs', 'codepress-admin-columns');
                        ?>
														</a>
													</li>
													<li>
														<a href="https://wordpress.org/support/plugin/codepress-admin-columns"
															target="_blank">
															<div class="dashicons dashicons-wordpress"></div> <?php 
                        _e('Forums', 'codepress-admin-columns');
                        ?>
														</a>
													</li>
												</ul>
												<div class="clear"></div>
											</div>
										</div>
										<div id="feedback-rate">
											<div class="inside">
												<p><?php 
                        _e("Woohoo! We're glad to hear that!", 'codepress-admin-columns');
                        ?>
</p>

												<p><?php 
                        _e('We would really love it if you could show your appreciation by giving us a rating on WordPress.org or tweet about Admin Columns!', 'codepress-admin-columns');
                        ?>
</p>
												<ul class="share">
													<li>
														<a href="http://wordpress.org/support/view/plugin-reviews/codepress-admin-columns#postform" target="_blank">
															<div class="dashicons dashicons-star-empty"></div> <?php 
                        _e('Rate', 'codepress-admin-columns');
                        ?>
														</a>
													</li>

													<li>
														<a href="<?php 
                        echo add_query_arg(array('hashtags' => 'admincolumns', 'text' => urlencode("I'm using Admin Columns for WordPress!"), 'url' => urlencode('http://wordpress.org/plugins/codepress-admin-columns/'), 'via' => 'codepressNL'), 'https://twitter.com/intent/tweet');
                        ?>
" target="_blank">
															<div class="dashicons dashicons-twitter"></div> <?php 
                        _e('Tweet', 'codepress-admin-columns');
                        ?>
														</a>
													</li>

													<li>
														<a href="<?php 
                        echo add_query_arg(array('utm_source' => 'plugin-installation', 'utm_medium' => 'feedback-purchase-button', 'utm_campaign' => 'plugin-installation'), ac_get_site_url());
                        ?>
" target="_blank">
															<div class="dashicons dashicons-cart"></div> <?php 
                        _e('Buy Pro', 'codepress-admin-columns');
                        ?>
														</a>
													</li>
												</ul>
												<div class="clear"></div>
											</div>
										</div>
									</div>

								<?php 
                    }
                    ?>

								<div class="sidebox" id="plugin-support">
									<h3><?php 
                    _e('Support', 'codepress-admin-columns');
                    ?>
</h3>

									<div class="inside">
										<?php 
                    if (version_compare(get_bloginfo('version'), '3.2', '>')) {
                        ?>
											<p><?php 
                        _e('Check the <strong>Help</strong> section in the top-right screen.', 'codepress-admin-columns');
                        ?>
</p>
										<?php 
                    }
                    ?>
										<p>
											<?php 
                    printf(__("For full documentation, bug reports, feature suggestions and other tips <a href='%s'>visit the Admin Columns website</a>", 'codepress-admin-columns'), $this->get_url('documentation'));
                    ?>
										</p>
									</div>
								</div><!--plugin-support-->

							</div><!--.columns-right-inside-->
						</div><!--.columns-right-->

						<div class="columns-left">
							<div class="cpac-boxes">
								<?php 
                    if (!$storage_model->is_using_php_export()) {
                        ?>
									<div class="cpac-columns">

										<form method="post" action="">
											<?php 
                        wp_nonce_field('update-type', '_cpac_nonce');
                        ?>

											<input type="hidden" name="cpac_key" value="<?php 
                        echo $storage_model->key;
                        ?>
"/>
											<input type="hidden" name="cpac_action" value="update_by_type"/>

											<?php 
                        foreach ($storage_model->columns as $column) {
                            $column->display();
                        }
                        ?>
										</form>

									</div><!--.cpac-columns-->

									<div class="column-footer">
										<div class="order-message">
											<?php 
                        _e('Drag and drop to reorder', 'codepress-admin-columns');
                        ?>
										</div>
										<div class="button-container">
											<a href="javascript:;" class="add_column button button-primary">+ <?php 
                        _e('Add Column', 'codepress-admin-columns');
                        ?>
</a><br/>
										</div>

									</div><!--.cpac-column-footer-->
								<?php 
                    }
                    ?>
							</div><!--.cpac-boxes-->
						</div><!--.columns-left-->
						<div class="clear"></div>

						<div class="for-cloning-only" style="display:none">
							<?php 
                    foreach ($storage_model->get_registered_columns() as $column) {
                        $column->display();
                    }
                    ?>
						</div>
					</div><!--.columns-container-->
				<?php 
                }
                // storage_models
                ?>

					<div class="clear"></div>
					<?php 
                break;
                // case: general
            // case: general
            case 'settings':
                $this->display_settings();
                break;
            case 'addons':
                $this->tab_addons();
                break;
            case 'help':
                //$this->tab_addons();
                break;
            default:
                /**
                 * Action to add tab contents
                 *
                 */
                do_action('cac/settings/tab_contents/tab=' . $current_tab);
        }
        ?>
		</div><!--.wrap-->
		<?php 
    }
Esempio n. 3
0
    /**
     * @since 1.0
     */
    public function display()
    {
        if ($this->welcome_screen()) {
            return;
        }
        $tabs = array('general' => __('Admin Columns', 'codepress-admin-columns'), 'settings' => __('Settings', 'codepress-admin-columns'), 'addons' => __('Add-ons', 'codepress-admin-columns'));
        /**
         * Filter the tabs on the settings screen
         *
         * @param array $tabs Available tabs
         */
        $tabs = apply_filters('cac/settings/tabs', $tabs);
        $current_tab = empty($_GET['tab']) ? 'general' : sanitize_text_field(urldecode($_GET['tab']));
        ?>
		<div id="cpac" class="wrap">
			<?php 
        screen_icon('codepress-admin-columns');
        ?>
			<h2 class="nav-tab-wrapper cpac-nav-tab-wrapper">
				<?php 
        foreach ($tabs as $name => $label) {
            ?>
					<a href="<?php 
            echo $this->get_settings_url('admin') . "&amp;tab={$name}";
            ?>
"
						class="nav-tab<?php 
            if ($current_tab == $name) {
                echo ' nav-tab-active';
            }
            ?>
"><?php 
            echo $label;
            ?>
</a>
				<?php 
        }
        ?>
			</h2>

			<?php 
        do_action('cpac_messages');
        ?>

			<?php 
        switch ($current_tab) {
            case 'general':
                $storage_model = $this->get_settings_storage_model();
                $has_been_stored = $storage_model->get_stored_columns() ? true : false;
                // columns should not be editable when layout isn't
                if ($layout = $storage_model->get_layout_object()) {
                    if (isset($layout->not_editable)) {
                        $storage_model->enable_php_export();
                    }
                }
                // Grouped storage models
                $grouped = array();
                foreach (cpac()->get_storage_models() as $_storage_model) {
                    $grouped[$_storage_model->get_menu_type()][] = (object) array('key' => $_storage_model->key, 'link' => $_storage_model->settings_url(), 'label' => $_storage_model->label);
                    usort($grouped[$_storage_model->get_menu_type()], array($this, 'sort_by_label'));
                }
                ?>

					<?php 
                do_action('cac/settings/after_menu');
                ?>

					<div class="columns-container<?php 
                echo $has_been_stored ? ' stored' : '';
                ?>
" data-type="<?php 
                echo $storage_model->key;
                ?>
" data-layout="<?php 
                echo $storage_model->get_layout();
                ?>
">

						<div class="main">

							<div class="menu">
								<select id="cpac_storage_modal_select">
									<?php 
                foreach ($grouped as $menu_type => $models) {
                    ?>
										<optgroup label="<?php 
                    echo esc_attr($menu_type);
                    ?>
">
											<?php 
                    foreach ($models as $model) {
                        ?>
												<option value="<?php 
                        echo esc_attr($model->link);
                        ?>
" <?php 
                        selected($model->key, $storage_model->key);
                        ?>
><?php 
                        echo esc_html($model->label);
                        ?>
</option>
											<?php 
                    }
                    ?>
										</optgroup>
									<?php 
                }
                ?>
								</select>
								<span class="spinner"></span>

								<?php 
                $storage_model->screen_link();
                ?>
							</div>


							<?php 
                do_action('cac/settings/after_title', $storage_model);
                ?>

						</div>

						<div class="columns-right">
							<div class="columns-right-inside">
								<?php 
                if (!$storage_model->is_using_php_export()) {
                    ?>
									<div class="sidebox form-actions">
										<?php 
                    $label = __('Store settings', 'codepress-admin-columns');
                    ?>
										<h3>
											<span class="left"><?php 
                    echo $label;
                    ?>
</span>
											<?php 
                    if (18 > strlen($label) && ($truncated_label = $storage_model->get_truncated_side_label($label))) {
                        ?>
												<span class="right contenttype"><?php 
                        echo esc_html($truncated_label);
                        ?>
</span>
											<?php 
                    } else {
                        ?>
												<span class="clear contenttype"><?php 
                        echo esc_html($storage_model->label);
                        ?>
</span>
											<?php 
                    }
                    ?>
										</h3>

										<div class="form-update">
											<a href="javascript:;" class="button-primary submit update"><?php 
                    _e('Update');
                    ?>
</a>
											<a href="javascript:;" class="button-primary submit save"><?php 
                    _e('Save');
                    ?>
</a>
										</div>

										<form class="form-reset" method="post">
											<input type="hidden" name="cpac_key" value="<?php 
                    echo $storage_model->key;
                    ?>
"/>
											<input type="hidden" name="cpac_action" value="restore_by_type"/>
											<input type="hidden" name="cpac_layout" value="<?php 
                    echo $storage_model->layout;
                    ?>
"/>
											<?php 
                    wp_nonce_field('restore-type', '_cpac_nonce');
                    ?>

											<?php 
                    $onclick = $this->cpac->use_delete_confirmation() ? ' onclick="return confirm(\'' . esc_attr(addslashes(sprintf(__("Warning! The %s columns data will be deleted. This cannot be undone. 'OK' to delete, 'Cancel' to stop", 'codepress-admin-columns'), "'" . $storage_model->get_label_or_layout_name() . "'"))) . '\');"' : '';
                    ?>
											<input class="reset-column-type" type="submit"<?php 
                    echo $onclick;
                    ?>
 value="<?php 
                    _e('Restore columns', 'codepress-admin-columns');
                    ?>
">
											<span class="spinner"></span>
										</form>

										<?php 
                    do_action('cac/settings/form_actions', $storage_model);
                    ?>

									</div><!--form-actions-->
								<?php 
                }
                ?>

								<?php 
                do_action('cac/settings/sidebox', $storage_model);
                ?>

								<?php 
                if (!cpac_is_pro_active()) {
                    ?>

									<?php 
                    $url_args = array('utm_source' => 'plugin-installation', 'utm_medium' => 'banner', 'utm_campaign' => 'plugin-installation');
                    ?>
									<div class="sidebox" id="pro-version">
										<div class="padding-box cta">
											<h3>
												<a href="<?php 
                    echo add_query_arg(array_merge($url_args, array('utm_content' => 'title')), ac_get_site_url());
                    ?>
"><?php 
                    _e('Get Admin Columns Pro', 'codepress-admin-columns');
                    ?>
</a>
											</h3>

											<div class="inside">
												<ul>
													<li>
														<a href="<?php 
                    echo add_query_arg(array_merge($url_args, array('utm_content' => 'usp-sorting')), ac_get_site_url() . '/upgrade-to-admin-columns-pro/');
                    ?>
"><?php 
                    _e('Add Sorting', 'codepress-admin-columns');
                    ?>
</a>
													</li>
													<li>
														<a href="<?php 
                    echo add_query_arg(array_merge($url_args, array('utm_content' => 'usp-filtering')), ac_get_site_url() . '/upgrade-to-admin-columns-pro/');
                    ?>
"><?php 
                    _e('Add Filtering', 'codepress-admin-columns');
                    ?>
</a>
													</li>
													<li>
														<a href="<?php 
                    echo add_query_arg(array_merge($url_args, array('utm_content' => 'usp-import-export')), ac_get_site_url() . '/upgrade-to-admin-columns-pro/');
                    ?>
"><?php 
                    _e('Add Import/Export', 'codepress-admin-columns');
                    ?>
</a>
													</li>
													<li>
														<a href="<?php 
                    echo add_query_arg(array_merge($url_args, array('utm_content' => 'usp-editing')), ac_get_site_url() . '/upgrade-to-admin-columns-pro/');
                    ?>
"><?php 
                    _e('Add Inline Edit', 'codepress-admin-columns');
                    ?>
</a>
													</li>
													<li>
														<a href="<?php 
                    echo add_query_arg(array_merge($url_args, array('utm_content' => 'usp-columns-sets')), ac_get_site_url() . '/upgrade-to-admin-columns-pro/');
                    ?>
"><?php 
                    _e('Multiple Column Sets', 'codepress-admin-columns');
                    ?>
</a>
													</li>
												</ul>
												<p>
													<?php 
                    printf(__("Check out <a href='%s'>Admin Columns Pro</a> for more details!", 'codepress-admin-columns'), add_query_arg(array_merge($url_args, array('utm_content' => 'cta')), ac_get_site_url()));
                    ?>
												</p>
											</div>
										</div>
									</div>

									<div class="sidebox" id="direct-feedback">
										<div id="feedback-choice">
											<h3><?php 
                    _e('Are you happy with Admin Columns?', 'codepress-admin-columns');
                    ?>
</h3>

											<div class="inside">
												<a href="#" class="yes">Yes</a>
												<a href="#" class="no">No</a>
											</div>
										</div>
										<div id="feedback-support">
											<div class="inside">
												<p><?php 
                    _e("What's wrong? Need help? Let us know!", 'codepress-admin-columns');
                    ?>
</p>

												<p><?php 
                    _e('Check out our extensive documentation, or you can open a support topic on WordPress.org!', 'codepress-admin-columns');
                    ?>
</p>
												<ul class="share">
													<li>
														<a href="<?php 
                    echo add_query_arg(array('utm_source' => 'plugin-installation', 'utm_medium' => 'feedback-docs-button', 'utm_campaign' => 'plugin-installation'), $this->get_url('documentation'));
                    ?>
" target="_blank">
															<div class="dashicons dashicons-editor-help"></div> <?php 
                    _e('Docs', 'codepress-admin-columns');
                    ?>
														</a>
													</li>
													<li>
														<a href="https://wordpress.org/support/plugin/codepress-admin-columns"
															target="_blank">
															<div class="dashicons dashicons-wordpress"></div> <?php 
                    _e('Forums', 'codepress-admin-columns');
                    ?>
														</a>
													</li>
												</ul>
												<div class="clear"></div>
											</div>
										</div>
										<div id="feedback-rate">
											<div class="inside">
												<p><?php 
                    _e("Woohoo! We're glad to hear that!", 'codepress-admin-columns');
                    ?>
</p>

												<p><?php 
                    _e('We would really love it if you could show your appreciation by giving us a rating on WordPress.org or tweet about Admin Columns!', 'codepress-admin-columns');
                    ?>
</p>
												<ul class="share">
													<li>
														<a href="http://wordpress.org/support/view/plugin-reviews/codepress-admin-columns#postform" target="_blank">
															<div class="dashicons dashicons-star-empty"></div> <?php 
                    _e('Rate', 'codepress-admin-columns');
                    ?>
														</a>
													</li>

													<li>
														<a href="<?php 
                    echo add_query_arg(array('hashtags' => 'admincolumns', 'text' => urlencode("I'm using Admin Columns for WordPress!"), 'url' => urlencode('http://wordpress.org/plugins/codepress-admin-columns/'), 'via' => 'wpcolumns'), 'https://twitter.com/intent/tweet');
                    ?>
" target="_blank">
															<div class="dashicons dashicons-twitter"></div> <?php 
                    _e('Tweet', 'codepress-admin-columns');
                    ?>
														</a>
													</li>

													<li>
														<a href="<?php 
                    echo add_query_arg(array('utm_source' => 'plugin-installation', 'utm_medium' => 'feedback-purchase-button', 'utm_campaign' => 'plugin-installation'), ac_get_site_url());
                    ?>
" target="_blank">
															<div class="dashicons dashicons-cart"></div> <?php 
                    _e('Buy Pro', 'codepress-admin-columns');
                    ?>
														</a>
													</li>
												</ul>
												<div class="clear"></div>
											</div>
										</div>
									</div>

								<?php 
                }
                ?>

								<div class="sidebox" id="plugin-support">
									<h3><?php 
                _e('Support', 'codepress-admin-columns');
                ?>
</h3>

									<div class="inside">
										<?php 
                if (version_compare(get_bloginfo('version'), '3.2', '>')) {
                    ?>
											<p><?php 
                    _e('Check the <strong>Help</strong> section in the top-right screen.', 'codepress-admin-columns');
                    ?>
</p>
										<?php 
                }
                ?>
										<p>
											<?php 
                printf(__("For full documentation, bug reports, feature suggestions and other tips <a href='%s'>visit the Admin Columns website</a>", 'codepress-admin-columns'), $this->get_url('documentation'));
                ?>
										</p>
									</div>
								</div><!--plugin-support-->

							</div><!--.columns-right-inside-->
						</div><!--.columns-right-->

						<div class="columns-left">
							<?php 
                if (!$storage_model->get_default_stored_columns() && !$storage_model->is_using_php_export()) {
                    ?>
								<div class="cpac-notice">
									<p>
										<?php 
                    echo sprintf(__('Please visit the %s screen once to load all available columns', 'codepress-admin-columns'), "<a href='" . $storage_model->get_link() . "'>" . esc_html($storage_model->label) . "</a>");
                    ?>
									</p>
								</div>
							<?php 
                }
                ?>

							<?php 
                $this->messages();
                ?>

							<div class="ajax-message"><p></p></div>

							<?php 
                if ($storage_model->is_using_php_export()) {
                    ?>
								<div class="notice notice-warning below-h2">
									<p><?php 
                    printf(__('The columns for %s are set up via PHP and can therefore not be edited', 'codepress-admin-columns'), '<strong>' . $storage_model->label . '</strong>');
                    ?>
</p>
								</div>
							<?php 
                }
                ?>

							<div class="cpac-boxes<?php 
                echo $storage_model->is_using_php_export() ? ' disabled' : '';
                ?>
">

								<div class="cpac-columns">
									<form method="post" action="<?php 
                echo $storage_model->get_edit_link();
                ?>
">

										<input type="hidden" name="cpac_key" value="<?php 
                echo $storage_model->key;
                ?>
"/>
										<input type="hidden" name="cpac_action" value="update_by_type"/>
										<input type="hidden" name="cpac_layout" value="<?php 
                echo $storage_model->layout;
                ?>
"/>

										<?php 
                do_action('cac/settings/form_columns', $storage_model);
                ?>

										<?php 
                wp_nonce_field('update-type', '_cpac_nonce');
                ?>

										<?php 
                foreach ($storage_model->get_columns() as $column) {
                    $column->display();
                }
                ?>
									</form>

								</div><!--.cpac-columns-->

								<div class="column-footer">
									<?php 
                if (!$storage_model->is_using_php_export()) {
                    ?>
										<div class="order-message">
											<?php 
                    _e('Drag and drop to reorder', 'codepress-admin-columns');
                    ?>
										</div>
										<div class="button-container">
											<a href="javascript:;" class="add_column button-primary">+ <?php 
                    _e('Add Column', 'codepress-admin-columns');
                    ?>
</a>
											<?php 
                    /*<a href="javascript:;" class="button-primary submit update"><?php _e( 'Update' ); ?></a>*/
                    ?>
											<?php 
                    /*<a href="javascript:;" class="button-primary submit save"><?php _e( 'Save' ); ?></a>*/
                    ?>
										</div>
									<?php 
                }
                ?>
								</div><!--.cpac-column-footer-->

							</div><!--.cpac-boxes-->

							<?php 
                do_action('cac/settings/after_columns', $storage_model);
                ?>

						</div><!--.columns-left-->
						<div class="clear"></div>

						<div class="for-cloning-only" style="display:none">
							<?php 
                foreach ($storage_model->get_column_types() as $column) {
                    $column->display();
                }
                ?>
						</div>

					</div><!--.columns-container-->

					<div class="clear"></div>
					<?php 
                break;
            case 'settings':
                $this->display_settings();
                break;
            case 'addons':
                $this->tab_addons();
                break;
            default:
                /**
                 * Action to add tab contents
                 *
                 */
                do_action('cac/settings/tab_contents/tab=' . $current_tab);
        }
        ?>
		</div><!--.wrap-->
		<?php 
    }