本文整理汇总了PHP中wpl_global::get_the_title方法的典型用法代码示例。如果您正苦于以下问题:PHP wpl_global::get_the_title方法的具体用法?PHP wpl_global::get_the_title怎么用?PHP wpl_global::get_the_title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpl_global
的用法示例。
在下文中一共展示了wpl_global::get_the_title方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dublincore
/**
* Sets Dublin Core Meta Tags
* @author Howard <howard@realtyna.com>
* @return boolean
*/
public function dublincore()
{
$settings = wpl_global::get_settings();
$dc_status = isset($settings['dc_status']) ? $settings['dc_status'] : false;
/** check status of geo tags **/
if (!$dc_status) {
return false;
}
$current_link_url = wpl_global::get_full_url();
$html = wpl_html::getInstance();
/** WPL views and WordPress views (Page/Post) **/
if (trim($this->view) != '' and $dc_status == 2 or $dc_status == 1) {
if (trim($settings['dc_coverage']) != '') {
$html->set_custom_tag('<meta name="DC.coverage" content="' . $settings['dc_coverage'] . '" />');
}
if (trim($settings['dc_contributor']) != '') {
$html->set_custom_tag('<meta name="DC.contributor" content="' . $settings['dc_contributor'] . '" />');
}
if (trim($settings['dc_publisher']) != '') {
$html->set_custom_tag('<meta name="DC.publisher" content="' . $settings['dc_publisher'] . '" />');
}
if (trim($settings['dc_copyright']) != '') {
$html->set_custom_tag('<meta name="DC.rights" content="' . $settings['dc_copyright'] . '" />');
}
if (trim($settings['dc_source']) != '') {
$html->set_custom_tag('<meta name="DC.source" content="' . $settings['dc_source'] . '" />');
}
if (trim($settings['dc_relation']) != '') {
$html->set_custom_tag('<meta name="DC.relation" content="' . $settings['dc_relation'] . '" />');
}
$html->set_custom_tag('<meta name="DC.type" content="Text" />');
$html->set_custom_tag('<meta name="DC.format" content="text/html" />');
$html->set_custom_tag('<meta name="DC.identifier" content="' . $current_link_url . '" />');
$locale = apply_filters('plugin_locale', get_locale(), WPL_TEXTDOMAIN);
$html->set_custom_tag('<meta name="DC.language" scheme="RFC1766" content="' . $locale . '" />');
}
if ($this->view == 'property_show') {
$proeprty_id = wpl_request::getVar('pid');
$property_data = wpl_property::get_property_raw_data($proeprty_id);
$user_data = (array) wpl_users::get_user($property_data['user_id']);
$html->set_custom_tag('<meta name="DC.title" content="' . $this->property_page_title . '" />');
$html->set_custom_tag('<meta name="DC.subject" content="' . $this->property_page_title . '" />');
$html->set_custom_tag('<meta name="DC.description" content="' . $this->property_description . '" />');
$html->set_custom_tag('<meta name="DC.date" content="' . $property_data['add_date'] . '" />');
$html->set_custom_tag('<meta name="DC.creator" content="' . $user_data['data']->user_login . '" />');
} elseif ($this->view == 'profile_show') {
$user_id = wpl_request::getVar('uid');
$user_data = (array) wpl_users::get_user($user_id);
$html->set_custom_tag('<meta name="DC.title" content="' . $this->user_title . '" />');
$html->set_custom_tag('<meta name="DC.subject" content="' . $this->user_title . '" />');
$html->set_custom_tag('<meta name="DC.description" content="' . $this->user_description . '" />');
$html->set_custom_tag('<meta name="DC.date" content="' . $user_data['data']->user_registered . '" />');
$html->set_custom_tag('<meta name="DC.creator" content="' . $user_data['data']->user_login . '" />');
} elseif (is_single()) {
$post_author_id = wpl_global::get_post_field('post_author');
$author_username = wpl_global::get_the_author_meta('user_login', $post_author_id);
$html->set_custom_tag('<meta name="DC.title" content="' . wpl_global::get_the_title() . '" />');
$html->set_custom_tag('<meta name="DC.subject" content="' . wpl_global::get_the_title() . '" />');
$html->set_custom_tag('<meta name="DC.date" content="' . wpl_global::get_the_date() . '" />');
$html->set_custom_tag('<meta name="DC.creator" content="' . $author_username . '" />');
}
}