shiftsCommand = $hooks->wrap( $shiftsCommand ); $this->appCommand = $hooks->wrap( $appCommand ); } public function execute() { /* 'DELETE FROM ' . $dbPrefix . 'postmeta WHERE post_id IN (SELECT ID FROM ' . $dbPrefix . 'posts WHERE post_type LIKE "sh4_%")'; 'DELETE FROM ' . $dbPrefix . 'posts WHERE post_type LIKE "sh4_%"'; 'DELETE FROM ' . $dbPrefix . 'options WHERE option_name LIKE "sh4_%"'; */ global $wpdb; $dbPrefix = $wpdb->prefix; $sql = 'DELETE FROM ' . $dbPrefix . 'posts WHERE post_type LIKE "sh4_%"'; $wpdb->query( $sql ); $this->appCommand->uninstall(); $to = 'admin'; $return = array( $to, '__Reinstalled__' ); return $return; } public function executeShifts() { $this->shiftsCommand->deleteAll(); $to = ''; $return = array( $to, '__All Shifts Deleted__' ); return $return; } }