/** * @param $post_id * @param array $params * @return helloPinBoard|null */ public static function getInstance($post_id, $params = array()) { if (self::$instance == NULL) { self::$instance = new helloPinBoard($post_id, $params); } return self::$instance; }
public function hello_pins_remove_background() { if (empty($_REQUEST['post_id'])) { return NULL; } $post_id = $_REQUEST['post_id']; $this->pinBoard = helloPinBoard::getInstance($post_id); $params = array('background' => '', 'height_original' => 0, 'width_original' => 0); $this->pinBoard->setParams($params); return $this->pinBoard->save(); }