{"action":"created","issue":{"url":"https://api.github.com/repos/Mte90/WordPress-Plugin-Boilerplate-Powered/issues/26","labels_url":"https://api.github.com/repos/Mte90/WordPress-Plugin-Boilerplate-Powered/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/Mte90/WordPress-Plugin-Boilerplate-Powered/issues/26/comments","events_url":"https://api.github.com/repos/Mte90/WordPress-Plugin-Boilerplate-Powered/issues/26/events","html_url":"https://github.com/Mte90/WordPress-Plugin-Boilerplate-Powered/issues/26","id":94583423,"number":26,"title":"pll__ in get_string doesn't work if my plugin call it before Polylang set it","user":{"login":"overclokk","id":4604932,"avatar_url":"https://avatars.githubusercontent.com/u/4604932?v=3","gravatar_id":"","url":"https://api.github.com/users/overclokk","html_url":"https://github.com/overclokk","followers_url":"https://api.github.com/users/overclokk/followers","following_url":"https://api.github.com/users/overclokk/following{/other_user}","gists_url":"https://api.github.com/users/overclokk/gists{/gist_id}","starred_url":"https://api.github.com/users/overclokk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overclokk/subscriptions","organizations_url":"https://api.github.com/users/overclokk/orgs","repos_url":"https://api.github.com/users/overclokk/repos","events_url":"https://api.github.com/users/overclokk/events{/privacy}","received_events_url":"https://api.github.com/users/overclokk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-12T17:21:41Z","updated_at":"2015-07-13T09:22:05Z","closed_at":null,"body":"Te lo scrivo in italiano che faccio prima, la funzione get_string non ritorna la stringa tradotta se è richiamata prima che questa venga settata da Polylang, se ti viene in mente una soluzione bene, se no comunque ci lavoro io e poi te la passo.\r\n\r\nUn esempio veloce, stessa istanza, in __construct non becca la stringa di pll, in una funzione appesa a wp_footer la becca senza problemi. (Il plugin è Italy Cookie Choices, forse anche perché viene caricato in ordine alfabetico?)\r\n\r\nAl max setto la variabile in una funzione e la appendo prima di wp_footer"},"comment":{"url":"https://api.github.com/repos/Mte90/WordPress-Plugin-Boilerplate-Powered/issues/comments/120866100","html_url":"https://github.com/Mte90/WordPress-Plugin-Boilerplate-Powered/issues/26#issuecomment-120866100","issue_url":"https://api.github.com/repos/Mte90/WordPress-Plugin-Boilerplate-Powered/issues/26","id":120866100,"user":{"login":"overclokk","id":4604932,"avatar_url":"https://avatars.githubusercontent.com/u/4604932?v=3","gravatar_id":"","url":"https://api.github.com/users/overclokk","html_url":"https://github.com/overclokk","followers_url":"https://api.github.com/users/overclokk/followers","following_url":"https://api.github.com/users/overclokk/following{/other_user}","gists_url":"https://api.github.com/users/overclokk/gists{/gist_id}","starred_url":"https://api.github.com/users/overclokk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/overclokk/subscriptions","organizations_url":"https://api.github.com/users/overclokk/orgs","repos_url":"https://api.github.com/users/overclokk/repos","events_url":"https://api.github.com/users/overclokk/events{/privacy}","received_events_url":"https://api.github.com/users/overclokk/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T09:22:05Z","updated_at":"2015-07-13T09:22:05Z","body":"Ti stavo per scrivere, si, bisogna usare plugins_loaded e farlo attivare dopo Polylang\r\nPolylang usa questo:\r\n`add_action('plugins_loaded', array(&$this, 'init'), 1);`\r\nE io ho fatto così:\r\n```\r\nif ( function_exists('pll__') )// Compatibility with Polylang\r\n    add_action( 'plugins_loaded', array( $this, 'dependency_init' ), 11 );\r\nelse\r\n    new Italy_Cookie_Choices_Front_End;\r\n```\r\nCosì setta correttamente la variabile.\r\nCon WPML e Ceceppa non ho provato, male che vada basta aggiungere un function_exist anche per loro."}}