{"action":"created","issue":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/7311","repository_url":"https://api.github.com/repos/PrestaShop/PrestaShop","labels_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/7311/labels{/name}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/7311/comments","events_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/7311/events","html_url":"https://github.com/PrestaShop/PrestaShop/pull/7311","id":198763930,"number":7311,"title":"Introduce new hook filtered & use it for CMS page","user":{"login":"aleeks","id":9074610,"avatar_url":"https://avatars.githubusercontent.com/u/9074610?v=3","gravatar_id":"","url":"https://api.github.com/users/aleeks","html_url":"https://github.com/aleeks","followers_url":"https://api.github.com/users/aleeks/followers","following_url":"https://api.github.com/users/aleeks/following{/other_user}","gists_url":"https://api.github.com/users/aleeks/gists{/gist_id}","starred_url":"https://api.github.com/users/aleeks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleeks/subscriptions","organizations_url":"https://api.github.com/users/aleeks/orgs","repos_url":"https://api.github.com/users/aleeks/repos","events_url":"https://api.github.com/users/aleeks/events{/privacy}","received_events_url":"https://api.github.com/users/aleeks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-01-04T17:27:01Z","updated_at":"2017-01-06T10:53:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/7311","html_url":"https://github.com/PrestaShop/PrestaShop/pull/7311","diff_url":"https://github.com/PrestaShop/PrestaShop/pull/7311.diff","patch_url":"https://github.com/PrestaShop/PrestaShop/pull/7311.patch"},"body":"<!-- Thank you for contributing to the PrestaShop project! \r\n\r\nPlease take the time to edit the \"Answers\" rows with the necessary information: -->\r\n\r\n| Questions     | Answers\r\n| ------------- | -------------------------------------------------------\r\n| Branch?       | develop\r\n| Description?  | Introduce new hook filtered & use it for CMS page\r\n| Type?         | bug fix\r\n| Category?     | CO\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Fixed ticket? | http://forge.prestashop.com/browse/STAB-41\r\n| How to test?  | install a new shop (or use sql file) & register module to `filteredCmsContent` & `filteredCmsCategoryContent`, & make some action, see example. \r\n\r\n\r\n``` php \r\n// For example\r\npublic function hookFilteredCmsContent($params)\r\n{\r\n     return strip_tags($params['filtered_content']);\r\n}\r\n```\r\n\r\n\r\nFor this example: \r\n``` php \r\n// Module 1: \r\npublic function hookFilteredProductContent($params)\r\n{\r\n    $content = $params['filtered_content'];\r\n    $content = str_replace('--[blue]', '<span style=\"color: blue;\">', $content);\r\n    $content = str_replace('[/blue]--', '</span>', $content);\r\n    return $content;\r\n}\r\n\r\n// Module 2: \r\npublic function hookFilteredProductContent($params)\r\n{\r\n    $content = $params['filtered_content'];\r\n    $content = str_replace('--[red]', '<span style=\"color: red;\">', $content);\r\n    $content = str_replace('[/red]--', '</span>', $content);\r\n    return $content;\r\n}\r\n```\r\n\r\n![hook](https://cloud.githubusercontent.com/assets/9074610/21683945/ea940582-d35b-11e6-9f20-42e9f1459cef.png)\r\n\r\n\r\nHooks availables: \r\n- filteredCmsContent : `cms->description`\r\n- filteredCmsCategoryContent : `cms->category->description`\r\n- filteredProductContent : `product->description & product->description->short`\r\n- filteredCategoryContent : `category->description`\r\n- filteredManufacturerContent : `manufacturer->text`\r\n- filteredSupplierContent : `supplier->text`\r\n\r\nNow, it's up to your imagination to play!\r\n"},"comment":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/comments/270880186","html_url":"https://github.com/PrestaShop/PrestaShop/pull/7311#issuecomment-270880186","issue_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/7311","id":270880186,"user":{"login":"aleeks","id":9074610,"avatar_url":"https://avatars.githubusercontent.com/u/9074610?v=3","gravatar_id":"","url":"https://api.github.com/users/aleeks","html_url":"https://github.com/aleeks","followers_url":"https://api.github.com/users/aleeks/followers","following_url":"https://api.github.com/users/aleeks/following{/other_user}","gists_url":"https://api.github.com/users/aleeks/gists{/gist_id}","starred_url":"https://api.github.com/users/aleeks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleeks/subscriptions","organizations_url":"https://api.github.com/users/aleeks/orgs","repos_url":"https://api.github.com/users/aleeks/repos","events_url":"https://api.github.com/users/aleeks/events{/privacy}","received_events_url":"https://api.github.com/users/aleeks/received_events","type":"User","site_admin":false},"created_at":"2017-01-06T10:53:29Z","updated_at":"2017-01-06T10:53:29Z","body":"@Quetzacoalt91 founds it ! He is a genius ! :heart_eyes: "}}
{"actor":{"display_login":"aleeks"}}