Dateien hochladen nach „“
This commit is contained in:
parent
ec72218e92
commit
87450bc719
|
@ -205,7 +205,11 @@ function gcal_import_do_import($category, $link) {
|
|||
$post->post_parent = 0;
|
||||
$post->menu_order = 0;
|
||||
$post = new WP_Post( $post );
|
||||
if(!isset($post_content)){
|
||||
$post->post_content = "";
|
||||
}else{
|
||||
$post->post_content = apply_filters( 'default_content', $post_content, $post );
|
||||
}
|
||||
$post->post_title = apply_filters( 'default_title', $post_title, $post );
|
||||
$post->post_excerpt = apply_filters( 'default_excerpt', $post_excerpt, $post );
|
||||
|
||||
|
@ -225,13 +229,21 @@ function gcal_import_do_import($category, $link) {
|
|||
|
||||
// and fill in the post form
|
||||
$post->post_author = '1';
|
||||
if(!isset($r['DESCRIPTION'])){
|
||||
$post->post_content = "Keine Beschreibung" ;
|
||||
}else{
|
||||
$post->post_content = $r['DESCRIPTION'];
|
||||
}
|
||||
$post->post_title = $r['SUMMARY'];
|
||||
// create an excerpt for the overview page ([wpcalendar kat=...])
|
||||
if (strlen ($r['DESCRIPTION']) > 160) {
|
||||
$post->post_excerpt = substr ($r['DESCRIPTION'], 0, 160) . ' ...'; // first 160 chars of DESCRIPTION plus ' ...'
|
||||
} else {
|
||||
}else{
|
||||
if(!isset($r['DESCRIPTION'])){
|
||||
$post->post_excerpt = "Keine Beschreibung" ;
|
||||
}else{
|
||||
$post->post_excerpt = $r['DESCRIPTION'];
|
||||
}
|
||||
}
|
||||
$post->post_status = 'publish';
|
||||
$post->post_category = array ($category,);
|
||||
|
@ -254,8 +266,10 @@ function gcal_import_do_import($category, $link) {
|
|||
'_zeitstempel' => $zeitstempel,
|
||||
'_gcal_uid' => $r['UID'],
|
||||
'_gcal_recent' => 'true',
|
||||
'_gcal_created' => $r['LAST-MODIFIED']->format('U'),
|
||||
'_gcal_category' => $category,
|
||||
// '_gcal_created' => $r['LAST-MODIFIED']->format('U'),
|
||||
// '_gcal_created' => $r['LAST-MODIFIED']->format('d.m.Y H:i'),
|
||||
// '_gcal_created' => $r['LAST-MODIFIED']->format('U'),
|
||||
'_gcal_category' => $category,
|
||||
'_secretevent' => $secretevent,
|
||||
);
|
||||
|
||||
|
@ -324,3 +338,4 @@ function gcal_import_do_import($category, $link) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
|
Reference in New Issue