Set up basic hook for Spee.ch asset upload
This commit is contained in:
parent
18c26ab330
commit
6573253d5a
1 changed files with 16 additions and 0 deletions
|
@ -18,6 +18,7 @@ class LBRY_Speech
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->parser = new LBRY_Speech_Parser();
|
$this->parser = new LBRY_Speech_Parser();
|
||||||
|
add_action('save_post', $this->upload_assets);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,4 +32,19 @@ class LBRY_Speech
|
||||||
ob_start(array($this->parser, 'rewrite'));
|
ob_start(array($this->parser, 'rewrite'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Uploads assets to the speech server
|
||||||
|
*/
|
||||||
|
public function upload_assets()
|
||||||
|
{
|
||||||
|
$speech_url = get_option(LBRY_SETTINGS)[LBRY_SPEECH];
|
||||||
|
|
||||||
|
// Die if we don't have a spee.ch url
|
||||||
|
if (!$speech_url || $speech_url === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Find assets, upload them to the Spee.ch Server
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue