admin-content.php
6 years ago
folder-deactivate-form.php
6 years ago
folder-popup.php
6 years ago
general-settings.php
6 years ago
help.php
6 years ago
update.php
6 years ago
upgrade-to-pro.php
6 years ago
admin-content.php
251 lines
| 1 | <?php |
| 2 | defined('ABSPATH') or wp_die('Nope, not accessing this'); |
| 3 | ?> |
| 4 | <style> |
| 5 | .ui-state-highlight { |
| 6 | background: transparent; |
| 7 | border: dashed 1px #0073AA; |
| 8 | width:150px; |
| 9 | height: 25px !important; |
| 10 | } |
| 11 | <?php |
| 12 | $string = ""; |
| 13 | global $typenow; |
| 14 | $width = get_option("wcp_dynamic_width_for_" . $typenow); |
| 15 | if($width == null || empty($width)) { |
| 16 | $width = 292; |
| 17 | } |
| 18 | $width = $width - 40; |
| 19 | $customize_folders = get_option('customize_folders'); |
| 20 | ?> |
| 21 | </style> |
| 22 | <div id="wcp-custom-style"> |
| 23 | <style> |
| 24 | <?php |
| 25 | $string = ""; |
| 26 | for($i=0;$i<=15;$i++) { |
| 27 | $string .= " .space > .route >"; |
| 28 | $new_width = $width - (13+(20*$i)); |
| 29 | echo "#custom-menu > {$string} .title { width: {$new_width}px !important; } "; |
| 30 | } |
| 31 | ?> |
| 32 | </style> |
| 33 | </div> |
| 34 | <div id="style-css"> |
| 35 | |
| 36 | </div> |
| 37 | <style> |
| 38 | <?php |
| 39 | if(isset($customize_folders['new_folder_color']) && !empty($customize_folders['new_folder_color'])) { |
| 40 | ?> |
| 41 | .add-new-folder { background-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?>; border-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?> } |
| 42 | .wcp-hide-show-buttons .toggle-buttons { background-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?>; } |
| 43 | .folders-toggle-button span { background-color: <?php echo esc_attr($customize_folders['new_folder_color']) ?>; } |
| 44 | <?php |
| 45 | } |
| 46 | if(isset($customize_folders['dropdown_color']) && !empty($customize_folders['dropdown_color'])) { |
| 47 | ?> |
| 48 | #media-attachment-taxonomy-filter, select.media-select-folder { border-color: <?php echo esc_attr($customize_folders['dropdown_color']) ?>; color: <?php echo esc_attr($customize_folders['dropdown_color']) ?> } |
| 49 | <?php |
| 50 | } |
| 51 | if(isset($customize_folders['folder_bg_color']) && !empty($customize_folders['folder_bg_color'])) { |
| 52 | ?> |
| 53 | .orange-bg > span ,.wcp-container .route.active-item > h3.title, .header-posts a.active-item, .un-categorised-items.active-item { background-color: <?php echo esc_attr($customize_folders['folder_bg_color']) ?> !important; color: #ffffff; } |
| 54 | <?php |
| 55 | } |
| 56 | if(isset($customize_folders['bulk_organize_button_color']) && !empty($customize_folders['bulk_organize_button_color'])) { |
| 57 | ?> |
| 58 | button.button.organize-button { background-color: <?php echo esc_attr($customize_folders['bulk_organize_button_color']) ?>; border-color: <?php echo esc_attr($customize_folders['bulk_organize_button_color']) ?>; } |
| 59 | button.button.organize-button:hover { background-color: <?php echo esc_attr($customize_folders['bulk_organize_button_color']) ?>; border-color: <?php echo esc_attr($customize_folders['bulk_organize_button_color']) ?>; } |
| 60 | <?php |
| 61 | } |
| 62 | $font_family = ""; |
| 63 | if(isset($customize_folders['folder_font']) && !empty($customize_folders['folder_font'])) { |
| 64 | $font_family = $customize_folders['folder_font']; |
| 65 | ?> |
| 66 | .wcp-container, .folder-popup-form { font-family: "<?php echo esc_attr($font_family) ?>"; } |
| 67 | <?php |
| 68 | } |
| 69 | if(isset($customize_folders['folder_size']) && !empty($customize_folders['folder_size'])) { |
| 70 | ?> |
| 71 | .wcp-container .route span.title-text, .header-posts a, .un-categorised-items a { font-size: <?php echo esc_attr($customize_folders['folder_size']) ?>px; } |
| 72 | <?php |
| 73 | } |
| 74 | ?> |
| 75 | </style> |
| 76 | <?php if(!empty($font_family)) { |
| 77 | wp_enqueue_style( 'custom-google-fonts', 'https://fonts.googleapis.com/css?family='.urlencode($font_family), false ); |
| 78 | } ?> |
| 79 | <div id="media-css"> |
| 80 | |
| 81 | </div> |
| 82 | <?php |
| 83 | $optionName = $typenow."_parent_status"; |
| 84 | $status = get_option($optionName); |
| 85 | global $typenow; |
| 86 | $title = ucfirst($typenow); |
| 87 | if($typenow == "page") { |
| 88 | $title = "Pages"; |
| 89 | } else if($typenow == "post") { |
| 90 | $title = "Posts"; |
| 91 | } else if($typenow == "attachment") { |
| 92 | $title = "Files"; |
| 93 | } |
| 94 | $display_status = "wcp_dynamic_display_status_" . $typenow; |
| 95 | $display_status = get_option($display_status); |
| 96 | $class_name = isset($display_status) && $display_status == "hide"?"hide-folders-area":""; |
| 97 | $active_class = (isset($display_status) && $display_status == "hide")?"":"active"; |
| 98 | $active_class_2 = (isset($display_status) && $display_status == "hide")?"active":""; |
| 99 | |
| 100 | /* Do not change here, Free/Pro Class name */ |
| 101 | $post_type = WCP_Folders::get_custom_post_type($typenow); |
| 102 | $active = ""; |
| 103 | $active_all_class = ""; |
| 104 | if(!empty($post_type)) { |
| 105 | if(isset($_REQUEST[$post_type]) && $_REQUEST[$post_type] == -1) { |
| 106 | $active = "active-item"; |
| 107 | } |
| 108 | |
| 109 | if(!isset($_REQUEST[$post_type]) || $_REQUEST[$post_type] == "") { |
| 110 | $active_all_class = "active-item"; |
| 111 | } |
| 112 | } |
| 113 | ?> |
| 114 | <div id="wcp-content" class="<?php echo esc_attr(isset($display_status) && $display_status == "hide"?"hide-folders-area":"") ?>" > |
| 115 | <div id="wcp-content-resize"> |
| 116 | <div class="wcp-content"> |
| 117 | <div class="wcp-hide-show-buttons"> |
| 118 | <div class="toggle-buttons hide-folders <?php echo esc_attr($active_class) ?>"><span class="dashicons dashicons-arrow-left"></span></div> |
| 119 | <div class="toggle-buttons show-folders <?php echo esc_attr($active_class_2) ?>"><span class="dashicons dashicons-arrow-right"></span></div> |
| 120 | </div> |
| 121 | <div class='wcp-container'> |
| 122 | <div class="sticky-wcp-custom-form"> |
| 123 | <?php echo $form_html ?> |
| 124 | <div class="top-settings"> |
| 125 | <div class="header-posts"> |
| 126 | <a href="javascript:;" class="all-posts <?php echo esc_attr($active_all_class) ?>"><span class="wcp-icon folder-icon-insert_drive_file"></span> <?php esc_attr_e("All ".$title, WCP_FOLDER ) ?> <span class="total-count"><?php echo $ttpsts ?></span></a> |
| 127 | </div> |
| 128 | <div class="un-categorised-items <?php echo esc_attr($active) ?>"> |
| 129 | <a href="javascript:;" class="un-categorized-posts"><?php esc_attr_e("Unassigned ".$title, WCP_FOLDER) ?> <span class="total-count total-empty"><?php echo $ttemp ?></span> </a> |
| 130 | </div> |
| 131 | </div> |
| 132 | |
| 133 | <div class="sticky-folders <?php echo (!empty($sticky_string)?"active":"") ?>"> |
| 134 | <div class="sticky-title"><img src='<?php echo WCP_FOLDER_URL ?>assets/images/pin.png' /> Sticky Folders</div> |
| 135 | <ul> |
| 136 | <?php echo $sticky_string ?> |
| 137 | </ul> |
| 138 | </div> |
| 139 | </div> |
| 140 | <div id="custom-scroll-menu"> |
| 141 | <div id="custom-menu" class="wcp-custom-menu <?php echo ($status==1)?"active":"" ?>"> |
| 142 | <!--<div class="wcp-parent" id="title0"><i class="fa fa-folder-o"></i> All Folders</div>--> |
| 143 | <ul class='space first-space' id='space_0'> |
| 144 | <?php echo $terms_data; ?> |
| 145 | </ul> |
| 146 | </div> |
| 147 | </div> |
| 148 | </div> |
| 149 | </div> |
| 150 | </div> |
| 151 | </div> |
| 152 | <div class="folder-popup-form" id="add-update-folder"> |
| 153 | <div class="popup-form-content"> |
| 154 | <form action="" method="post" id="save-folder-form"> |
| 155 | <div id="add-update-folder-title" class="add-update-folder-title"> |
| 156 | Add Folder |
| 157 | </div> |
| 158 | <div class="folder-form-input"> |
| 159 | <input id="add-update-folder-name" autocomplete="off" placeholder="Folder name"> |
| 160 | </div> |
| 161 | <div class="folder-form-errors"> |
| 162 | <span class="dashicons dashicons-info"></span> Please enter folder name |
| 163 | </div> |
| 164 | <div class="folder-form-buttons"> |
| 165 | <button type="submit" class="form-submit-btn" id="save-folder-data" style="width: 106px">Submit</button> |
| 166 | <a href="javascript:;" class="form-cancel-btn">Cancel</a> |
| 167 | </div> |
| 168 | </form> |
| 169 | </div> |
| 170 | </div> |
| 171 | |
| 172 | <div class="folder-popup-form" id="update-folder-item"> |
| 173 | <div class="popup-form-content"> |
| 174 | <form action="" method="post" id="update-folder-form"> |
| 175 | <div id="update-folder-title" class="add-update-folder-title"> |
| 176 | Rename Folder |
| 177 | </div> |
| 178 | <div class="folder-form-input"> |
| 179 | <input id="update-folder-item-name" autocomplete="off" placeholder="Folder name"> |
| 180 | </div> |
| 181 | <div class="folder-form-errors"> |
| 182 | <span class="dashicons dashicons-info"></span> Please enter folder name |
| 183 | </div> |
| 184 | <div class="folder-form-buttons"> |
| 185 | <button type="submit" class="form-submit-btn" id="update-folder-data" style="width: 106px">Submit</button> |
| 186 | <a href="javascript:;" class="form-cancel-btn">Cancel</a> |
| 187 | </div> |
| 188 | </form> |
| 189 | </div> |
| 190 | </div> |
| 191 | |
| 192 | <div class="folder-popup-form" id="confirm-remove-folder"> |
| 193 | <div class="popup-form-content"> |
| 194 | <div class="add-update-folder-title" id="remove-folder-message"> |
| 195 | Are you sure you want to delete the selected folder? |
| 196 | </div> |
| 197 | <div class="folder-form-message" id="remove-folder-notice"> |
| 198 | Items in the folder will not be deleted. |
| 199 | </div> |
| 200 | <div class="folder-form-buttons"> |
| 201 | <a href="javascript:;" class="form-cancel-btn">No, Keep it</a> |
| 202 | <a href="javascript:;" class="form-submit-btn" id="remove-folder-item">Yes, Delete it!</a> |
| 203 | </div> |
| 204 | </div> |
| 205 | </div> |
| 206 | |
| 207 | <div class="folder-popup-form" id="no-more-folder-credit"> |
| 208 | <div class="popup-form-content"> |
| 209 | <div class="add-update-folder-title" id="folder-limitation-message"> |
| 210 | |
| 211 | </div> |
| 212 | <div class="folder-form-message"> |
| 213 | Unlock unlimited amount of folders by upgrading to one of our pro plans. |
| 214 | </div> |
| 215 | <div class="folder-form-buttons"> |
| 216 | <a href="javascript:;" class="form-cancel-btn">Cancel</a> |
| 217 | <a href="<?php echo esc_url(admin_url("admin.php?page=wcp_folders_upgrade")) ?>" target="_blank" class="form-submit-btn">See Pro Plans</a> |
| 218 | </div> |
| 219 | </div> |
| 220 | </div> |
| 221 | |
| 222 | <div class="folder-popup-form" id="error-folder-popup"> |
| 223 | <div class="popup-form-content"> |
| 224 | <div class="add-update-folder-title" id="error-folder-popup-message"> |
| 225 | |
| 226 | </div> |
| 227 | <div class="folder-form-buttons"> |
| 228 | <a href="javascript:;" class="form-cancel-btn">Close</a> |
| 229 | </div> |
| 230 | </div> |
| 231 | </div> |
| 232 | |
| 233 | <div class="folder-popup-form" id="bulk-move-folder"> |
| 234 | <form action="" method="post" id="bulk-folder-form"> |
| 235 | <div class="popup-form-content"> |
| 236 | <div class="popup-folder-title"> |
| 237 | Select Folder |
| 238 | </div> |
| 239 | <div class="select-box"> |
| 240 | <select id="bulk-select"> |
| 241 | <option value="">Select Folder</option> |
| 242 | </select> |
| 243 | </div> |
| 244 | <div class="folder-form-buttons"> |
| 245 | <a href="javascript:;" class="form-cancel-btn">Cancel</a> |
| 246 | <button type="submit" class="form-submit-btn" id="move-to-folder" style="width: 200px">Move to Folder</button> |
| 247 | </div> |
| 248 | </div> |
| 249 | </form> |
| 250 | </div> |
| 251 |