diff --git a/CHANGELOG.md b/CHANGELOG.md index 1afb86a..6e1a78b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [1.1.0] - 2017-10-01 +### Added +- Notifications + ## [1.0.9] - 2017-01-26 ### Added - Merge Dev and Master branches diff --git a/admin/js/pine-notifications.js b/admin/js/pine-notifications.js new file mode 100644 index 0000000..7c35377 --- /dev/null +++ b/admin/js/pine-notifications.js @@ -0,0 +1,16 @@ +( function( $ ) { + 'use strict'; + + $( document ) + .on( 'click', '.notice.is-dismissible.pine-notice .notice-dismiss', function() { + $.ajax( { + method: 'POST', + url: ajaxurl, + data: { + action: 'pine_notification_dismiss', + }, + dataType: 'json', + global: false, + } ); + } ); +}( jQuery ) ); diff --git a/functions.php b/functions.php index ddc171f..9127495 100644 --- a/functions.php +++ b/functions.php @@ -192,6 +192,11 @@ function pine_custom_style() { */ require get_template_directory() . '/inc/jetpack.php'; +/** + * Pine Notifications + */ +require get_template_directory() . '/inc/notifications.php'; + /** * Pine Admin Page */ diff --git a/gulpconfig.json b/gulpconfig.json index 97e7f53..4dd810c 100644 --- a/gulpconfig.json +++ b/gulpconfig.json @@ -99,6 +99,9 @@ ], "source/admin/js/pine-less.js": [ "admin/js" + ], + "source/admin/js/pine-notifications.js": [ + "admin/js" ] } } diff --git a/inc/admin-page.php b/inc/admin-page.php index 88fcc71..5d688b5 100644 --- a/inc/admin-page.php +++ b/inc/admin-page.php @@ -5,7 +5,7 @@ * @package Pine */ -/** Load WordPress dashboard API */ +// Load WordPress dashboard API. require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); /** @@ -45,18 +45,83 @@ function pine_admin_page_scripts( $hook ) { */ function pine_welcome_metabox() { ?> -

' . esc_html__( 'here', 'pine' ) . '', '' . esc_html__( 'GitHub', 'pine' ) . '' ); ?>

-

Follow @themejack Star +

+ ' . esc_html__( 'here', 'pine' ) . '', + '' . esc_html__( 'GitHub', 'pine' ) . '' + ); + + // translators: %s is a GitHub username. + $follow_aria_label = sprintf( __( 'Follow %s on GitHub', 'pine' ), '@themejack' ); + // translators: %is is a number of GitHub followers. + $follow_count_aria_label = sprintf( __( '%s followers on GitHub', 'pine' ), '#' ); + + // translators: %s is a GitHub repo name. + $star_aria_label = sprintf( __( 'Star %s on GitHub', 'pine' ), 'themejack/pine' ); + // translators: %is is a number of GitHub stargazers. + $star_count_aria_label = sprintf( __( '%s stargazers on GitHub', 'pine' ), '#' ); + ?> +

+

+ + + + + +

display_all(); +} + /** * Customize metabox */ function pine_customize_metabox() { ?> -

urlencode( 'themes.php/?page=pine' ) ), admin_url( '/customize.php' ) ) ) . '">' . esc_html__( 'customizer', 'pine' ) . '' ); ?>

+

+ rawurlencode( 'themes.php/?page=pine' ), + ), admin_url( '/customize.php' ) ) ) . + '">' . esc_html__( 'customizer', 'pine' ) . '' + ); + ?> +

-

' . esc_html__( 'GitHub', 'pine' ) . '' ); ?>

-

Fork Download child theme +

+ ' . esc_html__( 'GitHub', 'pine' ) . '' + ); + ?> +

+ +

+ + + + + +

- +
' . wp_kses( sprintf( __( 'RSS Error: %s', 'pine' ), $rss->get_error_message() ), array( 'strong' => array() ) ) . '

'; + echo '

' . + wp_kses( + sprintf( + // translators: %s is an error message. + __( 'RSS Error: %s', 'pine' ), + $rss->get_error_message() + ), + array( + 'strong' => array(), + ) + ) . + '

'; } return; } - $default_args = array( 'show_author' => 0, 'show_date' => 0, 'show_summary' => 0, 'items' => 0 ); + $default_args = array( + 'show_author' => 0, + 'show_date' => 0, + 'show_summary' => 0, + 'items' => 0, + ); $args = wp_parse_args( $args, $default_args ); $items = (int) $args['items']; @@ -241,10 +355,77 @@ function pine_sj_widget_rss_output( $rss, $args = array() ) { */ function pine_contribute_metabox() { ?> -

' . esc_html__( 'new issue', 'pine' ) . '' ); ?>
- ' . esc_html__( 'pull request', 'pine' ) . '' ); ?>
- ' . esc_html__( 'Github', 'pine' ) . '' ); ?>

-

Watch Issue Fork +

+ ' . esc_html__( 'new issue', 'pine' ) . '' + ); + ?> +
+ ' . esc_html__( 'pull request', 'pine' ) . '' + ); + ?> +
+ ' . esc_html__( 'Github', 'pine' ) . '' + ); + ?> +

+ +

+ + + + + + + + +

'; /* jshint ignore:end */ - +
@@ -292,6 +475,7 @@ function pine_admin_page() { $screen = get_current_screen(); add_meta_box( 'pine_welcome', __( 'Welcome', 'pine' ), 'pine_welcome_metabox', $screen->id, 'normal' ); + add_meta_box( 'pine_notifications', __( 'Notifications', 'pine' ), 'pine_notifications_metabox', $screen->id, 'normal' ); add_meta_box( 'pine_customize', __( 'Customize', 'pine' ), 'pine_customize_metabox', $screen->id, 'normal' ); add_meta_box( 'pine_child_theme', __( 'Child theme', 'pine' ), 'pine_child_theme_metabox', $screen->id, 'normal' ); add_meta_box( 'pine_contribute', __( 'Contribute to Pine', 'pine' ), 'pine_contribute_metabox', $screen->id, 'normal' ); @@ -299,7 +483,7 @@ function pine_admin_page() { add_meta_box( 'dashboard_slicejack', __( 'Slicejack News', 'pine' ), 'pine_sj_dashboard_widget', $screen->id, 'side', 'high' ); ?>
-

1.0.9

+

1.1.0

diff --git a/inc/classes/class-pine-notifications.php b/inc/classes/class-pine-notifications.php new file mode 100644 index 0000000..ab729e6 --- /dev/null +++ b/inc/classes/class-pine-notifications.php @@ -0,0 +1,251 @@ +notifications = array( + sprintf( + // translators: %s is a link to the theme. + esc_html__( 'We are happy to inform you that Pine PRO theme is available for purchase. %s', 'pine' ), + $this->get_theme_link( esc_html__( 'Get it!', 'pine' ) ) + ), + sprintf( + // translators: %s is a link to the theme. + esc_html__( '460+ Customizable Design Options, Drag and Drop Page Builder, 800+ Google Fonts and more. %s', 'pine' ), + $this->get_theme_link() + ), + sprintf( + // translators: %s is a link to the theme. + esc_html( 'We’ve got great news! Pine PRO is now available for download. %s', 'pine' ), + $this->get_theme_link( esc_html__( 'Get it!', 'pine' ) ) + ), + ); + + add_action( 'admin_notices', array( $this, 'admin_notice' ) ); + add_action( 'wp_ajax_pine_notification_dismiss', array( $this, 'handle_ajax_dismiss' ) ); + add_action( 'wp_ajax_pine_reset_notification_dismiss', array( $this, 'handle_ajax_reset_dismiss' ) ); + add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue' ) ); + } + + /** + * Admin notices + * + * @since 1.1.0 + * @return void + */ + public function admin_notice() { + if ( ! $this->should_display_notification() ) { + return; + } + + $notification = $this->get_next_notification(); + + if ( empty( $notification ) ) { + return; + } + + ?> +
+

+ +

+
+ notifications ) ) { + return; + } + + $notification = $this->get_next_notification(); + + if ( empty( $notification ) ) { + return; + } + + ?> +
+

+ +

+
+ true, + ) ); + die(); + } + + /** + * Handle ajax reset notification dismiss + * + * @return void + */ + public function handle_ajax_reset_dismiss() { + if ( empty( $_REQUEST['action'] ) || 'pine_reset_notification_dismiss' !== $_REQUEST['action'] ) { + return; + } + + update_option( 'pine_pine-pro_dismissed_timestamp_' . get_current_user_id(), 0 ); + + echo wp_json_encode( array( + 'success' => true, + ) ); + die(); + } + + /** + * Enqueue admin scripts and styles. + * + * @return void + */ + public function admin_enqueue() { + wp_enqueue_script( 'pine-notifications', get_template_directory_uri() . '/admin/js/pine-notifications.js', array( 'jquery' ), true ); + } + + /** + * Should display notification + * + * @since 1.1.0 + * @return boolean + */ + private function should_display_notification() { + $wp_themes = wp_get_themes(); + + // Bail out early if Pine PRO is already installed. + if ( array_key_exists( 'pine-pro', $wp_themes ) ) { + return false; + } + + $timezone = new DateTimeZone( 'UTC' ); + $dismissed_timestamp = get_option( 'pine_pine-pro_dismissed_timestamp_' . get_current_user_id(), 0 ); + $dismissed = new DateTime(); + $dismissed->setTimezone( $timezone ); + $dismissed->setTimestamp( $dismissed_timestamp ); + + $reset_datetime = new DateTime( '-30day', $timezone ); + + if ( $reset_datetime > $dismissed ) { + return true; + } + + return false; + } + + /** + * Returns next notification + * + * @since 1.1.0 + * @return string + */ + private function get_next_notification() { + $last_notification = (int) get_option( 'pine_pine-pro_last_notification_index_' . get_current_user_id(), -1 ); + + if ( + ! is_int( $last_notification ) || + $last_notification < 0 || + $last_notification >= ( count( $this->notifications ) - 1 ) + ) { + $notification_index = 0; + } else { + $notification_index = $last_notification + 1; + } + + update_option( 'pine_pine-pro_last_notification_index_' . get_current_user_id(), $notification_index ); + + return $this->notifications[ $notification_index ]; + } + + /** + * Returns theme link html anchor. + * + * @since 1.1.0 + * @param string $label Label of the anchor. + * @return string + */ + private function get_theme_link( $label = '' ) { + if ( empty( $label ) ) { + $label = esc_html__( 'Download Pine PRO', 'pine' ); + } + + return '' . $label . ''; + } +} diff --git a/inc/notifications.php b/inc/notifications.php new file mode 100644 index 0000000..b8b6593 --- /dev/null +++ b/inc/notifications.php @@ -0,0 +1,11 @@ +\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: 404.php:15, dist/wordpressorg/pine/404.php:15 +#: 404.php:15 msgid "Don't fall down!" msgstr "" -#: 404.php:15, dist/wordpressorg/pine/404.php:15 +#: 404.php:15 msgid "Come back to %s." msgstr "" -#: 404.php:15, dist/wordpressorg/pine/404.php:15 +#: 404.php:15 msgid "Homepage" msgstr "" -#: 404.php:17, dist/wordpressorg/pine/404.php:17 +#: 404.php:17 msgid "It's looking like you may have taken a wrong turn." msgstr "" -#: 404.php:17, dist/wordpressorg/pine/404.php:17 +#: 404.php:17 msgid "Don't worry, it happens to the best of us." msgstr "" -#: comments.php:31, dist/wordpressorg/pine/comments.php:31 +#: comments.php:31 msgctxt "comments title" msgid "One thought on “%2$s”" msgid_plural "%1$s thoughts on “%2$s”" msgstr[0] "" msgstr[1] "" -#: comments.php:40, comments.php:61, dist/wordpressorg/pine/comments.php:40, dist/wordpressorg/pine/comments.php:61 +#: comments.php:40, comments.php:61 msgid "Comment navigation" msgstr "" -#: comments.php:43, comments.php:64, dist/wordpressorg/pine/comments.php:43, dist/wordpressorg/pine/comments.php:64 +#: comments.php:43, comments.php:64 msgid "Older Comments" msgstr "" -#: comments.php:44, comments.php:65, dist/wordpressorg/pine/comments.php:44, dist/wordpressorg/pine/comments.php:65 +#: comments.php:44, comments.php:65 msgid "Newer Comments" msgstr "" -#: comments.php:78, dist/wordpressorg/pine/comments.php:78 +#: comments.php:78 msgid "Comments are closed." msgstr "" -#: footer.php:26, dist/wordpressorg/pine/footer.php:26 +#: footer.php:26 msgid "%1$s © %2$s. - Created by %3$s." msgstr "" -#: functions.php:68, dist/wordpressorg/pine/functions.php:68 +#: functions.php:68 msgid "Primary Menu" msgstr "" -#: functions.php:125, dist/wordpressorg/pine/functions.php:125 +#: functions.php:125 msgid "Sidebar" msgstr "" -#: header.php:24, dist/wordpressorg/pine/header.php:24 +#: header.php:24 msgid "Skip to content" msgstr "" -#: projects-list.php:54, dist/wordpressorg/pine/projects-list.php:54 +#: projects-list.php:54 msgid "All" msgstr "" -#: search.php:18, dist/wordpressorg/pine/search.php:18 +#: search.php:18 msgid "Search Results for: %s" msgstr "" -#: searchform.php:11, searchform.php:12, dist/wordpressorg/pine/searchform.php:11, dist/wordpressorg/pine/searchform.php:12 +#: searchform.php:11, searchform.php:12 msgctxt "label" msgid "Search for:" msgstr "" -#: searchform.php:12, dist/wordpressorg/pine/searchform.php:12 +#: searchform.php:12 msgctxt "placeholder" msgid "Search …" msgstr "" -#: searchform.php:14, dist/wordpressorg/pine/searchform.php:14 +#: searchform.php:14 msgctxt "submit button" msgid "Search" msgstr "" -#: single.php:53, dist/wordpressorg/pine/single.php:53 +#: single.php:53 msgid "Back to homepage" msgstr "" -#: inc/admin-page.php:48, dist/wordpressorg/pine/inc/admin-page.php:48 +#: inc/admin-page.php:52 msgid "Glad to see you here. To start you can read our introduction blog post %1$s. If you are looking for documentation you can find it on %2$s, also our code is very well documented." msgstr "" -#: inc/admin-page.php:48, dist/wordpressorg/pine/inc/admin-page.php:48 +#: inc/admin-page.php:53 msgid "here" msgstr "" -#: inc/admin-page.php:48, inc/admin-page.php:68, inc/customizer.php:389, inc/template-tags.php:216, dist/wordpressorg/pine/inc/admin-page.php:48, dist/wordpressorg/pine/inc/admin-page.php:68, dist/wordpressorg/pine/inc/customizer.php:389, dist/wordpressorg/pine/inc/template-tags.php:216 +#: inc/admin-page.php:54, inc/admin-page.php:138, inc/customizer.php:389, inc/template-tags.php:216 msgid "GitHub" msgstr "" -#: inc/admin-page.php:59, dist/wordpressorg/pine/inc/admin-page.php:59 +#: inc/admin-page.php:58 +msgid "Follow %s on GitHub" +msgstr "" + +#: inc/admin-page.php:60 +msgid "%s followers on GitHub" +msgstr "" + +#: inc/admin-page.php:63 +msgid "Star %s on GitHub" +msgstr "" + +#: inc/admin-page.php:65 +msgid "%s stargazers on GitHub" +msgstr "" + +#: inc/admin-page.php:78 +msgid "Follow %s" +msgstr "" + +#: inc/admin-page.php:89 +msgid "Star" +msgstr "" + +#: inc/admin-page.php:116 msgid "Theme customization never been easier. Try %s." msgstr "" -#: inc/admin-page.php:59, dist/wordpressorg/pine/inc/admin-page.php:59 +#: inc/admin-page.php:121 msgid "customizer" msgstr "" -#: inc/admin-page.php:68, dist/wordpressorg/pine/inc/admin-page.php:68 +#: inc/admin-page.php:137 msgid "Want to make more customizations? We prepared child theme for you. Fork it on %s and create custom child theme." msgstr "" -#: inc/admin-page.php:94, dist/wordpressorg/pine/inc/admin-page.php:94 +#: inc/admin-page.php:144, inc/admin-page.php:395 +msgid "Fork %s on GitHub" +msgstr "" + +#: inc/admin-page.php:146, inc/admin-page.php:397 +msgid "%s forks on GitHub" +msgstr "" + +#: inc/admin-page.php:148 +msgid "Download %s on GitHub" +msgstr "" + +#: inc/admin-page.php:159, inc/admin-page.php:427 +msgid "Fork" +msgstr "" + +#: inc/admin-page.php:166 +msgid "Download child theme" +msgstr "" + +#: inc/admin-page.php:192 msgid "Reload cache" msgstr "" -#: inc/admin-page.php:101, dist/wordpressorg/pine/inc/admin-page.php:101 +#: inc/admin-page.php:199 msgid "SliceJack Blog" msgstr "" -#: inc/admin-page.php:126, dist/wordpressorg/pine/inc/admin-page.php:126 +#: inc/admin-page.php:224 msgid "Read more posts" msgstr "" -#: inc/admin-page.php:152, dist/wordpressorg/pine/inc/admin-page.php:152 +#: inc/admin-page.php:254 msgid "RSS Error: %s" msgstr "" -#: inc/admin-page.php:169, dist/wordpressorg/pine/inc/admin-page.php:169 +#: inc/admin-page.php:283 msgid "An error has occurred, which probably means the feed is down. Try again later." msgstr "" -#: inc/admin-page.php:185, dist/wordpressorg/pine/inc/admin-page.php:185 +#: inc/admin-page.php:299 msgid "Untitled" msgstr "" -#: inc/admin-page.php:223, dist/wordpressorg/pine/inc/admin-page.php:223 +#: inc/admin-page.php:337 msgid "Read more" msgstr "" -#: inc/admin-page.php:244, dist/wordpressorg/pine/inc/admin-page.php:244 +#: inc/admin-page.php:362 msgid "Found a bug? Create a %s." msgstr "" -#: inc/admin-page.php:244, dist/wordpressorg/pine/inc/admin-page.php:244 +#: inc/admin-page.php:363 msgid "new issue" msgstr "" -#: inc/admin-page.php:245, dist/wordpressorg/pine/inc/admin-page.php:245 +#: inc/admin-page.php:370 msgid "Want to resolve an issue or create a new feature? Make a %s." msgstr "" -#: inc/admin-page.php:245, dist/wordpressorg/pine/inc/admin-page.php:245 +#: inc/admin-page.php:371 msgid "pull request" msgstr "" -#: inc/admin-page.php:246, dist/wordpressorg/pine/inc/admin-page.php:246 +#: inc/admin-page.php:378 msgid "For everything else %s." msgstr "" -#: inc/admin-page.php:246, dist/wordpressorg/pine/inc/admin-page.php:246 +#: inc/admin-page.php:379 msgid "Github" msgstr "" -#: inc/admin-page.php:273, dist/wordpressorg/pine/inc/admin-page.php:273 +#: inc/admin-page.php:385 +msgid "Watch %s on GitHub" +msgstr "" + +#: inc/admin-page.php:387 +msgid "%s watchers on GitHub" +msgstr "" + +#: inc/admin-page.php:390 +msgid "Issue %s on GitHub" +msgstr "" + +#: inc/admin-page.php:392 +msgid "%s issues on GitHub" +msgstr "" + +#: inc/admin-page.php:408 +msgid "Watch" +msgstr "" + +#: inc/admin-page.php:417 +msgid "Issue" +msgstr "" + +#: inc/admin-page.php:454 msgid "You do not have sufficient permissions to access this page." msgstr "" -#: inc/admin-page.php:286, dist/wordpressorg/pine/inc/admin-page.php:286 +#: inc/admin-page.php:469 msgid "Click here" msgstr "" -#: inc/admin-page.php:294, dist/wordpressorg/pine/inc/admin-page.php:294 +#: inc/admin-page.php:477 msgid "Welcome" msgstr "" -#: inc/admin-page.php:295, dist/wordpressorg/pine/inc/admin-page.php:295 +#: inc/admin-page.php:478 +msgid "Notifications" +msgstr "" + +#: inc/admin-page.php:479 msgid "Customize" msgstr "" -#: inc/admin-page.php:296, dist/wordpressorg/pine/inc/admin-page.php:296 +#: inc/admin-page.php:480 msgid "Child theme" msgstr "" -#: inc/admin-page.php:297, dist/wordpressorg/pine/inc/admin-page.php:297 +#: inc/admin-page.php:481 msgid "Contribute to Pine" msgstr "" -#: inc/admin-page.php:298, dist/wordpressorg/pine/inc/admin-page.php:298 +#: inc/admin-page.php:482 msgid "Subscribe to our mailing list" msgstr "" -#: inc/admin-page.php:299, dist/wordpressorg/pine/inc/admin-page.php:299 +#: inc/admin-page.php:483 msgid "Slicejack News" msgstr "" -#: inc/admin-page.php:302, dist/wordpressorg/pine/inc/admin-page.php:302 +#: inc/admin-page.php:486 msgid "Pine" msgstr "" -#: inc/customizer-controls.php:292, dist/wordpressorg/pine/inc/customizer-controls.php:292 +#: inc/customizer-controls.php:292 msgid "Move down" msgstr "" -#: inc/customizer-controls.php:293, dist/wordpressorg/pine/inc/customizer-controls.php:293 +#: inc/customizer-controls.php:293 msgid "Move up" msgstr "" -#: inc/customizer-controls.php:294, dist/wordpressorg/pine/inc/customizer-controls.php:294 +#: inc/customizer-controls.php:294 msgid "Remove" msgstr "" -#: inc/customizer-controls.php:304, dist/wordpressorg/pine/inc/customizer-controls.php:304 +#: inc/customizer-controls.php:304 msgid "Custom" msgstr "" -#: inc/customizer-controls.php:308, dist/wordpressorg/pine/inc/customizer-controls.php:308 +#: inc/customizer-controls.php:308 msgid "Social Network Name" msgstr "" -#: inc/customizer-controls.php:311, dist/wordpressorg/pine/inc/customizer-controls.php:311 +#: inc/customizer-controls.php:311 msgid "URL" msgstr "" -#: inc/customizer-controls.php:316, inc/customizer-controls.php:322, dist/wordpressorg/pine/inc/customizer-controls.php:316, dist/wordpressorg/pine/inc/customizer-controls.php:322 +#: inc/customizer-controls.php:316, inc/customizer-controls.php:322 msgid "New Social Button" msgstr "" -#: inc/customizer.php:34, dist/wordpressorg/pine/inc/customizer.php:34 +#: inc/customizer.php:34 msgid "Display" msgstr "" -#: inc/customizer.php:38, dist/wordpressorg/pine/inc/customizer.php:38 +#: inc/customizer.php:38 msgid "Logo" msgstr "" -#: inc/customizer.php:39, dist/wordpressorg/pine/inc/customizer.php:39 +#: inc/customizer.php:39 msgid "Site Title" msgstr "" -#: inc/customizer.php:50, dist/wordpressorg/pine/inc/customizer.php:50 +#: inc/customizer.php:50 msgid "Upload a logo" msgstr "" -#: inc/customizer.php:63, dist/wordpressorg/pine/inc/customizer.php:63 +#: inc/customizer.php:63 msgid "Colors" msgstr "" -#: inc/customizer.php:83, dist/wordpressorg/pine/inc/customizer.php:83 +#: inc/customizer.php:83 msgid "Color Scheme" msgstr "" -#: inc/customizer.php:86, dist/wordpressorg/pine/inc/customizer.php:86 +#: inc/customizer.php:86 msgid "Red" msgstr "" -#: inc/customizer.php:91, dist/wordpressorg/pine/inc/customizer.php:91 +#: inc/customizer.php:91 msgid "Blue" msgstr "" -#: inc/customizer.php:96, dist/wordpressorg/pine/inc/customizer.php:96 +#: inc/customizer.php:96 msgid "Green" msgstr "" -#: inc/customizer.php:101, dist/wordpressorg/pine/inc/customizer.php:101 +#: inc/customizer.php:101 msgid "Orange" msgstr "" -#: inc/customizer.php:106, dist/wordpressorg/pine/inc/customizer.php:106 +#: inc/customizer.php:106 msgid "Purple" msgstr "" -#: inc/customizer.php:111, dist/wordpressorg/pine/inc/customizer.php:111 +#: inc/customizer.php:111 msgid "Yellow" msgstr "" -#: inc/customizer.php:121, dist/wordpressorg/pine/inc/customizer.php:121 +#: inc/customizer.php:121 msgid "Layouts" msgstr "" -#: inc/customizer.php:135, dist/wordpressorg/pine/inc/customizer.php:135 +#: inc/customizer.php:135 msgid "Global" msgstr "" -#: inc/customizer.php:139, inc/customizer.php:165, inc/customizer.php:191, inc/customizer.php:217, inc/customizer.php:243, inc/customizer.php:269, inc/customizer.php:295, inc/customizer.php:321, dist/wordpressorg/pine/inc/customizer.php:139, dist/wordpressorg/pine/inc/customizer.php:165, dist/wordpressorg/pine/inc/customizer.php:191, dist/wordpressorg/pine/inc/customizer.php:217, dist/wordpressorg/pine/inc/customizer.php:243, dist/wordpressorg/pine/inc/customizer.php:269, dist/wordpressorg/pine/inc/customizer.php:295, dist/wordpressorg/pine/inc/customizer.php:321 +#: inc/customizer.php:139, inc/customizer.php:165, inc/customizer.php:191, inc/customizer.php:217, inc/customizer.php:243, inc/customizer.php:269, inc/customizer.php:295, inc/customizer.php:321 msgid "None" msgstr "" -#: inc/customizer.php:142, inc/customizer.php:168, inc/customizer.php:194, inc/customizer.php:220, inc/customizer.php:246, inc/customizer.php:272, inc/customizer.php:298, inc/customizer.php:324, dist/wordpressorg/pine/inc/customizer.php:142, dist/wordpressorg/pine/inc/customizer.php:168, dist/wordpressorg/pine/inc/customizer.php:194, dist/wordpressorg/pine/inc/customizer.php:220, dist/wordpressorg/pine/inc/customizer.php:246, dist/wordpressorg/pine/inc/customizer.php:272, dist/wordpressorg/pine/inc/customizer.php:298, dist/wordpressorg/pine/inc/customizer.php:324 +#: inc/customizer.php:142, inc/customizer.php:168, inc/customizer.php:194, inc/customizer.php:220, inc/customizer.php:246, inc/customizer.php:272, inc/customizer.php:298, inc/customizer.php:324 msgid "Left" msgstr "" -#: inc/customizer.php:145, inc/customizer.php:171, inc/customizer.php:197, inc/customizer.php:223, inc/customizer.php:249, inc/customizer.php:275, inc/customizer.php:301, inc/customizer.php:327, dist/wordpressorg/pine/inc/customizer.php:145, dist/wordpressorg/pine/inc/customizer.php:171, dist/wordpressorg/pine/inc/customizer.php:197, dist/wordpressorg/pine/inc/customizer.php:223, dist/wordpressorg/pine/inc/customizer.php:249, dist/wordpressorg/pine/inc/customizer.php:275, dist/wordpressorg/pine/inc/customizer.php:301, dist/wordpressorg/pine/inc/customizer.php:327 +#: inc/customizer.php:145, inc/customizer.php:171, inc/customizer.php:197, inc/customizer.php:223, inc/customizer.php:249, inc/customizer.php:275, inc/customizer.php:301, inc/customizer.php:327 msgid "Right" msgstr "" -#: inc/customizer.php:158, dist/wordpressorg/pine/inc/customizer.php:158 +#: inc/customizer.php:158 msgid "Blog" msgstr "" -#: inc/customizer.php:162, inc/customizer.php:188, inc/customizer.php:214, inc/customizer.php:240, inc/customizer.php:266, inc/customizer.php:292, inc/customizer.php:318, dist/wordpressorg/pine/inc/customizer.php:162, dist/wordpressorg/pine/inc/customizer.php:188, dist/wordpressorg/pine/inc/customizer.php:214, dist/wordpressorg/pine/inc/customizer.php:240, dist/wordpressorg/pine/inc/customizer.php:266, dist/wordpressorg/pine/inc/customizer.php:292, dist/wordpressorg/pine/inc/customizer.php:318 +#: inc/customizer.php:162, inc/customizer.php:188, inc/customizer.php:214, inc/customizer.php:240, inc/customizer.php:266, inc/customizer.php:292, inc/customizer.php:318 msgid "Disabled" msgstr "" -#: inc/customizer.php:184, dist/wordpressorg/pine/inc/customizer.php:184 +#: inc/customizer.php:184 msgid "Single" msgstr "" -#: inc/customizer.php:210, dist/wordpressorg/pine/inc/customizer.php:210 +#: inc/customizer.php:210 msgid "Archive" msgstr "" -#: inc/customizer.php:236, dist/wordpressorg/pine/inc/customizer.php:236 +#: inc/customizer.php:236 msgid "Category archive" msgstr "" -#: inc/customizer.php:262, dist/wordpressorg/pine/inc/customizer.php:262 +#: inc/customizer.php:262 msgid "Search" msgstr "" -#: inc/customizer.php:288, dist/wordpressorg/pine/inc/customizer.php:288 +#: inc/customizer.php:288 msgid "404" msgstr "" -#: inc/customizer.php:314, dist/wordpressorg/pine/inc/customizer.php:314 +#: inc/customizer.php:314 msgid "Default Page" msgstr "" -#: inc/customizer.php:335, dist/wordpressorg/pine/inc/customizer.php:335 +#: inc/customizer.php:335 msgid "Background" msgstr "" -#: inc/customizer.php:339, dist/wordpressorg/pine/inc/customizer.php:339 +#: inc/customizer.php:339 msgid "Footer" msgstr "" -#: inc/customizer.php:371, dist/wordpressorg/pine/inc/customizer.php:371 +#: inc/customizer.php:371 msgid "Social buttons" msgstr "" -#: inc/customizer.php:374, inc/template-tags.php:211, dist/wordpressorg/pine/inc/customizer.php:374, dist/wordpressorg/pine/inc/template-tags.php:211 +#: inc/customizer.php:374, inc/template-tags.php:211 msgid "Facebook" msgstr "" -#: inc/customizer.php:377, inc/template-tags.php:212, dist/wordpressorg/pine/inc/customizer.php:377, dist/wordpressorg/pine/inc/template-tags.php:212 +#: inc/customizer.php:377, inc/template-tags.php:212 msgid "Twitter" msgstr "" -#: inc/customizer.php:380, inc/template-tags.php:213, dist/wordpressorg/pine/inc/customizer.php:380, dist/wordpressorg/pine/inc/template-tags.php:213 +#: inc/customizer.php:380, inc/template-tags.php:213 msgid "LinkedIn" msgstr "" -#: inc/customizer.php:383, inc/template-tags.php:214, dist/wordpressorg/pine/inc/customizer.php:383, dist/wordpressorg/pine/inc/template-tags.php:214 +#: inc/customizer.php:383, inc/template-tags.php:214 msgid "Dribbble" msgstr "" -#: inc/customizer.php:386, inc/template-tags.php:215, dist/wordpressorg/pine/inc/customizer.php:386, dist/wordpressorg/pine/inc/template-tags.php:215 +#: inc/customizer.php:386, inc/template-tags.php:215 msgid "Flickr" msgstr "" -#: inc/customizer.php:392, inc/template-tags.php:217, dist/wordpressorg/pine/inc/customizer.php:392, dist/wordpressorg/pine/inc/template-tags.php:217 +#: inc/customizer.php:392, inc/template-tags.php:217 msgid "Google+" msgstr "" -#: inc/customizer.php:395, inc/template-tags.php:218, dist/wordpressorg/pine/inc/customizer.php:395, dist/wordpressorg/pine/inc/template-tags.php:218 +#: inc/customizer.php:395, inc/template-tags.php:218 msgid "Instagram" msgstr "" -#: inc/customizer.php:398, inc/template-tags.php:219, dist/wordpressorg/pine/inc/customizer.php:398, dist/wordpressorg/pine/inc/template-tags.php:219 +#: inc/customizer.php:398, inc/template-tags.php:219 msgid "Pinterest" msgstr "" -#: inc/customizer.php:401, inc/template-tags.php:220, dist/wordpressorg/pine/inc/customizer.php:401, dist/wordpressorg/pine/inc/template-tags.php:220 +#: inc/customizer.php:401, inc/template-tags.php:220 msgid "StumbleUpon" msgstr "" -#: inc/customizer.php:404, inc/template-tags.php:221, dist/wordpressorg/pine/inc/customizer.php:404, dist/wordpressorg/pine/inc/template-tags.php:221 +#: inc/customizer.php:404, inc/template-tags.php:221 msgid "Skype" msgstr "" -#: inc/customizer.php:407, inc/template-tags.php:222, dist/wordpressorg/pine/inc/customizer.php:407, dist/wordpressorg/pine/inc/template-tags.php:222 +#: inc/customizer.php:407, inc/template-tags.php:222 msgid "Tumblr" msgstr "" -#: inc/customizer.php:410, inc/template-tags.php:223, dist/wordpressorg/pine/inc/customizer.php:410, dist/wordpressorg/pine/inc/template-tags.php:223 +#: inc/customizer.php:410, inc/template-tags.php:223 msgid "Vimeo" msgstr "" -#: inc/customizer.php:413, inc/template-tags.php:224, dist/wordpressorg/pine/inc/customizer.php:413, dist/wordpressorg/pine/inc/template-tags.php:224 +#: inc/customizer.php:413, inc/template-tags.php:224 msgid "Behance" msgstr "" -#: inc/template-tags.php:28, dist/wordpressorg/pine/inc/template-tags.php:28 +#: inc/template-tags.php:28 msgctxt "post date" msgid " / On %s" msgstr "" -#: inc/template-tags.php:33, dist/wordpressorg/pine/inc/template-tags.php:33 +#: inc/template-tags.php:33 msgctxt "post author" msgid "By %s" msgstr "" -#: inc/template-tags.php:41, inc/template-tags.php:61, inc/template-tags.php:67, dist/wordpressorg/pine/inc/template-tags.php:41, dist/wordpressorg/pine/inc/template-tags.php:61, dist/wordpressorg/pine/inc/template-tags.php:67 +#: inc/template-tags.php:41, inc/template-tags.php:61, inc/template-tags.php:67 msgid ", " msgstr "" -#: inc/template-tags.php:43, dist/wordpressorg/pine/inc/template-tags.php:43 +#: inc/template-tags.php:43 msgid " / In %1$s" msgstr "" -#: inc/template-tags.php:63, dist/wordpressorg/pine/inc/template-tags.php:63 +#: inc/template-tags.php:63 msgid "Posted in %1$s" msgstr "" -#: inc/template-tags.php:69, dist/wordpressorg/pine/inc/template-tags.php:69 +#: inc/template-tags.php:69 msgid "Tagged %1$s" msgstr "" -#: inc/template-tags.php:75, dist/wordpressorg/pine/inc/template-tags.php:75 +#: inc/template-tags.php:75 msgid "Leave a comment" msgstr "" -#: inc/template-tags.php:75, dist/wordpressorg/pine/inc/template-tags.php:75 +#: inc/template-tags.php:75 msgid "1 Comment" msgstr "" -#: inc/template-tags.php:75, dist/wordpressorg/pine/inc/template-tags.php:75 +#: inc/template-tags.php:75 msgid "% Comments" msgstr "" -#: inc/template-tags.php:79, template-parts/content-page.php:18, dist/wordpressorg/pine/inc/template-tags.php:79, dist/wordpressorg/pine/template-parts/content-page.php:18 +#: inc/template-tags.php:79, template-parts/content-page.php:18 msgid "Edit" msgstr "" -#: template-parts/content-aside.php:20, template-parts/content-chat.php:30, template-parts/content-link.php:21, template-parts/content-status.php:22, template-parts/content.php:26, dist/wordpressorg/pine/template-parts/content-aside.php:20, dist/wordpressorg/pine/template-parts/content-chat.php:30, dist/wordpressorg/pine/template-parts/content-link.php:21, dist/wordpressorg/pine/template-parts/content-status.php:22, dist/wordpressorg/pine/template-parts/content.php:26 +#: template-parts/content-aside.php:20, template-parts/content-chat.php:30, template-parts/content-link.php:21, template-parts/content-status.php:22, template-parts/content.php:26 msgid "Read more %s" msgstr "" -#: template-parts/content-aside.php:29, template-parts/content-chat.php:36, template-parts/content-link.php:31, template-parts/content-page.php:15, template-parts/content-single-chat.php:19, template-parts/content-single.php:16, template-parts/content-status.php:33, template-parts/content.php:31, dist/wordpressorg/pine/template-parts/content-aside.php:29, dist/wordpressorg/pine/template-parts/content-chat.php:36, dist/wordpressorg/pine/template-parts/content-link.php:31, dist/wordpressorg/pine/template-parts/content-page.php:15, dist/wordpressorg/pine/template-parts/content-single-chat.php:19, dist/wordpressorg/pine/template-parts/content-single.php:16, dist/wordpressorg/pine/template-parts/content-status.php:33, dist/wordpressorg/pine/template-parts/content.php:31 +#: template-parts/content-aside.php:29, template-parts/content-chat.php:36, template-parts/content-link.php:31, template-parts/content-page.php:15, template-parts/content-single-chat.php:19, template-parts/content-single.php:16, template-parts/content-status.php:33, template-parts/content.php:31 msgid "Pages:" msgstr "" -#: template-parts/content-none.php:14, dist/wordpressorg/pine/template-parts/content-none.php:14 +#: template-parts/content-none.php:14 msgid "Nothing Found" msgstr "" -#: template-parts/content-none.php:22, dist/wordpressorg/pine/template-parts/content-none.php:22 +#: template-parts/content-none.php:22 msgid "Ready to publish your first post? %s." msgstr "" -#: template-parts/content-none.php:23, dist/wordpressorg/pine/template-parts/content-none.php:23 +#: template-parts/content-none.php:23 msgid "Get started here" msgstr "" -#: template-parts/content-none.php:28, dist/wordpressorg/pine/template-parts/content-none.php:28 +#: template-parts/content-none.php:28 msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords." msgstr "" -#: template-parts/content-none.php:33, dist/wordpressorg/pine/template-parts/content-none.php:33 +#: template-parts/content-none.php:33 msgid "It seems we can’t find what you’re looking for. Perhaps searching can help." msgstr "" + +#: inc/classes/class-pine-notifications.php:63 +msgid "We are happy to inform you that Pine PRO theme is available for purchase. %s" +msgstr "" + +#: inc/classes/class-pine-notifications.php:64, inc/classes/class-pine-notifications.php:74 +msgid "Get it!" +msgstr "" + +#: inc/classes/class-pine-notifications.php:68 +msgid "460+ Customizable Design Options, Drag and Drop Page Builder, 800+ Google Fonts and more. %s" +msgstr "" + +#: inc/classes/class-pine-notifications.php:246 +msgid "Download Pine PRO" +msgstr "" diff --git a/package.json b/package.json index ae86034..db7fc6d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pine", - "version": "1.0.9", + "version": "1.1.0", "description": "Pine is free minimalist WordPress portfolio theme created for people who want to show their work on simple and creative way. Pine is made for a freelancers, designers or smaller agencies who are looking for elegant, professional and minimal look.", "main": "gulpfile.js", "scripts": { diff --git a/source/admin/js/pine-notifications.js b/source/admin/js/pine-notifications.js new file mode 100644 index 0000000..7c35377 --- /dev/null +++ b/source/admin/js/pine-notifications.js @@ -0,0 +1,16 @@ +( function( $ ) { + 'use strict'; + + $( document ) + .on( 'click', '.notice.is-dismissible.pine-notice .notice-dismiss', function() { + $.ajax( { + method: 'POST', + url: ajaxurl, + data: { + action: 'pine_notification_dismiss', + }, + dataType: 'json', + global: false, + } ); + } ); +}( jQuery ) ); diff --git a/style.css b/style.css index e00d17a..57e88ce 100644 --- a/style.css +++ b/style.css @@ -4,7 +4,7 @@ Theme URI: http://slicejack.com/pine-free-minimalist-wordpress-portfolio-theme Author: Slicejack Author URI: http://slicejack.com Description: Pine is free minimalist WordPress portfolio theme created for people who want to show their work on simple and creative way. Pine is made for a freelancers, designers or smaller agencies who are looking for elegant, professional and minimal look. -Version: 1.0.9 +Version: 1.1.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: pine