Skip to content

Commit

Permalink
2.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
webmandesign committed Nov 14, 2019
1 parent d60dcb9 commit fc88e0a
Show file tree
Hide file tree
Showing 12 changed files with 148 additions and 5,716 deletions.
20 changes: 20 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Modern Changelog

## 2.4.2

* **Update**: Adding `nofollow` rel attribute to footer links
* **Update**: Removing demo content XML and setting manual import for One Click Demo Import plugin to comply with WordPress.org theme requirements
* **Update**: Localization
* **Fix**: Not wrapping post excerpt in additional DIV when its empty
* **Fix**: Removing "Continue reading" link from blog page excerpt

### Files changed:

changelog.md
index.php
style.css
includes/frontend/class-post-summary.php
includes/plugins/one-click-demo-import/class-one-click-demo-import.php
includes/welcome/class-welcome.php
library/changelog.md
template-parts/footer/site-info.php


## 2.4.1

* **Add**: Adding WhatsApp and Google social icon
Expand Down
11 changes: 9 additions & 2 deletions includes/frontend/class-post-summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 2.0.0
* @version 2.4.0
* @version 2.4.2
*
* Contents:
*
Expand Down Expand Up @@ -126,12 +126,19 @@ public static function excerpt( $excerpt = '' ) {
* Line breaks are required for proper functionality of `wpautop()` later on.
*
* @since 2.4.0
* @version 2.4.0
* @version 2.4.2
*
* @param string $post_excerpt
*/
public static function wrap_excerpt( $post_excerpt = '' ) {

// Requirements check

if ( empty( $post_excerpt ) ) {
return $post_excerpt;
}


// Output

return '<div class="entry-summary">' . PHP_EOL . $post_excerpt . PHP_EOL . '</div>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
* @copyright WebMan Design, Oliver Juhas
*
* @since 2.0.0
* @version 2.4.0
* @version 2.4.2
*
* Contents:
*
* 0) Init
* 10) Files
* 20) Texts
* 30) Setup
* 10) Texts
* 20) Setup
* 100) Helpers
*/
class Modern_One_Click_Demo_Import {
Expand All @@ -34,7 +33,7 @@ class Modern_One_Click_Demo_Import {
* Constructor
*
* @since 2.0.0
* @version 2.0.0
* @version 2.4.2
*/
private function __construct() {

Expand All @@ -54,8 +53,6 @@ private function __construct() {

// Filters

add_filter( 'pt-ocdi/import_files', __CLASS__ . '::files' );

add_filter( 'pt-ocdi/plugin_intro_text', __CLASS__ . '::info' );
add_action( 'pt-ocdi/plugin_intro_text', __CLASS__ . '::jetpack_custom_posts' );

Expand Down Expand Up @@ -91,55 +88,38 @@ public static function init() {


/**
* 10) Files
* 10) Texts
*/

/**
* Import files setup
*
* For WordPress.org repository themes the file URL needs to be local.
* Add the demo XML and WIE files into `includes/starter-content` folder
* and use `get_theme_file_uri()` for file URL.
* Info texts
*
* @since 2.0.0
* @version 2.0.0
* @version 2.4.2
*
* @param string $text Default intro text.
*/
public static function files() {

// Output

return array(

array(
'import_file_name' => esc_html__( 'Theme demo content', 'modern' ),
'import_file_url' => esc_url( get_theme_file_uri( 'includes/plugins/one-click-demo-import/demo-content-modern.xml' ) ),
'import_widget_file_url' => esc_url( get_theme_file_uri( 'includes/plugins/one-click-demo-import/demo-widgets-modern.wie' ) ),
'preview_url' => 'https://themedemos.webmandesign.eu/modern/',
),

);

} // /files
public static function info( $text = '' ) {

// Processing

$text .= '<div class="manual-import-info">';

$text .= '<h2>';
$text .= esc_html__( 'Manual import procedure', 'modern' );
$text .= '</h2>';

$text .= '<p>';
$text .= esc_html__( 'By importing this demo content you get the exact copy of the theme demo website.', 'modern' );
$text .= ' (<a href="https://themedemos.webmandesign.eu/modern/">' . esc_html__( 'Preview the theme demo website &raquo;', 'modern' ) . '</a>)';

/**
* 20) Texts
*/
$text .= '<br>';

/**
* Info texts
*
* @since 2.0.0
* @version 2.4.0
*
* @param string $text Default intro text.
*/
public static function info( $text = '' ) {
$text .= esc_html__( 'For instructions on importing theme demo content please visit GitHub repository.', 'modern' );
$text .= ' (<a href="https://github.com/webmandesign/demo-content/blob/master/modern/readme.md#what-is-this">' . esc_html__( 'GitHub repository instructions &raquo;', 'modern' ) . '</a>)';
$text .= '</p>';

// Processing
$text .= '</div>';

$text .= '<div class="media-files-quality-info">';

Expand All @@ -164,7 +144,7 @@ public static function info( $text = '' ) {
$text .= '<p>';
$text .= esc_html__( 'Please read the information about the theme demo required plugins first.', 'modern' );
$text .= ' ' . esc_html__( 'If you do not install and activate demo required plugins, some of the content will not be imported.', 'modern' );
$text .= ' <a href="https://github.com/webmandesign/demo-content/tree/master/modern/content#before-you-begin" title="' . esc_attr__( 'Read the information before you run the theme demo content import process.', 'modern' ) . '"><strong>';
$text .= ' <a href="https://github.com/webmandesign/demo-content/blob/master/modern/readme.md#required-plugins" title="' . esc_attr__( 'Read the information before you run the theme demo content import process.', 'modern' ) . '"><strong>';
$text .= esc_html__( 'View the list of required plugins &raquo;', 'modern' );
$text .= '</strong></a>';
$text .= '</p>';
Expand All @@ -189,7 +169,7 @@ public static function info( $text = '' ) {


/**
* 30) Setup
* 20) Setup
*/

/**
Expand Down
Loading

0 comments on commit fc88e0a

Please sign in to comment.