{"action":"created","issue":{"url":"https://api.github.com/repos/megumiteam/staticpress-s3/issues/4","repository_url":"https://api.github.com/repos/megumiteam/staticpress-s3","labels_url":"https://api.github.com/repos/megumiteam/staticpress-s3/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/megumiteam/staticpress-s3/issues/4/comments","events_url":"https://api.github.com/repos/megumiteam/staticpress-s3/issues/4/events","html_url":"https://github.com/megumiteam/staticpress-s3/issues/4","id":329380143,"node_id":"MDU6SXNzdWUzMjkzODAxNDM=","number":4,"title":"再構築時に一部のディレクトリを除外したい","user":{"login":"keita-i","id":39948031,"node_id":"MDQ6VXNlcjM5OTQ4MDMx","avatar_url":"https://avatars0.githubusercontent.com/u/39948031?v=4","gravatar_id":"","url":"https://api.github.com/users/keita-i","html_url":"https://github.com/keita-i","followers_url":"https://api.github.com/users/keita-i/followers","following_url":"https://api.github.com/users/keita-i/following{/other_user}","gists_url":"https://api.github.com/users/keita-i/gists{/gist_id}","starred_url":"https://api.github.com/users/keita-i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keita-i/subscriptions","organizations_url":"https://api.github.com/users/keita-i/orgs","repos_url":"https://api.github.com/users/keita-i/repos","events_url":"https://api.github.com/users/keita-i/events{/privacy}","received_events_url":"https://api.github.com/users/keita-i/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-05T09:46:04Z","updated_at":"2018-06-15T07:09:12Z","closed_at":null,"author_association":"NONE","body":"AMIMOTO AMIを使ってEC2+RDS+Wordpress＋S3の構成をAWSで作成いたしました。\r\n\r\n再構築する際にauthorやwp-content/pluginsなどのフォルダを除外したいです。\r\n\r\nいろいろ調べ、以下を/wp-content/plugins/staticpress/plugin.phpの末尾に\r\n記述すれば除外できるというサイトを見つけたのですが、\r\n実際に記述して再構築を行うとエラーになり、再構築自体が実行されませんでした。\r\n----------------------------------------------------------------------------\r\nadd_action('StaticPress::file_put', 'static_rm', 1);\r\nfunction static_rm($file_dest, $url){\r\n  if(strstr($file_dest, '/author/')\r\n    or strstr($file_dest, '/wp-content/plugins/')\r\n    or strstr($file_dest, '/wp-json/')){\r\n\t\tunlink($file_dest);\r\n  }\r\n}\r\n----------------------------------------------------------------------------\r\n\r\nどうすれば再構築時に一部のディレクトリ、ファイルを除外できますでしょうか？\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/megumiteam/staticpress-s3/issues/comments/397533600","html_url":"https://github.com/megumiteam/staticpress-s3/issues/4#issuecomment-397533600","issue_url":"https://api.github.com/repos/megumiteam/staticpress-s3/issues/4","id":397533600,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzUzMzYwMA==","user":{"login":"keita-i","id":39948031,"node_id":"MDQ6VXNlcjM5OTQ4MDMx","avatar_url":"https://avatars0.githubusercontent.com/u/39948031?v=4","gravatar_id":"","url":"https://api.github.com/users/keita-i","html_url":"https://github.com/keita-i","followers_url":"https://api.github.com/users/keita-i/followers","following_url":"https://api.github.com/users/keita-i/following{/other_user}","gists_url":"https://api.github.com/users/keita-i/gists{/gist_id}","starred_url":"https://api.github.com/users/keita-i/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keita-i/subscriptions","organizations_url":"https://api.github.com/users/keita-i/orgs","repos_url":"https://api.github.com/users/keita-i/repos","events_url":"https://api.github.com/users/keita-i/events{/privacy}","received_events_url":"https://api.github.com/users/keita-i/received_events","type":"User","site_admin":false},"created_at":"2018-06-15T07:09:12Z","updated_at":"2018-06-15T07:09:12Z","author_association":"NONE","body":"PHPのバージョンは7.0.30です。"}}
{"actor":{"display_login":"keita-i"}}