本文整理汇总了PHP中wpl_global::get_wp_option方法的典型用法代码示例。如果您正苦于以下问题:PHP wpl_global::get_wp_option方法的具体用法?PHP wpl_global::get_wp_option怎么用?PHP wpl_global::get_wp_option使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wpl_global
的用法示例。
在下文中一共展示了wpl_global::get_wp_option方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_profile_link
/**
* Returns User Profile Link
* @author Howard R <howard@realtyna.com>
* @static
* @param int $user_id
* @param int $target_id
* @return string
*/
public static function get_profile_link($user_id = '', $target_id = 0)
{
/** fetch currenr user data if user id is empty **/
if (trim($user_id) == '') {
$user_id = self::get_cur_user_id();
}
$user_data = self::get_user($user_id);
$home_type = wpl_global::get_wp_option('show_on_front', 'posts');
$home_id = wpl_global::get_wp_option('page_on_front', 0);
if (!$target_id) {
$target_id = wpl_request::getVar('wpltarget', 0);
}
if ($target_id) {
$url = wpl_global::add_qs_var('uid', $user_id, wpl_sef::get_page_link($target_id));
if ($home_type == 'page' and $home_id == $target_id) {
$url = wpl_global::add_qs_var('wplview', 'profile_show', $url);
}
} else {
$url = wpl_sef::get_wpl_permalink(true);
$nosef = wpl_sef::is_permalink_default();
$wpl_main_page_id = wpl_sef::get_wpl_main_page_id();
if ($nosef or $home_type == 'page' and $home_id == $wpl_main_page_id) {
$url = wpl_global::add_qs_var('wplview', 'profile_show', $url);
$url = wpl_global::add_qs_var('uid', $user_id, $url);
} else {
$url .= urlencode($user_data->data->user_login) . '/';
}
}
return $url;
}
示例2: __
if (strpos($file, WPL_BASENAME) !== false) {
$links[] = '<a href="' . wpl_global::get_wp_admin_url() . 'admin.php?page=wpl_admin_settings">' . __('Settings', WPL_TEXTDOMAIN) . '</a>';
$links[] = '<a href="http://wpl.realtyna.com/wassets/wpl-manual.pdf" target="_blank">' . __('WPL Manual', WPL_TEXTDOMAIN) . '</a>';
$links[] = '<a href="http://wpl.realtyna.com/redirect.php?action=shop" target="_blank">' . __('WPL Add-ons', WPL_TEXTDOMAIN) . '</a>';
}
return $links;
}
}
/** load extensions **/
$wpl_extensions = new wpl_extensions();
/** active deactive functions **/
$wpl_extensions->wpl_active_deactive();
if (!($GLOBALS['pagenow'] == 'plugins.php' and wpl_request::getVar('action') == 'activate') and !(wpl_request::getVar('tgmpa-activate') == 'activate-plugin')) {
$wpl_extensions->get_extensions(1, '', wpl_global::get_client());
$wpl_extensions->import_extensions();
if (version_compare(wpl_global::get_wp_option('wpl_version'), wpl_global::wpl_version(), '<')) {
/** upgrading WPL **/
$wpl_extensions->upgrade_wpl();
}
}
/** Run WPL Proccess service **/
_wpl_import('libraries.services.process');
$wpl_service_process = new wpl_service_process();
$wpl_service_process->run();
/** import TinyMCE buttons **/
add_action('init', array($wpl_extensions, 'import_mce_buttons'));
/** listing menu in +new menu **/
add_action('admin_bar_menu', array($wpl_extensions, 'plus_new_menu'), 99);
/** import dynamic js **/
add_action('wp_head', array($wpl_extensions, 'import_dynamic_js'), 1);
add_action('admin_print_scripts', array($wpl_extensions, 'import_dynamic_js'), 1);
示例3: get_admin_id
/**
* Returns admin ID of website
* @author Howard R <Howard@realtyna.com>
* @static
* @return int
*/
public static function get_admin_id()
{
return wpl_users::get_id_by_email(wpl_global::get_wp_option('admin_email', NULL));
}
示例4: get_property_pdf_link
/**
* Returns PDF link of property
* @author Howard <howard@realtyna.com>
* @static
* @param int $property_id
* @param int $target_id
* @return string|boolean
*/
public static function get_property_pdf_link($property_id, $target_id = 0)
{
/** first validation **/
if (!trim($property_id)) {
return false;
}
$nosef = wpl_sef::is_permalink_default();
$home_type = wpl_global::get_wp_option('show_on_front', 'posts');
$home_id = wpl_global::get_wp_option('page_on_front', 0);
$wpl_main_page_id = wpl_sef::get_wpl_main_page_id();
if ($nosef or $home_type == 'page' and $home_id == $wpl_main_page_id) {
$url = wpl_sef::get_wpl_permalink(true);
$url = wpl_global::add_qs_var('wplview', 'features', $url);
$url = wpl_global::add_qs_var('wpltype', 'pdf', $url);
$url = wpl_global::add_qs_var('pid', $property_id, $url);
} else {
$url = wpl_sef::get_wpl_permalink(true) . 'features/pdf?pid=' . $property_id;
}
return $url;
}
示例5: is_permalink_default
/**
* Checks WordPress permalink
* @author Howard R <howard@realtyna.com>
* @static
* @return boolean
*/
public static function is_permalink_default()
{
$option = wpl_global::get_wp_option('permalink_structure', NULL);
if (!trim($option)) {
return true;
} else {
return false;
}
}
示例6: get_property_rss_link
/**
* Returns RSS link of property listing
* @author Steve A. <steve@realtyna.com>
* @static
* @return string|boolean
*/
public static function get_property_rss_link()
{
$nosef = wpl_sef::is_permalink_default();
$home_type = wpl_global::get_wp_option('show_on_front', 'posts');
$home_id = wpl_global::get_wp_option('page_on_front', 0);
$wpl_main_page_id = wpl_sef::get_wpl_main_page_id();
if ($nosef or $home_type == 'page' and $home_id == $wpl_main_page_id) {
$url = wpl_sef::get_wpl_permalink(true);
$url = wpl_global::add_qs_var('wplview', 'features', $url);
$url = wpl_global::add_qs_var('wpltype', 'rss', $url);
} else {
$url = wpl_sef::get_wpl_permalink(true) . 'features/rss';
}
return $url;
}