wppost: Better title detection
This commit is contained in:
parent
c900d8ea86
commit
72089a2be8
|
@ -219,9 +219,10 @@ function wppost_send(&$a,&$b) {
|
||||||
|
|
||||||
// If the title is empty then try to guess
|
// If the title is empty then try to guess
|
||||||
if ($wptitle == '') {
|
if ($wptitle == '') {
|
||||||
// Take the description from the bookmark
|
// Fetch information about the post
|
||||||
if(preg_match("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/is",$b['body'],$matches))
|
$siteinfo = get_attached_data($b["body"]);
|
||||||
$wptitle = $matches[2];
|
if (isset($siteinfo["title"]))
|
||||||
|
$wptitle = $siteinfo["title"];
|
||||||
|
|
||||||
// If no bookmark is found then take the first line
|
// If no bookmark is found then take the first line
|
||||||
if ($wptitle == '') {
|
if ($wptitle == '') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user