';
}
private function title_settings(array $data): string
{
// No Title Settings
if (!$this->has_title_settings) return '';
// Show Title
$show_title = isset($data['show_title']) && $data['show_title'] == 1;
// Title Alignment
$title_alignment = '';
if (!$this->inline_title)
{
$title_alignment .= '
';
}
return '
' . $title_alignment . '
' . esc_html__('If a custom title is provided, it will replace the default title.', 'listdom') . '
';
}
protected function general_settings(array $data): string
{
return '';
}
/**
* @param LSD_Entity_Listing $listing
*/
public function set_listing(LSD_Entity_Listing $listing)
{
$this->listing = $listing;
}
/**
* @param $key
* @return mixed
*/
public static function instance($key)
{
$element = 'LSD_Element_' . ucfirst($key);
// Element Not Found!
if (!class_exists($element)) return apply_filters('lsd_addon_elements', false, $key);
return new $element();
}
public function pro(): bool
{
return $this->pro_needed;
}
/**
* @param string $content
* @param LSD_Element $element
* @param array $args
* @return mixed|void
*/
final protected function content($content, $element, $args = [])
{
// Hook Name
$hook = strtolower(get_called_class()) . '_content'; // e.g. lsd_element_address_content
// Filter the Results
return apply_filters($hook, $content, $element, $args);
}
}