Ejemplo n.º 1
0
function get_widget_name_value()
{
    $development_myval = get_option('sidebars_widgets');
    foreach (get_widget_area() as $val) {
        foreach ($development_myval[$val] as $keys => $values) {
            $string_val = str_before($values, "-");
            $wid_val[$string_val] = 'widget_' . $string_val;
        }
    }
    return $wid_val;
}
Ejemplo n.º 2
0
function self($cut_query = false)
{
    $uri = $_SERVER['REQUEST_URI'];
    if ($cut_query) {
        $before = str_before($uri, '?');
        if ($before) {
            return $before;
        }
    }
    return $uri;
}
 public function test_str_before()
 {
     $string = str_before('*****@*****.**', '@');
     $this->assertEquals('user', $string);
 }
Ejemplo n.º 4
0
function google_cache($url)
{
    return 'http://webcache.googleusercontent.com/search?q=cache:' . urlencode(str_before($url, '?'));
}