src/Ultra/Mutator/Mutator.php
public function removeNamespace($post, $namespaces)
    {
        foreach($post as $key => $value)
        {
            $splitKey = explode('_', $key);

            if(in_array($splitKey[0], $namespaces))
            {
                unset($post->$key);

                $newKey = implode(array_slice($splitKey, 1), '_');

                $post->$newKey = $value;
            }
        }

        return $this;
    }
public function removeNamespace($post, $namespaces)
    {
        foreach($post as $key => $value)
        {
            $splitKey = explode('_', $key);

            if(in_array($splitKey[0], $namespaces))
            {
                unset($post->$key);

                $newKey = implode(array_slice($splitKey, 1), '_');

                $post->$newKey = $value;
            }
        }

        return $this;
    }
public function removeNamespace ( $ post , $ namespaces ) { foreach ( $ post as $ key => $ value ) { $ splitKey = explode ( '_' , $ key ) ; if ( in_array ( $ splitKey [ 0 ] , $ namespaces ) ) { unset ( $ post -> $ key ) ; $ newKey = implode ( array_slice ( $ splitKey , 1 ) , '_' ) ; $ post -> $ newKey = $ value ; } } return $ this ; }
Strip out a namespace from a data set.

@param object $post WP_Post object to modify
@param string $namespace The namespace to remove
@return Ultra\Mutator\Mutator The mutated data object
Strip out a namespace from a data set .