Skip to content

Commit

Permalink
## 0.1.0 - 2019-09-25
Browse files Browse the repository at this point in the history
Background Processing

### Added
- Handle `meta_input` field for Term imports
- Use `wpautop`for certain fields. Fields are filtered by "yaim_{$type}_autop_keys" filter
- Handle p2p connections for post import
- Use a5hleyrich/wp-background-processing and process all imports in background

### Changed
- More stable log

### Fixed
- Multilang values for directly nested attributes. eg `meta_input`. Also works if some directly nested attributes have translations, and others not.
  • Loading branch information
jhotadhari committed Sep 25, 2019
1 parent 5e00b5b commit 40f0a54
Show file tree
Hide file tree
Showing 23 changed files with 1,918 additions and 354 deletions.
27 changes: 1 addition & 26 deletions .wde_nextRelease.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
{
"changes": [
{
"type": "fixed",
"message": "Multilang values for directly nested attributes. eg `meta_input`. Also works if some directly nested attributes have translations, and others not."
},
{
"type": "added",
"message": "Handle `meta_input` field for Term imports"
},
{
"type": "added",
"message": "Use `wpautop`for certain fields. Fields are filtered by \"yaim_{$type}_autop_keys\" filter"
},
{
"type": "added",
"message": "Handle p2p connections for post import"
},
{
"type": "changed",
"message": "More stable log"
},
{
"type": "added",
"message": "Use a5hleyrich/wp-background-processing and process all imports in background"
}
]
"changes": []
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.1.0 - 2019-09-25
Background Processing

### Added
- Handle `meta_input` field for Term imports
- Use `wpautop`for certain fields. Fields are filtered by "yaim_{$type}_autop_keys" filter
- Handle p2p connections for post import
- Use a5hleyrich/wp-background-processing and process all imports in background

### Changed
- More stable log

### Fixed
- Multilang values for directly nested attributes. eg `meta_input`. Also works if some directly nested attributes have translations, and others not.

## 0.0.2 - 2019-09-23
Taxonomy Term Import

Expand Down
15 changes: 15 additions & 0 deletions dist/trunk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,21 @@ Upload and install this Theme the same way you'd install any other Theme.

## Changelog ##

## 0.1.0 - 2019-09-25
Background Processing

### Added
- Handle `meta_input` field for Term imports
- Use `wpautop`for certain fields. Fields are filtered by "yaim_{$type}_autop_keys" filter
- Handle p2p connections for post import
- Use a5hleyrich/wp-background-processing and process all imports in background

### Changed
- More stable log

### Fixed
- Multilang values for directly nested attributes. eg `meta_input`. Also works if some directly nested attributes have translations, and others not.

## 0.0.2 - 2019-09-23
Taxonomy Term Import

Expand Down
66 changes: 66 additions & 0 deletions dist/trunk/classes/Admin_Message_Log.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php

namespace yaim;

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}

use croox\wde\utils;

class Admin_Message_Log {

protected $msgs = array();

protected static $option_key = 'yaim_log';

protected $start;

public function __construct(){
$this->start = date('d-M-Y H:i:s T');
update_option( self::$option_key . '_start', $this->start );

$this->add_entries( array( $this->start, '' ) );

}

public function add_entries( $msgs = array(), $key = null ){
foreach( $msgs as $msg ) {
$this->add_entry( $msg );
}
}

public function add_entry( $msg = '', $key = null ){
if ( null === $key ) {
$this->msgs[] = $msg;
} else {
if ( array_key_exists( $key, $this->msgs ) ) {
$this->msgs[$key] .= $msg;

} else {
$this->msgs[$key] = $msg;
}
}
}

public function get(){
return $this->msgs;
}

public static function get_from_db(){
$msgs = get_option( self::$option_key );
$last = get_option( self::$option_key . '_start' );
return array(
'msgs' => $msgs,
'last_start' => get_option( self::$option_key . '_start' ),
'last_log_saved' => count( $msgs ) > 0 && $msgs[0] === $last,
);
}

public function save(){
update_option( self::$option_key, $this->msgs );
}

}

Loading

0 comments on commit 40f0a54

Please sign in to comment.