{"action":"created","comment":{"url":"https://api.github.com/repos/10up/ElasticPress/pulls/comments/32969624","id":32969624,"diff_hunk":"@@ -543,11 +573,23 @@ public function prepare_meta( $post ) {\n \t */\n \tpublic function delete_index( $index_name = null ) {\n \n-\t\t$index_url = ep_get_index_url( $index_name );\n+\t\tif ( null === $index_name ) {\n+\n+\t\t\t$index = ep_get_index_name();\n+\n+\t\t} elseif ( is_array( $index_name ) ) {","path":"classes/class-ep-api.php","position":238,"original_position":238,"commit_id":"771c4013bb29fdbfb1f378e86276f77a07be5a8b","original_commit_id":"771c4013bb29fdbfb1f378e86276f77a07be5a8b","user":{"login":"tlovett1","id":1844351,"avatar_url":"https://avatars.githubusercontent.com/u/1844351?v=3","gravatar_id":"","url":"https://api.github.com/users/tlovett1","html_url":"https://github.com/tlovett1","followers_url":"https://api.github.com/users/tlovett1/followers","following_url":"https://api.github.com/users/tlovett1/following{/other_user}","gists_url":"https://api.github.com/users/tlovett1/gists{/gist_id}","starred_url":"https://api.github.com/users/tlovett1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlovett1/subscriptions","organizations_url":"https://api.github.com/users/tlovett1/orgs","repos_url":"https://api.github.com/users/tlovett1/repos","events_url":"https://api.github.com/users/tlovett1/events{/privacy}","received_events_url":"https://api.github.com/users/tlovett1/received_events","type":"User","site_admin":false},"body":"Array support should be in a separate PR.","created_at":"2015-06-22T18:52:08Z","updated_at":"2015-06-22T18:52:08Z","html_url":"https://github.com/10up/ElasticPress/pull/278#discussion_r32969624","pull_request_url":"https://api.github.com/repos/10up/ElasticPress/pulls/278","_links":{"self":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/comments/32969624"},"html":{"href":"https://github.com/10up/ElasticPress/pull/278#discussion_r32969624"},"pull_request":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/278"}}},"pull_request":{"url":"https://api.github.com/repos/10up/ElasticPress/pulls/278","id":36869827,"html_url":"https://github.com/10up/ElasticPress/pull/278","diff_url":"https://github.com/10up/ElasticPress/pull/278.diff","patch_url":"https://github.com/10up/ElasticPress/pull/278.patch","issue_url":"https://api.github.com/repos/10up/ElasticPress/issues/278","number":278,"state":"open","locked":false,"title":"Feature/fallback hosts","user":{"login":"ChrisWiegman","id":394675,"avatar_url":"https://avatars.githubusercontent.com/u/394675?v=3","gravatar_id":"","url":"https://api.github.com/users/ChrisWiegman","html_url":"https://github.com/ChrisWiegman","followers_url":"https://api.github.com/users/ChrisWiegman/followers","following_url":"https://api.github.com/users/ChrisWiegman/following{/other_user}","gists_url":"https://api.github.com/users/ChrisWiegman/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisWiegman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisWiegman/subscriptions","organizations_url":"https://api.github.com/users/ChrisWiegman/orgs","repos_url":"https://api.github.com/users/ChrisWiegman/repos","events_url":"https://api.github.com/users/ChrisWiegman/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisWiegman/received_events","type":"User","site_admin":false},"body":"This gives the option to have one or more fallback servers should the primary ES host fail. Fallback servers can be specified in a global array $eb_backup_hosts. Upon failure of the primary host the backup hosts will be checked sequentially until a good host is found or an error will be returned. Good hosts are cached for an hour before the process is checked again.","created_at":"2015-06-03T19:41:13Z","updated_at":"2015-06-22T18:52:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8439a99f592527486ad59fee5088def9b527a703","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/10up/ElasticPress/pulls/278/commits","review_comments_url":"https://api.github.com/repos/10up/ElasticPress/pulls/278/comments","review_comment_url":"https://api.github.com/repos/10up/ElasticPress/pulls/comments{/number}","comments_url":"https://api.github.com/repos/10up/ElasticPress/issues/278/comments","statuses_url":"https://api.github.com/repos/10up/ElasticPress/statuses/771c4013bb29fdbfb1f378e86276f77a07be5a8b","head":{"label":"10up:feature/fallback-hosts","ref":"feature/fallback-hosts","sha":"771c4013bb29fdbfb1f378e86276f77a07be5a8b","user":{"login":"10up","id":3358927,"avatar_url":"https://avatars.githubusercontent.com/u/3358927?v=3","gravatar_id":"","url":"https://api.github.com/users/10up","html_url":"https://github.com/10up","followers_url":"https://api.github.com/users/10up/followers","following_url":"https://api.github.com/users/10up/following{/other_user}","gists_url":"https://api.github.com/users/10up/gists{/gist_id}","starred_url":"https://api.github.com/users/10up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/10up/subscriptions","organizations_url":"https://api.github.com/users/10up/orgs","repos_url":"https://api.github.com/users/10up/repos","events_url":"https://api.github.com/users/10up/events{/privacy}","received_events_url":"https://api.github.com/users/10up/received_events","type":"Organization","site_admin":false},"repo":{"id":20672392,"name":"ElasticPress","full_name":"10up/ElasticPress","owner":{"login":"10up","id":3358927,"avatar_url":"https://avatars.githubusercontent.com/u/3358927?v=3","gravatar_id":"","url":"https://api.github.com/users/10up","html_url":"https://github.com/10up","followers_url":"https://api.github.com/users/10up/followers","following_url":"https://api.github.com/users/10up/following{/other_user}","gists_url":"https://api.github.com/users/10up/gists{/gist_id}","starred_url":"https://api.github.com/users/10up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/10up/subscriptions","organizations_url":"https://api.github.com/users/10up/orgs","repos_url":"https://api.github.com/users/10up/repos","events_url":"https://api.github.com/users/10up/events{/privacy}","received_events_url":"https://api.github.com/users/10up/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/10up/ElasticPress","description":"A plugin for integrating WordPress with Elasticsearch","fork":false,"url":"https://api.github.com/repos/10up/ElasticPress","forks_url":"https://api.github.com/repos/10up/ElasticPress/forks","keys_url":"https://api.github.com/repos/10up/ElasticPress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/10up/ElasticPress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/10up/ElasticPress/teams","hooks_url":"https://api.github.com/repos/10up/ElasticPress/hooks","issue_events_url":"https://api.github.com/repos/10up/ElasticPress/issues/events{/number}","events_url":"https://api.github.com/repos/10up/ElasticPress/events","assignees_url":"https://api.github.com/repos/10up/ElasticPress/assignees{/user}","branches_url":"https://api.github.com/repos/10up/ElasticPress/branches{/branch}","tags_url":"https://api.github.com/repos/10up/ElasticPress/tags","blobs_url":"https://api.github.com/repos/10up/ElasticPress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/10up/ElasticPress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/10up/ElasticPress/git/refs{/sha}","trees_url":"https://api.github.com/repos/10up/ElasticPress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/10up/ElasticPress/statuses/{sha}","languages_url":"https://api.github.com/repos/10up/ElasticPress/languages","stargazers_url":"https://api.github.com/repos/10up/ElasticPress/stargazers","contributors_url":"https://api.github.com/repos/10up/ElasticPress/contributors","subscribers_url":"https://api.github.com/repos/10up/ElasticPress/subscribers","subscription_url":"https://api.github.com/repos/10up/ElasticPress/subscription","commits_url":"https://api.github.com/repos/10up/ElasticPress/commits{/sha}","git_commits_url":"https://api.github.com/repos/10up/ElasticPress/git/commits{/sha}","comments_url":"https://api.github.com/repos/10up/ElasticPress/comments{/number}","issue_comment_url":"https://api.github.com/repos/10up/ElasticPress/issues/comments{/number}","contents_url":"https://api.github.com/repos/10up/ElasticPress/contents/{+path}","compare_url":"https://api.github.com/repos/10up/ElasticPress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/10up/ElasticPress/merges","archive_url":"https://api.github.com/repos/10up/ElasticPress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/10up/ElasticPress/downloads","issues_url":"https://api.github.com/repos/10up/ElasticPress/issues{/number}","pulls_url":"https://api.github.com/repos/10up/ElasticPress/pulls{/number}","milestones_url":"https://api.github.com/repos/10up/ElasticPress/milestones{/number}","notifications_url":"https://api.github.com/repos/10up/ElasticPress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/10up/ElasticPress/labels{/name}","releases_url":"https://api.github.com/repos/10up/ElasticPress/releases{/id}","created_at":"2014-06-10T04:29:30Z","updated_at":"2015-06-22T13:30:59Z","pushed_at":"2015-06-22T16:31:30Z","git_url":"git://github.com/10up/ElasticPress.git","ssh_url":"git@github.com:10up/ElasticPress.git","clone_url":"https://github.com/10up/ElasticPress.git","svn_url":"https://github.com/10up/ElasticPress","homepage":"","size":2394,"stargazers_count":168,"watchers_count":168,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":33,"forks":41,"open_issues":33,"watchers":168,"default_branch":"develop"}},"base":{"label":"10up:develop","ref":"develop","sha":"babeadb6367826b238fb332945443c36729974d6","user":{"login":"10up","id":3358927,"avatar_url":"https://avatars.githubusercontent.com/u/3358927?v=3","gravatar_id":"","url":"https://api.github.com/users/10up","html_url":"https://github.com/10up","followers_url":"https://api.github.com/users/10up/followers","following_url":"https://api.github.com/users/10up/following{/other_user}","gists_url":"https://api.github.com/users/10up/gists{/gist_id}","starred_url":"https://api.github.com/users/10up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/10up/subscriptions","organizations_url":"https://api.github.com/users/10up/orgs","repos_url":"https://api.github.com/users/10up/repos","events_url":"https://api.github.com/users/10up/events{/privacy}","received_events_url":"https://api.github.com/users/10up/received_events","type":"Organization","site_admin":false},"repo":{"id":20672392,"name":"ElasticPress","full_name":"10up/ElasticPress","owner":{"login":"10up","id":3358927,"avatar_url":"https://avatars.githubusercontent.com/u/3358927?v=3","gravatar_id":"","url":"https://api.github.com/users/10up","html_url":"https://github.com/10up","followers_url":"https://api.github.com/users/10up/followers","following_url":"https://api.github.com/users/10up/following{/other_user}","gists_url":"https://api.github.com/users/10up/gists{/gist_id}","starred_url":"https://api.github.com/users/10up/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/10up/subscriptions","organizations_url":"https://api.github.com/users/10up/orgs","repos_url":"https://api.github.com/users/10up/repos","events_url":"https://api.github.com/users/10up/events{/privacy}","received_events_url":"https://api.github.com/users/10up/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/10up/ElasticPress","description":"A plugin for integrating WordPress with Elasticsearch","fork":false,"url":"https://api.github.com/repos/10up/ElasticPress","forks_url":"https://api.github.com/repos/10up/ElasticPress/forks","keys_url":"https://api.github.com/repos/10up/ElasticPress/keys{/key_id}","collaborators_url":"https://api.github.com/repos/10up/ElasticPress/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/10up/ElasticPress/teams","hooks_url":"https://api.github.com/repos/10up/ElasticPress/hooks","issue_events_url":"https://api.github.com/repos/10up/ElasticPress/issues/events{/number}","events_url":"https://api.github.com/repos/10up/ElasticPress/events","assignees_url":"https://api.github.com/repos/10up/ElasticPress/assignees{/user}","branches_url":"https://api.github.com/repos/10up/ElasticPress/branches{/branch}","tags_url":"https://api.github.com/repos/10up/ElasticPress/tags","blobs_url":"https://api.github.com/repos/10up/ElasticPress/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/10up/ElasticPress/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/10up/ElasticPress/git/refs{/sha}","trees_url":"https://api.github.com/repos/10up/ElasticPress/git/trees{/sha}","statuses_url":"https://api.github.com/repos/10up/ElasticPress/statuses/{sha}","languages_url":"https://api.github.com/repos/10up/ElasticPress/languages","stargazers_url":"https://api.github.com/repos/10up/ElasticPress/stargazers","contributors_url":"https://api.github.com/repos/10up/ElasticPress/contributors","subscribers_url":"https://api.github.com/repos/10up/ElasticPress/subscribers","subscription_url":"https://api.github.com/repos/10up/ElasticPress/subscription","commits_url":"https://api.github.com/repos/10up/ElasticPress/commits{/sha}","git_commits_url":"https://api.github.com/repos/10up/ElasticPress/git/commits{/sha}","comments_url":"https://api.github.com/repos/10up/ElasticPress/comments{/number}","issue_comment_url":"https://api.github.com/repos/10up/ElasticPress/issues/comments{/number}","contents_url":"https://api.github.com/repos/10up/ElasticPress/contents/{+path}","compare_url":"https://api.github.com/repos/10up/ElasticPress/compare/{base}...{head}","merges_url":"https://api.github.com/repos/10up/ElasticPress/merges","archive_url":"https://api.github.com/repos/10up/ElasticPress/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/10up/ElasticPress/downloads","issues_url":"https://api.github.com/repos/10up/ElasticPress/issues{/number}","pulls_url":"https://api.github.com/repos/10up/ElasticPress/pulls{/number}","milestones_url":"https://api.github.com/repos/10up/ElasticPress/milestones{/number}","notifications_url":"https://api.github.com/repos/10up/ElasticPress/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/10up/ElasticPress/labels{/name}","releases_url":"https://api.github.com/repos/10up/ElasticPress/releases{/id}","created_at":"2014-06-10T04:29:30Z","updated_at":"2015-06-22T13:30:59Z","pushed_at":"2015-06-22T16:31:30Z","git_url":"git://github.com/10up/ElasticPress.git","ssh_url":"git@github.com:10up/ElasticPress.git","clone_url":"https://github.com/10up/ElasticPress.git","svn_url":"https://github.com/10up/ElasticPress","homepage":"","size":2394,"stargazers_count":168,"watchers_count":168,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":33,"forks":41,"open_issues":33,"watchers":168,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/278"},"html":{"href":"https://github.com/10up/ElasticPress/pull/278"},"issue":{"href":"https://api.github.com/repos/10up/ElasticPress/issues/278"},"comments":{"href":"https://api.github.com/repos/10up/ElasticPress/issues/278/comments"},"review_comments":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/278/comments"},"review_comment":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/10up/ElasticPress/pulls/278/commits"},"statuses":{"href":"https://api.github.com/repos/10up/ElasticPress/statuses/771c4013bb29fdbfb1f378e86276f77a07be5a8b"}}}}