{"action":"opened","number":3193,"pull_request":{"url":"https://api.github.com/repos/WordImpress/Give/pulls/3193","id":186573658,"html_url":"https://github.com/WordImpress/Give/pull/3193","diff_url":"https://github.com/WordImpress/Give/pull/3193.diff","patch_url":"https://github.com/WordImpress/Give/pull/3193.patch","issue_url":"https://api.github.com/repos/WordImpress/Give/issues/3193","number":3193,"state":"open","locked":false,"title":"fix(compat): shortcode dropdown appearing in Elementor TinyMCE editor window #3171","user":{"login":"Sidsector9","id":17757960,"avatar_url":"https://avatars1.githubusercontent.com/u/17757960?v=4","gravatar_id":"","url":"https://api.github.com/users/Sidsector9","html_url":"https://github.com/Sidsector9","followers_url":"https://api.github.com/users/Sidsector9/followers","following_url":"https://api.github.com/users/Sidsector9/following{/other_user}","gists_url":"https://api.github.com/users/Sidsector9/gists{/gist_id}","starred_url":"https://api.github.com/users/Sidsector9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sidsector9/subscriptions","organizations_url":"https://api.github.com/users/Sidsector9/orgs","repos_url":"https://api.github.com/users/Sidsector9/repos","events_url":"https://api.github.com/users/Sidsector9/events{/privacy}","received_events_url":"https://api.github.com/users/Sidsector9/received_events","type":"User","site_admin":false},"body":"Closes #3171 \r\n\r\n## Description\r\nThis PR provides a filter to show/hide the Give Shortcode Button.\r\n\r\nThe following filter will hide the Give Shortcode Button on the Elementor's Editor page:\r\n\r\n```php\r\nadd_filter( 'give_enable_give_shortcodes_button', function() {\r\n\r\n\t/**\r\n\t * Is the plugin: Elementor activated?\r\n\t */\r\n\t$is_elementor_active = in_array( 'elementor/elementor.php', get_option( 'active_plugins' ), true ) ? true : false;\r\n\t\r\n\t/**\r\n\t * Is this Elementor's editor page?\r\n\t */\r\n\t$is_elementor_page   = ( 'elementor' === give_clean( $_GET['action'] ) ) ? true : false;\r\n\r\n\r\n\t/**\r\n\t * If Elementor plugin is activated and the user is\r\n\t * on the Elementor's editor page, then hide\r\n\t * Give Shortcodes Button.\r\n\t */\r\n\tif ( $is_elementor_active && $is_elementor_page ) {\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\treturn true;\r\n});\r\n```\r\n\r\n## How Has This Been Tested?\r\nI tested this with using the filter on the Elementor's editor page. It hid the Give Shortcodes button.\r\nI also tested for console errors and PHP errors and there were none.\r\n\r\n## Screenshots (jpeg or gifs if applicable):\r\n![elementor](https://snag.gy/6uyqUX.jpg)\r\n\r\n## Checklist:\r\n- [x] My code is tested.\r\n- [x] My code follows the WordPress code style.\r\n- [x] My code follows has proper inline documentation.","created_at":"2018-05-08T09:19:13Z","updated_at":"2018-05-08T09:19:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/WordImpress/Give/pulls/3193/commits","review_comments_url":"https://api.github.com/repos/WordImpress/Give/pulls/3193/comments","review_comment_url":"https://api.github.com/repos/WordImpress/Give/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WordImpress/Give/issues/3193/comments","statuses_url":"https://api.github.com/repos/WordImpress/Give/statuses/4f2032fedd19490f32ac6d41dd544ba79353f7ee","head":{"label":"Sidsector9:issue-3171v3","ref":"issue-3171v3","sha":"4f2032fedd19490f32ac6d41dd544ba79353f7ee","user":{"login":"Sidsector9","id":17757960,"avatar_url":"https://avatars1.githubusercontent.com/u/17757960?v=4","gravatar_id":"","url":"https://api.github.com/users/Sidsector9","html_url":"https://github.com/Sidsector9","followers_url":"https://api.github.com/users/Sidsector9/followers","following_url":"https://api.github.com/users/Sidsector9/following{/other_user}","gists_url":"https://api.github.com/users/Sidsector9/gists{/gist_id}","starred_url":"https://api.github.com/users/Sidsector9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sidsector9/subscriptions","organizations_url":"https://api.github.com/users/Sidsector9/orgs","repos_url":"https://api.github.com/users/Sidsector9/repos","events_url":"https://api.github.com/users/Sidsector9/events{/privacy}","received_events_url":"https://api.github.com/users/Sidsector9/received_events","type":"User","site_admin":false},"repo":{"id":102198942,"name":"Give","full_name":"Sidsector9/Give","owner":{"login":"Sidsector9","id":17757960,"avatar_url":"https://avatars1.githubusercontent.com/u/17757960?v=4","gravatar_id":"","url":"https://api.github.com/users/Sidsector9","html_url":"https://github.com/Sidsector9","followers_url":"https://api.github.com/users/Sidsector9/followers","following_url":"https://api.github.com/users/Sidsector9/following{/other_user}","gists_url":"https://api.github.com/users/Sidsector9/gists{/gist_id}","starred_url":"https://api.github.com/users/Sidsector9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sidsector9/subscriptions","organizations_url":"https://api.github.com/users/Sidsector9/orgs","repos_url":"https://api.github.com/users/Sidsector9/repos","events_url":"https://api.github.com/users/Sidsector9/events{/privacy}","received_events_url":"https://api.github.com/users/Sidsector9/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sidsector9/Give","description":"Democratizing Generosity - The best way to accept donations on WordPress","fork":true,"url":"https://api.github.com/repos/Sidsector9/Give","forks_url":"https://api.github.com/repos/Sidsector9/Give/forks","keys_url":"https://api.github.com/repos/Sidsector9/Give/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sidsector9/Give/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sidsector9/Give/teams","hooks_url":"https://api.github.com/repos/Sidsector9/Give/hooks","issue_events_url":"https://api.github.com/repos/Sidsector9/Give/issues/events{/number}","events_url":"https://api.github.com/repos/Sidsector9/Give/events","assignees_url":"https://api.github.com/repos/Sidsector9/Give/assignees{/user}","branches_url":"https://api.github.com/repos/Sidsector9/Give/branches{/branch}","tags_url":"https://api.github.com/repos/Sidsector9/Give/tags","blobs_url":"https://api.github.com/repos/Sidsector9/Give/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sidsector9/Give/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sidsector9/Give/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sidsector9/Give/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sidsector9/Give/statuses/{sha}","languages_url":"https://api.github.com/repos/Sidsector9/Give/languages","stargazers_url":"https://api.github.com/repos/Sidsector9/Give/stargazers","contributors_url":"https://api.github.com/repos/Sidsector9/Give/contributors","subscribers_url":"https://api.github.com/repos/Sidsector9/Give/subscribers","subscription_url":"https://api.github.com/repos/Sidsector9/Give/subscription","commits_url":"https://api.github.com/repos/Sidsector9/Give/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sidsector9/Give/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sidsector9/Give/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sidsector9/Give/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sidsector9/Give/contents/{+path}","compare_url":"https://api.github.com/repos/Sidsector9/Give/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sidsector9/Give/merges","archive_url":"https://api.github.com/repos/Sidsector9/Give/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sidsector9/Give/downloads","issues_url":"https://api.github.com/repos/Sidsector9/Give/issues{/number}","pulls_url":"https://api.github.com/repos/Sidsector9/Give/pulls{/number}","milestones_url":"https://api.github.com/repos/Sidsector9/Give/milestones{/number}","notifications_url":"https://api.github.com/repos/Sidsector9/Give/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sidsector9/Give/labels{/name}","releases_url":"https://api.github.com/repos/Sidsector9/Give/releases{/id}","deployments_url":"https://api.github.com/repos/Sidsector9/Give/deployments","created_at":"2017-09-02T13:37:00Z","updated_at":"2017-09-02T13:37:03Z","pushed_at":"2018-05-08T09:16:34Z","git_url":"git://github.com/Sidsector9/Give.git","ssh_url":"git@github.com:Sidsector9/Give.git","clone_url":"https://github.com/Sidsector9/Give.git","svn_url":"https://github.com/Sidsector9/Give","homepage":"https://givewp.com/","size":48820,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"WordImpress:release/2.1.3","ref":"release/2.1.3","sha":"a63cb31b6e88cd5ba8bfa0a286a69abdb938d847","user":{"login":"WordImpress","id":4514249,"avatar_url":"https://avatars2.githubusercontent.com/u/4514249?v=4","gravatar_id":"","url":"https://api.github.com/users/WordImpress","html_url":"https://github.com/WordImpress","followers_url":"https://api.github.com/users/WordImpress/followers","following_url":"https://api.github.com/users/WordImpress/following{/other_user}","gists_url":"https://api.github.com/users/WordImpress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordImpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordImpress/subscriptions","organizations_url":"https://api.github.com/users/WordImpress/orgs","repos_url":"https://api.github.com/users/WordImpress/repos","events_url":"https://api.github.com/users/WordImpress/events{/privacy}","received_events_url":"https://api.github.com/users/WordImpress/received_events","type":"Organization","site_admin":false},"repo":{"id":31054058,"name":"Give","full_name":"WordImpress/Give","owner":{"login":"WordImpress","id":4514249,"avatar_url":"https://avatars2.githubusercontent.com/u/4514249?v=4","gravatar_id":"","url":"https://api.github.com/users/WordImpress","html_url":"https://github.com/WordImpress","followers_url":"https://api.github.com/users/WordImpress/followers","following_url":"https://api.github.com/users/WordImpress/following{/other_user}","gists_url":"https://api.github.com/users/WordImpress/gists{/gist_id}","starred_url":"https://api.github.com/users/WordImpress/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WordImpress/subscriptions","organizations_url":"https://api.github.com/users/WordImpress/orgs","repos_url":"https://api.github.com/users/WordImpress/repos","events_url":"https://api.github.com/users/WordImpress/events{/privacy}","received_events_url":"https://api.github.com/users/WordImpress/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WordImpress/Give","description":"Democratizing Generosity - The best way to accept donations on WordPress","fork":false,"url":"https://api.github.com/repos/WordImpress/Give","forks_url":"https://api.github.com/repos/WordImpress/Give/forks","keys_url":"https://api.github.com/repos/WordImpress/Give/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WordImpress/Give/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WordImpress/Give/teams","hooks_url":"https://api.github.com/repos/WordImpress/Give/hooks","issue_events_url":"https://api.github.com/repos/WordImpress/Give/issues/events{/number}","events_url":"https://api.github.com/repos/WordImpress/Give/events","assignees_url":"https://api.github.com/repos/WordImpress/Give/assignees{/user}","branches_url":"https://api.github.com/repos/WordImpress/Give/branches{/branch}","tags_url":"https://api.github.com/repos/WordImpress/Give/tags","blobs_url":"https://api.github.com/repos/WordImpress/Give/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WordImpress/Give/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WordImpress/Give/git/refs{/sha}","trees_url":"https://api.github.com/repos/WordImpress/Give/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WordImpress/Give/statuses/{sha}","languages_url":"https://api.github.com/repos/WordImpress/Give/languages","stargazers_url":"https://api.github.com/repos/WordImpress/Give/stargazers","contributors_url":"https://api.github.com/repos/WordImpress/Give/contributors","subscribers_url":"https://api.github.com/repos/WordImpress/Give/subscribers","subscription_url":"https://api.github.com/repos/WordImpress/Give/subscription","commits_url":"https://api.github.com/repos/WordImpress/Give/commits{/sha}","git_commits_url":"https://api.github.com/repos/WordImpress/Give/git/commits{/sha}","comments_url":"https://api.github.com/repos/WordImpress/Give/comments{/number}","issue_comment_url":"https://api.github.com/repos/WordImpress/Give/issues/comments{/number}","contents_url":"https://api.github.com/repos/WordImpress/Give/contents/{+path}","compare_url":"https://api.github.com/repos/WordImpress/Give/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WordImpress/Give/merges","archive_url":"https://api.github.com/repos/WordImpress/Give/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WordImpress/Give/downloads","issues_url":"https://api.github.com/repos/WordImpress/Give/issues{/number}","pulls_url":"https://api.github.com/repos/WordImpress/Give/pulls{/number}","milestones_url":"https://api.github.com/repos/WordImpress/Give/milestones{/number}","notifications_url":"https://api.github.com/repos/WordImpress/Give/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WordImpress/Give/labels{/name}","releases_url":"https://api.github.com/repos/WordImpress/Give/releases{/id}","deployments_url":"https://api.github.com/repos/WordImpress/Give/deployments","created_at":"2015-02-20T06:45:52Z","updated_at":"2018-05-08T06:00:30Z","pushed_at":"2018-05-08T06:50:17Z","git_url":"git://github.com/WordImpress/Give.git","ssh_url":"git@github.com:WordImpress/Give.git","clone_url":"https://github.com/WordImpress/Give.git","svn_url":"https://github.com/WordImpress/Give","homepage":"https://givewp.com/","size":48897,"stargazers_count":170,"watchers_count":170,"language":"PHP","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":109,"mirror_url":null,"archived":false,"open_issues_count":177,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":109,"open_issues":177,"watchers":170,"default_branch":"release/2.1.3"}},"_links":{"self":{"href":"https://api.github.com/repos/WordImpress/Give/pulls/3193"},"html":{"href":"https://github.com/WordImpress/Give/pull/3193"},"issue":{"href":"https://api.github.com/repos/WordImpress/Give/issues/3193"},"comments":{"href":"https://api.github.com/repos/WordImpress/Give/issues/3193/comments"},"review_comments":{"href":"https://api.github.com/repos/WordImpress/Give/pulls/3193/comments"},"review_comment":{"href":"https://api.github.com/repos/WordImpress/Give/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WordImpress/Give/pulls/3193/commits"},"statuses":{"href":"https://api.github.com/repos/WordImpress/Give/statuses/4f2032fedd19490f32ac6d41dd544ba79353f7ee"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":10,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"Sidsector9"}}