/**
  * Checks if asset is assigned as image or chapter asset.
  * 
  * @return boolean true if assigned, otherwise false.
  */
 public function has_asset_assignments()
 {
     $assignment = AssetAssignment::get_instance();
     return in_array($this->id, array($assignment->image, $assignment->chapters));
 }
     */
    public function save()
    {
        update_option('podlove_asset_assignment', $this->data);
    }
    /**
     * Load podcast data.
     */
    private function fetch()
    {
        $this->data = get_option('podlove_asset_assignment', array());
    }
    /**
     * Generate a human readable title.
     * 
     * Return name and, if available, the subtitle. Separated by a dash.
     * 
     * @return string
     */
    public function full_title()
    {
        $t = $this->title;
        if ($this->subtitle) {
            $t = $t . ' - ' . $this->subtitle;
        }
        return $t;
    }
}
AssetAssignment::property('image');
AssetAssignment::property('chapters');
Exemplo n.º 3
0
     * Save current state to database.
     */
    public function save()
    {
        update_option('podlove_asset_assignment', $this->data);
    }
    /**
     * Load podcast data.
     */
    private function fetch()
    {
        $this->data = get_option('podlove_asset_assignment', array());
    }
    /**
     * Generate a human readable title.
     *
     * Return name and, if available, the subtitle. Separated by a dash.
     *
     * @return string
     */
    public function full_title()
    {
        $t = $this->title;
        if ($this->subtitle) {
            $t = $t . ' - ' . $this->subtitle;
        }
        return $t;
    }
}
AssetAssignment::property('image');