/** * @ticket 480 */ function test_get_meta_without_meta_key() { gp_update_meta('1', 'key1', 'foo', 'thing'); gp_update_meta('1', 'key2', 'foo', 'thing'); $meta = gp_get_meta('thing', '1'); $this->assertCount(2, $meta); $this->assertEqualSets(array('key1', 'key2'), array_keys($meta)); }
/** * Update an option, specific to your plugin. * * You don't have to prefix the key or to tie its name to your plugin. * * @param string $key * @param mixed $value Can be anything serializable * @return bool */ function update_option($key, $value) { return gp_update_meta(0, $key, $value, $this->_object_type, true); }
function gp_update_option($option, $value) { return gp_update_meta(0, $option, $value, 'option', true); }
function set_meta($key, $value) { return gp_update_meta($this->id, $key, $value, 'user'); }