Astra Starter Sites - Version 2.3.6

Version Description

Download this release

Release Info

Developer brainstormworg
Plugin Icon Astra Starter Sites
Version 2.3.6
Comparing to
See all releases

Code changes from version 2.3.5 to 2.3.6

astra-sites.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Starter Templates
4
  * Plugin URI: https://wpastra.com/
5
  * Description: Starter Templates is all in one solution for complete starter sites, single page templates, blocks & images. This plugin offers the premium library of ready templates & provides quick access to beautiful Pixabay images that can be imported in your website easily.
6
- * Version: 2.3.5
7
  * Author: Brainstorm Force
8
  * Author URI: https://www.brainstormforce.com
9
  * Text Domain: astra-sites
@@ -19,7 +19,7 @@ if ( ! defined( 'ASTRA_SITES_NAME' ) ) {
19
  }
20
 
21
  if ( ! defined( 'ASTRA_SITES_VER' ) ) {
22
- define( 'ASTRA_SITES_VER', '2.3.5' );
23
  }
24
 
25
  if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
3
  * Plugin Name: Starter Templates
4
  * Plugin URI: https://wpastra.com/
5
  * Description: Starter Templates is all in one solution for complete starter sites, single page templates, blocks & images. This plugin offers the premium library of ready templates & provides quick access to beautiful Pixabay images that can be imported in your website easily.
6
+ * Version: 2.3.6
7
  * Author: Brainstorm Force
8
  * Author URI: https://www.brainstormforce.com
9
  * Text Domain: astra-sites
19
  }
20
 
21
  if ( ! defined( 'ASTRA_SITES_VER' ) ) {
22
+ define( 'ASTRA_SITES_VER', '2.3.6' );
23
  }
24
 
25
  if ( ! defined( 'ASTRA_SITES_FILE' ) ) {
inc/assets/css/astra-notices-rtl.css ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #astra-sites-5-start-notice .notice-container {
2
+ padding-top: 10px;
3
+ padding-bottom: 10px;
4
+ display: flex;
5
+ justify-content: right;
6
+ align-items: center;
7
+ }
8
+
9
+ #astra-sites-5-start-notice .notice-content {
10
+ margin-right: 15px;
11
+ }
12
+
13
+ #astra-sites-5-start-notice .notice-image img {
14
+ width: 90px;
15
+ }
16
+
17
+ #astra-sites-5-start-notice .astra-review-notice-container {
18
+ display: flex;
19
+ align-items: center;
20
+ padding-top: 10px;
21
+ }
22
+
23
+ #astra-sites-5-start-notice .astra-review-notice-container .dashicons {
24
+ font-size: 1.4em;
25
+ padding-right: 10px;
26
+ }
27
+
28
+ #astra-sites-5-start-notice .astra-review-notice-container a {
29
+ padding-right: 5px;
30
+ text-decoration: none;
31
+ }
inc/assets/css/astra-notices.css ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #astra-sites-5-start-notice .notice-container {
2
+ padding-top: 10px;
3
+ padding-bottom: 10px;
4
+ display: flex;
5
+ justify-content: left;
6
+ align-items: center;
7
+ }
8
+
9
+ #astra-sites-5-start-notice .notice-content {
10
+ margin-left: 15px;
11
+ }
12
+
13
+ #astra-sites-5-start-notice .notice-image img {
14
+ width: 90px;
15
+ }
16
+
17
+ #astra-sites-5-start-notice .astra-review-notice-container {
18
+ display: flex;
19
+ align-items: center;
20
+ padding-top: 10px;
21
+ }
22
+
23
+ #astra-sites-5-start-notice .astra-review-notice-container .dashicons {
24
+ font-size: 1.4em;
25
+ padding-left: 10px;
26
+ }
27
+
28
+ #astra-sites-5-start-notice .astra-review-notice-container a {
29
+ padding-left: 5px;
30
+ text-decoration: none;
31
+ }
inc/assets/images/logo.svg CHANGED
@@ -1,20 +1,47 @@
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
- width="250px" height="250px" viewBox="0 0 250 250" enable-background="new 0 0 250 250" xml:space="preserve">
 
 
 
 
 
 
 
 
 
6
  <g>
7
-
8
- <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="12.3491" y1="911.4727" x2="196.6505" y2="745.5269" gradientTransform="matrix(1 0 0 1 21.5 -702.5)">
9
- <stop offset="0" style="stop-color:#5437DC"/>
10
- <stop offset="1" style="stop-color:#EE79FF"/>
11
- </linearGradient>
12
- <circle fill="url(#SVGID_1_)" cx="126" cy="126" r="124"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  </g>
14
- <g>
15
- <path fill="#FFFFFF" d="M124.508,57.006c-0.003-0.002-0.005-0.004-0.008-0.006c-20.998,44.329-42.002,88.671-63,133
16
- c8.999,0,18.001,0,27,0c16.994-34.32,33.993-68.651,50.986-102.972L124.508,57.006z"/>
17
- </g>
18
- <path fill="#FFFFFF" d="M152.5,112c-8.666,17.998-17.334,36.002-26,54l-0.5,1h0.5c8.333,0,16.668,0,25,0
19
- c3.333,7.666,6.667,15.334,10,23c9.666,0,19.334,0,29,0C177.835,164.002,165.166,137.998,152.5,112z"/>
20
  </svg>
1
  <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In SVG - Version: 6.00 Build 0) -->
 
3
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{opacity:0.83;enable-background:new ;}
7
+ .st1{fill:#95F9EF;}
8
+ .st2{opacity:0.53;enable-background:new ;}
9
+ .st3{fill:url(#SVGID_1_);}
10
+ .st4{opacity:0.7;enable-background:new ;}
11
+ .st5{fill:url(#SVGID_2_);}
12
+ .st6{fill:#FFFFFF;}
13
+ </style>
14
  <g>
15
+ <g class="st0">
16
+ <path class="st1" d="M26.8,88L9,33.5C8,30.7,9.6,27.8,12.2,27L66.8,9.2c2.7-0.9,5.7,0.6,6.4,3.2l17.9,54.6
17
+ c0.9,2.7-0.6,5.7-3.2,6.4l-54.6,18C30.5,92.2,27.6,90.8,26.8,88z"/>
18
+ </g>
19
+ <g class="st2">
20
+
21
+ <linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="4.238" y1="739.9995" x2="95.762" y2="739.9995" gradientTransform="matrix(1 0 0 1 0 -690)">
22
+ <stop offset="0" style="stop-color:#00E97B"/>
23
+ <stop offset="1" style="stop-color:#00F9D7"/>
24
+ </linearGradient>
25
+ <path class="st3" d="M44.7,94.3L5.6,52c-1.9-2.1-1.8-5.3,0.3-7.3L48.1,5.4c2.1-1.9,5.3-1.8,7.2,0.3L94.4,48
26
+ c1.9,2.1,1.8,5.3-0.3,7.3L51.9,94.6C50,96.6,46.6,96.4,44.7,94.3z"/>
27
+ </g>
28
+ <g class="st4">
29
+
30
+ <linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="296.5753" y1="-720.5554" x2="368.5928" y2="-720.5554" gradientTransform="matrix(0.9591 0.2829 0.2829 -0.9591 -65.1611 -734.9626)">
31
+ <stop offset="0" style="stop-color:#00DBDE"/>
32
+ <stop offset="1" style="stop-color:#FC00FF"/>
33
+ </linearGradient>
34
+ <path class="st5" d="M69.2,93.3L10.6,76.1c-2.9-0.8-4.5-3.9-3.7-6.8l17.2-58.6c0.8-2.9,3.9-4.5,6.8-3.7l58.6,17.2
35
+ c2.9,0.8,4.5,3.9,3.7,6.8L75.9,89.6C75.1,92.5,72,94.1,69.2,93.3z"/>
36
+ </g>
37
+ <g>
38
+ <path class="st6" d="M51.9,39.1L51.9,39.1h14.4V28.4H45.9c-1.9,0-3.7,0.3-5.3,1.1c-1.6,0.6-3.1,1.8-4.4,2.9
39
+ c-1.3,1.3-2.2,2.7-2.9,4.4c-0.4,0.7-0.6,1.6-0.8,2.4L51.9,39.1L51.9,39.1z"/>
40
+ <path class="st6" d="M66.9,53.3c-0.6-1.6-1.8-3.2-2.9-4.4c-1.3-1.3-2.7-2.2-4.4-2.9c-1.6-0.6-3.5-1.1-5.3-1.1h-2.4h-6H32.5
41
+ c0.2,0.9,0.5,1.7,0.8,2.6c0.6,1.6,1.8,3.2,2.9,4.4c1.3,1.3,2.7,2.2,4.4,2.9c1.6,0.8,3.5,1.1,5.3,1.1h8.4c0.5,0,0.8,0,1.1,0.2
42
+ c0.3,0.2,0.6,0.3,0.9,0.6c0.3,0.3,0.5,0.6,0.6,0.9c0.2,0.3,0.2,0.8,0.2,1.1c0,0.5,0,0.8-0.2,1.1c-0.2,0.3-0.3,0.6-0.6,0.9
43
+ c-0.3,0.3-0.6,0.5-0.9,0.6c-0.3,0.2-0.8,0.2-1.1,0.2h-20v10.8h19.8c1.9,0,3.7-0.3,5.5-1.1c1.6-0.6,3.2-1.8,4.4-2.9
44
+ c1.3-1.3,2.2-2.7,2.9-4.4c0.6-1.6,1.1-3.5,1.1-5.3C68,56.6,67.7,54.9,66.9,53.3z"/>
45
+ </g>
46
  </g>
 
 
 
 
 
 
47
  </svg>
inc/assets/js/admin-page.js CHANGED
@@ -1212,6 +1212,17 @@ var AstraSitesAjaxQueue = (function() {
1212
  } else {
1213
  AstraSitesAdmin._sync_library_with_ajax();
1214
  }
 
 
 
 
 
 
 
 
 
 
 
1215
  }
1216
  });
1217
  },
1212
  } else {
1213
  AstraSitesAdmin._sync_library_with_ajax();
1214
  }
1215
+ } else {
1216
+ $('#wpbody-content').find('.astra-sites-sync-library-message').remove();
1217
+ var noticeContent = wp.updates.adminNotice( {
1218
+ className: 'notice astra-sites-notice notice-error is-dismissible astra-sites-sync-library-message',
1219
+ message: response.data + ' <button type="button" class="notice-dismiss"><span class="screen-reader-text">'+astraSitesVars.dismiss+'</span></button>',
1220
+ } );
1221
+ $('#screen-meta').after( noticeContent );
1222
+ $(document).trigger( 'wp-updates-notice-added' );
1223
+ button.removeClass( 'updating-message');
1224
+ AstraSitesAdmin._log( 'Already sync all the sites.' );
1225
+ console.groupEnd( 'Update Library Request' );
1226
  }
1227
  });
1228
  },
inc/classes/class-astra-sites.php CHANGED
@@ -102,6 +102,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
102
  $this->includes();
103
 
104
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
 
105
  add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
106
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ), 99 );
107
  add_action( 'wp_enqueue_scripts', array( $this, 'image_search_scripts' ) );
@@ -902,6 +903,18 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
902
  load_plugin_textdomain( 'astra-sites' );
903
  }
904
 
 
 
 
 
 
 
 
 
 
 
 
 
905
  /**
906
  * Admin Notices
907
  *
@@ -909,6 +922,50 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
909
  * @return void
910
  */
911
  public function admin_notices() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
912
  add_action( 'plugin_action_links_' . ASTRA_SITES_BASE, array( $this, 'action_links' ) );
913
  }
914
 
@@ -1072,7 +1129,7 @@ if ( ! class_exists( 'Astra_Sites' ) ) :
1072
  public function admin_enqueue( $hook = '' ) {
1073
 
1074
  // Image Search assets.
1075
- if ( 'post.php' === $hook || 'widgets.php' === $hook ) {
1076
  $this->image_search_assets();
1077
  }
1078
 
102
  $this->includes();
103
 
104
  add_action( 'admin_notices', array( $this, 'admin_notices' ) );
105
+ add_action( 'astra_notice_before_markup', array( $this, 'notice_assets' ) );
106
  add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
107
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ), 99 );
108
  add_action( 'wp_enqueue_scripts', array( $this, 'image_search_scripts' ) );
903
  load_plugin_textdomain( 'astra-sites' );
904
  }
905
 
906
+ /**
907
+ * Enqueue Astra Notices CSS.
908
+ *
909
+ * @since 2.3.6
910
+ *
911
+ * @return void
912
+ */
913
+ public static function notice_assets() {
914
+ $file = is_rtl() ? 'astra-notices-rtl.css' : 'astra-notices.css';
915
+ wp_enqueue_style( 'astra-sites-notices', ASTRA_SITES_URI . 'inc/assets/css/' . $file, array(), ASTRA_SITES_VER );
916
+ }
917
+
918
  /**
919
  * Admin Notices
920
  *
922
  * @return void
923
  */
924
  public function admin_notices() {
925
+
926
+ $image_path = esc_url( ASTRA_SITES_URI . 'inc/assets/images/logo.svg' );
927
+
928
+ Astra_Notices::add_notice(
929
+ array(
930
+ 'id' => 'astra-sites-5-start-notice',
931
+ 'type' => 'info',
932
+ 'class' => 'astra-sites-5-star',
933
+ 'show_if' => ( false === Astra_Sites_White_Label::get_instance()->is_white_labeled() ),
934
+ /* translators: %1$s white label plugin name and %2$s deactivation link */
935
+ 'message' => sprintf(
936
+ '<div class="notice-image" style="display: flex;">
937
+ <img src="%1$s" class="custom-logo" alt="Starter Templates" itemprop="logo" style="max-width: 90px;"></div>
938
+ <div class="notice-content">
939
+ <div class="notice-heading">
940
+ %2$s
941
+ </div>
942
+ %3$s<br />
943
+ <div class="astra-review-notice-container">
944
+ <a href="%4$s" class="astra-notice-close astra-review-notice button-primary" target="_blank">
945
+ %5$s
946
+ </a>
947
+ <span class="dashicons dashicons-calendar"></span>
948
+ <a href="#" data-repeat-notice-after="%6$s" class="astra-notice-close astra-review-notice">
949
+ %7$s
950
+ </a>
951
+ <span class="dashicons dashicons-smiley"></span>
952
+ <a href="#" class="astra-notice-close astra-review-notice">
953
+ %8$s
954
+ </a>
955
+ </div>
956
+ </div>',
957
+ $image_path,
958
+ __( 'Hello! Seems like you have used Starter Templates to build this website &mdash; Thanks a ton!', 'astra-sites' ),
959
+ __( 'Could you please do us a BIG favor and give it a 5-star rating on WordPress? This would boost our motivation and help other users make a comfortable decision while choosing the Starter Templates.', 'astra-sites' ),
960
+ 'https://wordpress.org/support/plugin/astra-sites/reviews/?filter=5#new-post',
961
+ __( 'Ok, you deserve it', 'astra-sites' ),
962
+ MONTH_IN_SECONDS,
963
+ __( 'Nope, maybe later', 'astra-sites' ),
964
+ __( 'I already did', 'astra-sites' )
965
+ ),
966
+ )
967
+ );
968
+
969
  add_action( 'plugin_action_links_' . ASTRA_SITES_BASE, array( $this, 'action_links' ) );
970
  }
971
 
1129
  public function admin_enqueue( $hook = '' ) {
1130
 
1131
  // Image Search assets.
1132
+ if ( 'post-new.php' === $hook || 'post.php' === $hook || 'widgets.php' === $hook ) {
1133
  $this->image_search_assets();
1134
  }
1135
 
languages/astra-sites.pot CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Starter Templates package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Starter Templates 2.3.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
7
  "POT-Creation-Date: 2020-08-27 10:35:32+00:00\n"
8
  "MIME-Version: 1.0\n"
2
  # This file is distributed under the same license as the Starter Templates package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Starter Templates 2.3.6\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astra-sites\n"
7
  "POT-Creation-Date: 2020-08-27 10:35:32+00:00\n"
8
  "MIME-Version: 1.0\n"
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Elementor,Beaver Builder,Templates,Gutenberg,Astra Starter Sites
5
  Requires at least: 4.4
6
  Requires PHP: 5.3
7
  Tested up to: 5.5
8
- Stable tag: 2.3.5
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -140,6 +140,10 @@ We are open to suggestions and would love to work on topics that our users are l
140
 
141
  == Changelog ==
142
 
 
 
 
 
143
  v2.3.5 - 27-August-2020
144
  - Improvement: Added Safe Search checkbox for Pixabay Image Search.
145
  - Fix: Elementor 3.0.0 and above import compatibility.
5
  Requires at least: 4.4
6
  Requires PHP: 5.3
7
  Tested up to: 5.5
8
+ Stable tag: 2.3.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
140
 
141
  == Changelog ==
142
 
143
+ v2.3.6 - 23-September-2020
144
+ - Improvement: Added the Pixabay images support for new post, pages, and custom post type screen.
145
+ - Improvement: Better handling of notices in the case of sync process.
146
+
147
  v2.3.5 - 27-August-2020
148
  - Improvement: Added Safe Search checkbox for Pixabay Image Search.
149
  - Fix: Elementor 3.0.0 and above import compatibility.