Changeset 1889355
- Timestamp:
- 06/08/2018 04:09:30 AM (8 years ago)
- Location:
- astore-companion
- Files:
-
- 58 added
- 6 edited
-
tags/1.0.3 (added)
-
tags/1.0.3/assets (added)
-
tags/1.0.3/assets/css (added)
-
tags/1.0.3/assets/css/admin.css (added)
-
tags/1.0.3/assets/css/front.css (added)
-
tags/1.0.3/assets/images (added)
-
tags/1.0.3/assets/images/AjaxLoader.gif (added)
-
tags/1.0.3/assets/js (added)
-
tags/1.0.3/assets/js/admin.js (added)
-
tags/1.0.3/assets/js/front.js (added)
-
tags/1.0.3/assets/js/jquery.cookie.js (added)
-
tags/1.0.3/assets/js/jquery.cookie.min.js (added)
-
tags/1.0.3/astore-companion.php (added)
-
tags/1.0.3/inc (added)
-
tags/1.0.3/inc/AStore_Taxonomy_Images.php (added)
-
tags/1.0.3/inc/elementor-widgets (added)
-
tags/1.0.3/inc/elementor-widgets/elementor-widgets.php (added)
-
tags/1.0.3/inc/elementor-widgets/widgets (added)
-
tags/1.0.3/inc/elementor-widgets/widgets/latest-news.php (added)
-
tags/1.0.3/inc/pageMetabox (added)
-
tags/1.0.3/inc/pageMetabox/helpers (added)
-
tags/1.0.3/inc/pageMetabox/helpers/cmb_Meta_Box_Sanitize.php (added)
-
tags/1.0.3/inc/pageMetabox/helpers/cmb_Meta_Box_Show_Filters.php (added)
-
tags/1.0.3/inc/pageMetabox/helpers/cmb_Meta_Box_ajax.php (added)
-
tags/1.0.3/inc/pageMetabox/helpers/cmb_Meta_Box_field.php (added)
-
tags/1.0.3/inc/pageMetabox/helpers/cmb_Meta_Box_types.php (added)
-
tags/1.0.3/inc/pageMetabox/images (added)
-
tags/1.0.3/inc/pageMetabox/images/ico-delete.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-bg_flat_0_aaaaaa_40x100.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-bg_flat_75_ffffff_40x100.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-bg_glass_95_fef1ec_1x400.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-icons_222222_256x240.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-icons_454545_256x240.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-icons_888888_256x240.png (added)
-
tags/1.0.3/inc/pageMetabox/images/ui-icons_cd0a0a_256x240.png (added)
-
tags/1.0.3/inc/pageMetabox/init.php (added)
-
tags/1.0.3/inc/pageMetabox/js (added)
-
tags/1.0.3/inc/pageMetabox/js/cmb.js (added)
-
tags/1.0.3/inc/pageMetabox/js/cmb.min.js (added)
-
tags/1.0.3/inc/pageMetabox/js/jquery.datePicker.min.js (added)
-
tags/1.0.3/inc/pageMetabox/js/jquery.timePicker.min.js (added)
-
tags/1.0.3/inc/pageMetabox/options.php (added)
-
tags/1.0.3/inc/pageMetabox/style.css (added)
-
tags/1.0.3/inc/pageMetabox/style.min.css (added)
-
tags/1.0.3/inc/templates-importer (added)
-
tags/1.0.3/inc/templates-importer/parsers.php (added)
-
tags/1.0.3/inc/templates-importer/template-directory-tpl.php (added)
-
tags/1.0.3/inc/templates-importer/templates-importer.php (added)
-
tags/1.0.3/inc/templates-importer/wordpress-importer.php (added)
-
tags/1.0.3/inc/templates-importer/wxr (added)
-
tags/1.0.3/inc/widget-recent-posts.php (added)
-
tags/1.0.3/readme.txt (added)
-
trunk/assets/css/admin.css (modified) (1 diff)
-
trunk/astore-companion.php (modified) (8 diffs)
-
trunk/inc/elementor-widgets/widgets/latest-news.php (modified) (1 diff)
-
trunk/inc/pageMetabox/options.php (modified) (2 diffs)
-
trunk/inc/templates-importer/template-directory-tpl.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
astore-companion/trunk/assets/css/admin.css
r1861560 r1889355 264 264 outline:none !important; 265 265 } 266 267 .elementor-message{ 268 display:none; 269 } 270 form.astore-license-box { 271 max-width: 700px; 272 background: #fff; 273 margin: 20px 0; 274 padding: 20px 30px; 275 } -
astore-companion/trunk/astore-companion.php
r1871323 r1889355 5 5 Author: VelaThemes 6 6 Author URI: https://velathemes.com/ 7 Version: 1.0. 37 Version: 1.0.4 8 8 Text Domain: astore-companion 9 9 Domain Path: /languages … … 14 14 15 15 require_once 'inc/widget-recent-posts.php'; 16 require_once 'inc/pageMetabox/options.php'; 16 17 require_once 'inc/AStore_Taxonomy_Images.php'; 17 18 require_once 'inc/templates-importer/templates-importer.php'; … … 33 34 add_action( 'admin_enqueue_scripts', array(&$this , 'enqueue_admin_scripts' )); 34 35 add_action( 'wp_footer', array( $this, 'gridlist_set_default_view' ) ); 36 37 add_filter( 'astore_page_sidebar_layout', array(&$this ,'page_sidebar_layout'), 20,1 ); 38 add_action( 'astore_before_sidebar', array( $this, 'before_sidebar' ) ); 39 add_action( 'astore_after_sidebar', array( $this, 'after_sidebar' ) ); 35 40 36 41 … … 88 93 function enqueue_scripts() 89 94 { 95 96 global $post; 97 $custom_css = ''; 98 $postid = isset($post->ID)?$post->ID:0; 99 if(is_home()){ 100 $postid = get_option( 'page_for_posts' ); 101 } 102 103 if($postid>0){ 104 $this->slider = get_post_meta($postid, '_acmb_slideshow', true); 105 $bg_color = get_post_meta($postid, '_acmb_bg_color', true); 106 $bg_image = get_post_meta($postid, '_acmb_bg_image', true); 107 108 if($bg_color!=''){ 109 $custom_css .= '.page-id-'.$postid.' .page-wrap,.postid-'.$postid.' .page-wrap{background-color:'.$bg_color.';}'; 110 if( !is_page_template('template-sections.php') ) 111 $custom_css .= '.page-id-'.$postid.' .page-inner, .postid-'.$postid.' .page-inner{padding-top: 30px;}'; 112 } 113 if($bg_image!=''){ 114 $custom_css .= '.page-id-'.$postid.' .page-wrap, .postid-'.$postid.' .page-wrap{background-image:url('.$bg_image.');}'; 115 if( !is_page_template('template-sections.php') ) 116 $custom_css .= '.page-id-'.$postid.' .page-inner, .postid-'.$postid.' .page-inner{padding-top: 30px;}'; 117 118 } 119 120 } 121 if(!empty($this->slider) && is_array($this->slider)){ 122 $custom_css .= '.page-id-'.$postid.' .page-wrap, .blog .page-wrap{padding-top: 0;}.page-id-'.$postid.' .page-inner, .blog .page-inner{padding-top:30px;}'; 123 } 124 125 if (is_category()) { 126 $category = get_category(get_query_var('cat')); 127 $cat_id = $category->cat_ID; 128 if($cat_id>0){ 129 $category_meta = get_term_meta($cat_id); 130 $category_meta = isset($category_meta['cactus_category_meta'])?unserialize($category_meta['cactus_category_meta'][0]):null; 131 132 if(isset($category_meta[$cat_id]['_acmb_bg_color'])){ 133 $custom_css .= ".category-".$cat_id." .page-wrap{background-color:".$category_meta[$cat_id]['_acmb_bg_color'].";}"; 134 $custom_css .= ".category-".$cat_id." .page-inner, .category-".$cat_id." .page-inner{padding-top: 30px;}"; 135 } 136 if(isset($category_meta[$cat_id]['bg_img'])){ 137 $image = wp_get_attachment_image_url( $category_meta[ $cat_id ]['bg_img'], 'full'); 138 139 $custom_css .= ".category-".$cat_id." .page-wrap{background-image:url(".$image.");}"; 140 $custom_css .= ".category-".$cat_id." .page-inner, .category-".$cat_id." .page-inner{padding-top: 30px;}"; 141 } 142 143 } 144 } 90 145 91 146 $i18n = array(); … … 93 148 wp_enqueue_style( 'astore-companion-front', plugins_url('assets/css/front.css', __FILE__)); 94 149 wp_enqueue_script( 'astore-companion-front', plugins_url('assets/js/front.js', __FILE__),array('jquery'),'',true); 150 151 if($custom_css!='') 152 wp_add_inline_style( 'astore-companion-front', wp_filter_nohtml_kses($custom_css) ); 95 153 96 154 } … … 106 164 ); 107 165 108 } 166 add_submenu_page( 167 'astore-companion', __( 'AStore Theme License', 'astore-companion' ), __( 'AStore Theme License', 'astore-companion' ), 'manage_options', 'astore-license', 168 array( 'AStoreCompanion', 'license' ) 169 ); 170 add_action( 'admin_init', array(&$this,'register_mysettings') ); 171 } 172 173 /** 174 * Register settings 175 */ 176 function register_mysettings() { 177 register_setting( 'astore-settings-group', 'astore_companion_options', array(&$this,'text_validate') ); 178 } 179 180 static function license(){ 181 182 if ( !current_user_can( 'manage_options' ) ) { 183 wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); 184 } 185 ?> 186 187 <form method="post" class="astore-license-box" action="<?php echo admin_url('options.php');?>"> 188 189 <?php 190 settings_fields( 'astore-settings-group' ); 191 $options = get_option('astore_companion_options',AStoreCompanion::default_options()); 192 $astore_companion_options = wp_parse_args($options,AStoreCompanion::default_options()); 193 194 ?> 195 <div class="wrap"> 196 197 <div class="license"> 198 <p><?php _e( 'AStore License Key', 'astore-companion' );?>: <input size="50" name="astore_companion_options[license_key]" value="<?php echo $astore_companion_options['license_key'];?>" type="text" /></p> 199 <p></p> 200 201 </div> 202 <p class="submit"> 203 <input type="submit" class="button-primary" value="<?php _e('Save Changes','astore-companion');?>" /> 204 </p> 205 </div> 206 </form> 207 208 <?php } 109 209 110 210 /** … … 116 216 } 117 217 118 echo '< h2>'.__( 'About AStore', 'astore-companion' ).'</h2><div class="astore-info-wrap">218 echo '<div class="updated"><h2>'.__( 'About AStore', 'astore-companion' ).'</h2><div class="astore-info-wrap"> 119 219 <p>'. __( 'AStore is the best choice for building online store since it\'s fully compatible with WooCommerce, the most popular ecommerce plugin. Using Elementor page builder plugin, you could simply edit your site using just drag & drop.', 'astore-companion' ).'</p> 120 </div>'; 220 </div></div>'; 221 222 121 223 122 224 } … … 137 239 <?php 138 240 } 241 242 243 function before_sidebar(){ 244 global $post; 245 246 $postid = isset($post->ID)?$post->ID:0; 247 if( is_singular() ){ 248 249 $before_sidebar = get_post_meta($postid , '_acmb_before_sidebar', true); 250 if( $before_sidebar != '' ){ 251 echo '<div class="astore-before-sidebar">'; 252 echo wp_kses_post($before_sidebar); 253 echo '</div>'; 254 } 255 256 } 257 258 } 259 260 261 function after_sidebar(){ 262 global $post; 263 264 $postid = isset($post->ID)?$post->ID:0; 265 if( is_singular() ){ 266 267 $after_sidebar = get_post_meta($postid , '_acmb_after_sidebar', true); 268 if( $after_sidebar != '' ){ 269 echo '<div class="astore-after-sidebar">'; 270 echo wp_kses_post($after_sidebar); 271 echo '</div>'; 272 } 273 274 } 275 276 } 277 278 /** 279 * Get sidebar layout 280 */ 281 282 function page_sidebar_layout( $content ){ 283 284 global $post; 285 286 $postid = isset($post->ID)?$post->ID:0; 287 if(is_home()){ 288 $postid = get_option( 'page_for_posts' ); 289 } 290 291 if((is_singular()||is_home()) && $postid>0){ 292 293 $sidebar_layout = get_post_meta($postid , '_acmb_sidebar', true); 294 295 if( $sidebar_layout != '' ) 296 return $sidebar_layout; 297 } 298 299 if (is_category()) { 300 $category = get_category(get_query_var('cat')); 301 $cat_id = $category->cat_ID; 302 if($cat_id>0){ 303 $category_meta = get_term_meta($cat_id); 304 $category_meta = isset($category_meta['astore_category_meta'])?unserialize($category_meta['astore_category_meta'][0]):null; 305 306 if(isset($category_meta[$cat_id]['_acmb_sidebar'])){ 307 $sidebar_layout = $category_meta[$cat_id]['_acmb_sidebar']; 308 if( $sidebar_layout != '' ) 309 return $sidebar_layout; 310 } 311 } 312 } 313 314 return $content; 315 316 } 139 317 140 318 /** -
astore-companion/trunk/inc/elementor-widgets/widgets/latest-news.php
r1861560 r1889355 98 98 99 99 100 <div class=" cactus-section">101 <div class=" cactus-section-content">102 <div class=" cactus-section-container">100 <div class="astore-section"> 101 <div class="astore-section-content"> 102 <div class="astore-section-container"> 103 103 <div class="row"> 104 104 -
astore-companion/trunk/inc/pageMetabox/options.php
r1861560 r1889355 10 10 function acmb_page_metaboxes( array $meta_boxes ) { 11 11 12 $prefix = '_ ccmb_';12 $prefix = '_acmb_'; 13 13 14 14 /** … … 49 49 ), 50 50 ), 51 array( 52 'name' => __( 'Content Before Sidebar', 'astore-companion' ), 53 'desc' => '', 54 'id' => $prefix . 'before_sidebar', 55 'type' => 'textarea', 56 'default' => '' 57 ), 58 59 60 array( 61 'name' => __( 'Content After Sidebar', 'astore-companion' ), 62 'desc' => '', 63 'id' => $prefix . 'after_sidebar', 64 'type' => 'textarea', 65 'default' => '' 66 ), 67 68 51 69 52 70 ) -
astore-companion/trunk/inc/templates-importer/template-directory-tpl.php
r1861560 r1889355 1 1 <?php 2 3 2 4 3 $preview_url = add_query_arg( 'astore_templates', '', home_url() ); -
astore-companion/trunk/readme.txt
r1871323 r1889355 32 32 33 33 == Changelog == 34 35 = 1.0.4 = 36 * Added License Key option 37 34 38 = 1.0.3 = 35 39 * Added template > AStore Frontpage 2
Note: See TracChangeset
for help on using the changeset viewer.