{"action":"created","issue":{"url":"https://api.github.com/repos/CMB2/CMB2-Snippet-Library/issues/60","repository_url":"https://api.github.com/repos/CMB2/CMB2-Snippet-Library","labels_url":"https://api.github.com/repos/CMB2/CMB2-Snippet-Library/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/CMB2/CMB2-Snippet-Library/issues/60/comments","events_url":"https://api.github.com/repos/CMB2/CMB2-Snippet-Library/issues/60/events","html_url":"https://github.com/CMB2/CMB2-Snippet-Library/issues/60","id":213522164,"node_id":"MDU6SXNzdWUyMTM1MjIxNjQ=","number":60,"title":"Is there any way to use Yoast Seo Analysis for custom meta boxes?","user":{"login":"OksanaRomaniv","id":5724727,"node_id":"MDQ6VXNlcjU3MjQ3Mjc=","avatar_url":"https://avatars1.githubusercontent.com/u/5724727?v=4","gravatar_id":"","url":"https://api.github.com/users/OksanaRomaniv","html_url":"https://github.com/OksanaRomaniv","followers_url":"https://api.github.com/users/OksanaRomaniv/followers","following_url":"https://api.github.com/users/OksanaRomaniv/following{/other_user}","gists_url":"https://api.github.com/users/OksanaRomaniv/gists{/gist_id}","starred_url":"https://api.github.com/users/OksanaRomaniv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OksanaRomaniv/subscriptions","organizations_url":"https://api.github.com/users/OksanaRomaniv/orgs","repos_url":"https://api.github.com/users/OksanaRomaniv/repos","events_url":"https://api.github.com/users/OksanaRomaniv/events{/privacy}","received_events_url":"https://api.github.com/users/OksanaRomaniv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-11T11:00:29Z","updated_at":"2018-07-03T16:56:16Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nFirstly, thank you for your great code!\r\n\r\nI just wonder if there is any way to force Yoast Seo Analysis to include text in custom meta boxes? I am using a repeatable group for creating slideshow and all the content of the post is in meta boxes.\r\n\r\nKind Regards,\r\nOksana"},"comment":{"url":"https://api.github.com/repos/CMB2/CMB2-Snippet-Library/issues/comments/402224581","html_url":"https://github.com/CMB2/CMB2-Snippet-Library/issues/60#issuecomment-402224581","issue_url":"https://api.github.com/repos/CMB2/CMB2-Snippet-Library/issues/60","id":402224581,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjIyNDU4MQ==","user":{"login":"TheNewGuy16","id":22531951,"node_id":"MDQ6VXNlcjIyNTMxOTUx","avatar_url":"https://avatars1.githubusercontent.com/u/22531951?v=4","gravatar_id":"","url":"https://api.github.com/users/TheNewGuy16","html_url":"https://github.com/TheNewGuy16","followers_url":"https://api.github.com/users/TheNewGuy16/followers","following_url":"https://api.github.com/users/TheNewGuy16/following{/other_user}","gists_url":"https://api.github.com/users/TheNewGuy16/gists{/gist_id}","starred_url":"https://api.github.com/users/TheNewGuy16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheNewGuy16/subscriptions","organizations_url":"https://api.github.com/users/TheNewGuy16/orgs","repos_url":"https://api.github.com/users/TheNewGuy16/repos","events_url":"https://api.github.com/users/TheNewGuy16/events{/privacy}","received_events_url":"https://api.github.com/users/TheNewGuy16/received_events","type":"User","site_admin":false},"created_at":"2018-07-03T16:56:16Z","updated_at":"2018-07-03T16:56:16Z","author_association":"NONE","body":"Hey guys just so its out there the yoast for cmb2 wont analyze group wysiwyg fields.  But there is a work around\r\n\r\nSo I looked into the js used for this in the Yoast for CMB2 plugin and it seems the plugin is just finding input fields with the attribute of yoast-analysis but for group fields and wysiwyg editors the plugin would not add the attribute. So if you add an extra_class instead to the wysiwyg editor using its options in cmb2, then add that textarea class to the js .each function and .on function you will now be able to analyze the group wysiwyg editors.\r\n\r\n**so in the js file for Yoast for CMB2 plugin I added the textarea and class in bold**\r\n\r\n$('#post-body').find(\r\n'input[yoast-analysis=1]:not(\".cmb2-upload-file-id\"), textarea[yoast-analysis=1],**textarea.yoast-analysis**'\r\n).on('keyup paste cut click', function() {\r\n\r\n$('#post-body').find(\r\n'input[yoast-analysis=1]:not(\".cmb2-upload-file-id\"), textarea[yoast-analysis=1],**textarea.yoast-analysis**'\r\n).each(function() {\r\n\r\nthen in the functions file for your plugin or theme you just need to add an extra editor_class using the CMB2 wysiwygs field options\r\n\r\neditor_class' => 'yoast-analysis', // add extra class(es) to the editor textarea for yoast analysis\r\n\r\nyou can find the docs here [https://github.com/CMB2/CMB2/wiki/Field-Types#wysiwyg]( https://github.com/CMB2/CMB2/wiki/Field-Types#wysiwyg)\r\n\r\nit does work and is nice to be able to just add a class and use it to add the text to the data return for yoast  I am new to this and not sure if I should fork the git and add this stuff\r\n"}}
{"actor":{"display_login":"TheNewGuy16"}}