Exemplo n.º 1
0
/**
 * return social shares setting
 * @param string $name setting name
 * @param mixed $default if null get default value
 */
function hwss_option($name = '', $default = '')
{
    if ($name) {
        return AdminPageFramework::getOption('HW_SocialsShare_Settings', $name, $default);
    }
    return AdminPageFramework::getOption('HW_SocialsShare_Settings');
}
Exemplo n.º 2
0
/**
 * @param $name
 * @param string $default
 * @return mixed|null|void
 */
function hwseo_option($name = '', $default = '')
{
    if ($name) {
        return AdminPageFramework::getOption('HWSEO_Settings_page', $name, $default);
    } else {
        return AdminPageFramework::getOption('HWSEO_Settings_page');
    }
}
Exemplo n.º 3
0
/**
 * get livechat apf option
 * @param string $opt: give name of option want to getting
 * @param string $default: default value    (optional)
 * @param string $group: group section name (optional)
 */
function hw_livechat_option($opt, $default = '', $group = '')
{
    if ($group) {
        return AdminPageFramework::getOption('HW_Livechat_settings', array($group, $opt), $default);
    } else {
        return AdminPageFramework::getOption('HW_Livechat_settings', $opt, $default);
    }
}
Exemplo n.º 4
0
/**
 * get awc apf option
 * @param string $opt: give name of option want to getting
 * @param string $default: default value    (optional)
 * @param string $group: group section name (optional)
 */
function hwawc_get_option($opt = '', $default = '', $group = '')
{
    if (!$opt) {
        return AdminPageFramework::getOption('HW_Sidebar_Settings');
    }
    //return all fields value in section
    if ($group) {
        return AdminPageFramework::getOption('HW_Sidebar_Settings', array($group, $opt), $default);
    } else {
        return AdminPageFramework::getOption('HW_Sidebar_Settings', $opt, $default);
    }
}
Exemplo n.º 5
0
/**
 * get awc apf option
 * @param string $opt: give name of option want to getting
 * @param string $default: default value    (optional)
 * @param string $group: group section name (optional)
 */
function hw_navmenu_option($opt = '', $default = '', $group = '')
{
    if (!$opt) {
        return AdminPageFramework::getOption('HW_NAVMENU_settings');
    }
    //return all fields value in section
    if ($group) {
        return AdminPageFramework::getOption('HW_NAVMENU_settings', array($group, $opt), $default);
    } else {
        return AdminPageFramework::getOption('HW_NAVMENU_settings', $opt, $default);
    }
}
 public function _replyToSortByCustomOptionValue($oTermA, $oTermB)
 {
     $_sClassName = get_class($this);
     // the instantiated class name is the option key by default.
     $_sTextFieldA = AdminPageFramework::getOption($_sClassName, array($oTermA->term_id, 'text_field'));
     $_sTextFieldB = AdminPageFramework::getOption($_sClassName, array($oTermB->term_id, 'text_field'));
     return isset($_GET['order']) && 'asc' == $_GET['order'] ? strnatcmp($_sTextFieldA, $_sTextFieldB) : strnatcmp($_sTextFieldB, $_sTextFieldA);
 }
/**
 * return one of setting
 * @param $name
 * @param string $default
 * @param string $group
 * @return mixed|null|void
 */
function hw_get_setting($name, $default = '', $group = '')
{
    if (empty($group)) {
        $group = 'general';
    }
    if (is_array($name)) {
        $field = $name;
    } else {
        $field = array($group, $name);
    }
    return AdminPageFramework::getOption('HW_HOANGWEB_Settings', $field, $default);
}
 /**
  * return all fields values
  * @return array|mixed|null|void
  */
 public static function get_values()
 {
     return AdminPageFramework::getOption(__CLASS__);
 }
 /**
  * return all fields values
  * @return array|mixed|null|void
  */
 public static function get_values()
 {
     return AdminPageFramework::getOption(get_called_class());
 }
Exemplo n.º 10
0
/**
 * get wpcf7 apf option
 * @param string $opt: give name of option want to getting
 * @param string $default: default value
 * @param string $group: group section name
 */
function hw_wpcf7_option($opt, $default = '', $group = 'general')
{
    if (class_exists('AdminPageFramework')) {
        return AdminPageFramework::getOption('HW_Wpcf_settings', array($group, $opt), $default);
    }
}