Skip to content

Commit

Permalink
2.6.0
Browse files Browse the repository at this point in the history
* Updating URLs (to webmandesign.eu and support site)
* Adding "'use strict';" to JS files
* Removine obsolete functionality
* Replacing `wm_get_stylesheet_directory_uri` with `get_theme_file_uri`
* Updating library, preparing it for CSS variables
* Improving security
  • Loading branch information
webmandesign committed Jan 24, 2019
1 parent 65db0c6 commit fcba47d
Show file tree
Hide file tree
Showing 23 changed files with 2,615 additions and 907 deletions.
4 changes: 3 additions & 1 deletion assets/js/scripts-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0
* @version 2.5.4
* @version 2.6.0
*
* Contents:
*
Expand All @@ -23,6 +23,8 @@

( function( $ ) {

'use strict';




Expand Down
4 changes: 3 additions & 1 deletion assets/js/scripts-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.4.8
* @version 2.2.0
* @version 2.6.0
*
* Contents:
*
Expand All @@ -22,6 +22,8 @@

( function( $ ) {

'use strict';




Expand Down
4 changes: 3 additions & 1 deletion assets/js/skip-link-focus-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0
* @version 2.0
* @version 2.6.0
*/


Expand All @@ -14,6 +14,8 @@

( function() {

'use strict';




Expand Down
11 changes: 11 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Auberge Changelog

## 2.6.0

* **Update**:
* **Fix**:

### Files changed:

changelog.md
style.css


## 2.5.4

* **Update**: Compatibility with Advanced Custom Fields plugin
Expand Down
8 changes: 3 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@
/**
* Auberge WordPress Theme
*
* Auberge WordPress Theme, Copyright 2015 WebMan [http://www.webmandesign.eu/]
* Auberge WordPress Theme, Copyright 2015 WebMan [https://www.webmandesign.eu/]
* Auberge is distributed under the terms of the GNU GPL
*
* Requires at least: 4.3
*
* @package Auberge
* @copyright WebMan Design, Oliver Juhas
* @license GPL-3.0, http://www.gnu.org/licenses/gpl-3.0.html
*
* @since 1.0
* @version 2.1
* @version 2.6.0
*
* @link http://www.webmandesign.eu
* @link https://www.webmandesign.eu
*
* Contents:
*
Expand Down
80 changes: 19 additions & 61 deletions includes/setup/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 1.0
* @version 2.5.4
* @version 2.6.0
*
* Contents:
*
Expand All @@ -27,6 +27,10 @@
* 1) Required files
*/

// Theme options

require_once( get_template_directory() . '/includes/theme-options/theme-options.php' );

// Post media

require_once( get_template_directory() . '/includes/post-media/post-media.php' );
Expand Down Expand Up @@ -267,7 +271,7 @@ function wm_helper_var( $variable, $key = null ) {
* Theme setup
*
* @since 1.0
* @version 2.5.0
* @version 2.6.0
*/
if ( ! function_exists( 'wm_setup' ) ) {
function wm_setup() {
Expand All @@ -282,8 +286,8 @@ function wm_setup() {

$visual_editor_css = array_filter( (array) apply_filters( 'wmhook_wm_setup_visual_editor_css', array(
str_replace( ',', '%2C', wm_google_fonts_url() ),
esc_url_raw( add_query_arg( array( 'ver' => wp_get_theme( get_template() )->get( 'Version' ) ), wm_get_stylesheet_directory_uri( 'assets/fonts/genericons-neue/genericons-neue.css' ) ) ),
esc_url_raw( add_query_arg( array( 'ver' => wp_get_theme( get_template() )->get( 'Version' ) ), wm_get_stylesheet_directory_uri( 'assets/css/editor-style' . $rtl_suffix . '.css' ) ) ),
esc_url_raw( add_query_arg( array( 'ver' => wp_get_theme( get_template() )->get( 'Version' ) ), get_theme_file_uri( 'assets/fonts/genericons-neue/genericons-neue.css' ) ) ),
esc_url_raw( add_query_arg( array( 'ver' => wp_get_theme( get_template() )->get( 'Version' ) ), get_theme_file_uri( 'assets/css/editor-style' . $rtl_suffix . '.css' ) ) ),
) ) );

add_editor_style( $visual_editor_css );
Expand Down Expand Up @@ -485,52 +489,6 @@ function wm_setup() {



/**
* Theme version 2.0 upgrade admin notice
*
* @since 2.0
* @version 2.0
*
* @param float $current_theme_version
* @param float $new_theme_version
*/
if ( ! function_exists( 'wm_theme_v2_upgrade_notice' ) ) {
function wm_theme_v2_upgrade_notice( $current_theme_version, $new_theme_version ) {

// Processing

if (
version_compare( $current_theme_version, '2.0', '<' )
&& is_child_theme()
) {

set_transient(
'auberge_admin_notice',
array(
esc_html__( 'Thank you for upgrading your theme.', 'auberge' )
. ' ' . esc_html__( 'We have noticed you are using a child theme.', 'auberge' )
. '<br><strong>'
. esc_html__( 'Please note that there has been a lot of changes in this new theme version and you should check the code in your child theme for compatibility!', 'auberge' )
. '</strong>'
. '<br><a href="https://github.com/webmandesign/auberge/blob/master/changelog.md" target="_blank">'
. esc_html__( 'Read theme changelog &raquo;', 'auberge' )
. '</a>',
'notice-error',
'switch_themes',
3
),
( 60 * 60 * 48 )
);

}

}
} // /wm_theme_v2_upgrade_notice

add_action( 'wmhook_theme_upgrade', 'wm_theme_v2_upgrade_notice', 10, 2 );



/**
* Welcome page
*/
Expand Down Expand Up @@ -1115,7 +1073,7 @@ function wm_custom_mce_format_addon( $style_formats = array() ) {
* Registering theme styles and scripts
*
* @since 1.0
* @version 2.5.0
* @version 2.6.0
*/
if ( ! function_exists( 'wm_register_assets' ) ) {
function wm_register_assets() {
Expand All @@ -1130,12 +1088,12 @@ function wm_register_assets() {
// Styles

$register_styles = apply_filters( 'wmhook_wm_register_assets_register_styles', array(
'genericons-neue' => array( wm_get_stylesheet_directory_uri( 'assets/fonts/genericons-neue/genericons-neue.css' ) ),
'slick' => array( wm_get_stylesheet_directory_uri( 'assets/css/slick.css' ) ),
'genericons-neue' => array( get_theme_file_uri( 'assets/fonts/genericons-neue/genericons-neue.css' ) ),
'slick' => array( get_theme_file_uri( 'assets/css/slick.css' ) ),
'wm-google-fonts' => array( wm_google_fonts_url() ),
'wm-main' => array( wm_get_stylesheet_directory_uri( 'assets/css/main.css' ) ),
'wm-main' => array( get_theme_file_uri( 'assets/css/main.css' ) ),
'wm-stylesheet' => array( get_stylesheet_uri() ),
'wm-custom' => array( wm_get_stylesheet_directory_uri( 'assets/css/custom.css' ), 'deps' => array( 'wm-main' ) ),
'wm-custom' => array( get_theme_file_uri( 'assets/css/custom.css' ), 'deps' => array( 'wm-main' ) ),
) );

foreach ( $register_styles as $handle => $atts ) {
Expand All @@ -1150,10 +1108,10 @@ function wm_register_assets() {
// Scripts

$register_scripts = apply_filters( 'wmhook_wm_register_assets_register_scripts', array(
'slick' => array( 'src' => wm_get_stylesheet_directory_uri( 'assets/js/vendor/slick.min.js' ), 'deps' => array( 'jquery' ) ),
'wm-scripts-global' => array( 'src' => wm_get_stylesheet_directory_uri( 'assets/js/scripts-global.js' ), 'deps' => array( 'jquery', 'imagesloaded', 'wm-scripts-navigation' ) ),
'wm-scripts-navigation' => array( wm_get_stylesheet_directory_uri( 'assets/js/scripts-navigation.js' ) ),
'wm-skip-link-focus-fix' => array( wm_get_stylesheet_directory_uri( 'assets/js/skip-link-focus-fix.js' ) ),
'slick' => array( 'src' => get_theme_file_uri( 'assets/js/vendor/slick.min.js' ), 'deps' => array( 'jquery' ) ),
'wm-scripts-global' => array( 'src' => get_theme_file_uri( 'assets/js/scripts-global.js' ), 'deps' => array( 'jquery', 'imagesloaded', 'wm-scripts-navigation' ) ),
'wm-scripts-navigation' => array( get_theme_file_uri( 'assets/js/scripts-navigation.js' ) ),
'wm-skip-link-focus-fix' => array( get_theme_file_uri( 'assets/js/skip-link-focus-fix.js' ) ),
) );

foreach ( $register_scripts as $handle => $atts ) {
Expand Down Expand Up @@ -1356,7 +1314,7 @@ function wm_comment_reply_js_enqueue() {
* Customizer preview assets enqueue
*
* @since 1.4
* @version 2.0
* @version 2.6.0
*/
if ( ! function_exists( 'wm_customizer_preview_enqueue_assets' ) ) {
function wm_customizer_preview_enqueue_assets() {
Expand All @@ -1365,7 +1323,7 @@ function wm_customizer_preview_enqueue_assets() {

wp_enqueue_script(
'wm-customizer-preview',
wm_get_stylesheet_directory_uri( 'assets/js/customize-preview.js' ),
get_theme_file_uri( 'assets/js/customize-preview.js' ),
array( 'customize-preview' ),
esc_attr( trim( wp_get_theme( get_template() )->get( 'Version' ) ) ),
true
Expand Down
2 changes: 1 addition & 1 deletion includes/theme-options/theme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function wm_theme_options_array( $options = array() ) {
. '<p class="description">'
. sprintf(
esc_html_x( 'You can obtain other professional WordPress themes at %s.', '%s: theme author link.', 'auberge' ),
'<strong><a href="http://www.webmandesign.eu" target="_blank">WebManDesign.eu</a></strong>'
'<strong><a href="https://www.webmandesign.eu" target="_blank">WebManDesign.eu</a></strong>'
)
. '</p>'
. '<p class="description">'
Expand Down
6 changes: 3 additions & 3 deletions includes/welcome/class-welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 2.1
* @version 2.2.0
* @version 2.6.0
*
* Contents:
*
Expand Down Expand Up @@ -169,7 +169,7 @@ public static function admin_menu() {
* Styles and scripts
*
* @since 2.1
* @version 2.2.0
* @version 2.6.0
*
* @param string $hook_suffix
*/
Expand All @@ -188,7 +188,7 @@ public static function assets( $hook_suffix = '' ) {

wp_enqueue_style(
get_template() . '-welcome',
wm_get_stylesheet_directory_uri( 'assets/css/welcome.css' ),
get_theme_file_uri( 'assets/css/welcome.css' ),
false,
esc_attr( trim( wp_get_theme( get_template() )->get( 'Version' ) ) ),
'screen'
Expand Down
2 changes: 1 addition & 1 deletion languages/auberge.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Auberge\n"
"Report-Msgid-Bugs-To: http://support.webmandesign.eu\n"
"Report-Msgid-Bugs-To: https://support.webmandesign.eu\n"
"POT-Creation-Date: 2018-09-18 16:26+0200\n"
"PO-Revision-Date: 2015-04-21 20:43+0100\n"
"Last-Translator: WebMan - Oliver Juhas <[email protected]>\n"
Expand Down
2 changes: 1 addition & 1 deletion languages/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ If you have obtained the theme from **[WordPress.org themes repository](https://

If you have obtained the theme from **[WordPress.org themes repository](https://wordpress.org/themes/author/webmandesign/)**, please translate the theme by clicking the [Translate Auberge](https://translate.wordpress.org/projects/wp-themes/auberge) link in [theme page](https://wordpress.org/themes/auberge/) sidebar.

Otherwise, if you would like to help out translating the theme, please contribute on our [support forum](http://support.webmandesign.eu/).
Otherwise, if you would like to help out translating the theme, please contribute on our [support forum](https://support.webmandesign.eu/).
2 changes: 1 addition & 1 deletion languages/sk_SK.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Auberge Plus 1.4\n"
"Report-Msgid-Bugs-To: http://support.webmandesign.eu\n"
"Report-Msgid-Bugs-To: https://support.webmandesign.eu\n"
"POT-Creation-Date: 2018-09-18 16:26+0200\n"
"PO-Revision-Date: 2018-09-18 16:26+0200\n"
"Last-Translator: Oliver Juhas, WebMan Design\n"
Expand Down
Loading

0 comments on commit fcba47d

Please sign in to comment.