{"action":"closed","issue":{"url":"https://api.github.com/repos/FameThemes/screenr/issues/57","repository_url":"https://api.github.com/repos/FameThemes/screenr","labels_url":"https://api.github.com/repos/FameThemes/screenr/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/FameThemes/screenr/issues/57/comments","events_url":"https://api.github.com/repos/FameThemes/screenr/issues/57/events","html_url":"https://github.com/FameThemes/screenr/issues/57","id":163918736,"number":57,"title":"Localize script issue","user":{"login":"sakinshrestha","id":9452203,"avatar_url":"https://avatars.githubusercontent.com/u/9452203?v=3","gravatar_id":"","url":"https://api.github.com/users/sakinshrestha","html_url":"https://github.com/sakinshrestha","followers_url":"https://api.github.com/users/sakinshrestha/followers","following_url":"https://api.github.com/users/sakinshrestha/following{/other_user}","gists_url":"https://api.github.com/users/sakinshrestha/gists{/gist_id}","starred_url":"https://api.github.com/users/sakinshrestha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakinshrestha/subscriptions","organizations_url":"https://api.github.com/users/sakinshrestha/orgs","repos_url":"https://api.github.com/users/sakinshrestha/repos","events_url":"https://api.github.com/users/sakinshrestha/events{/privacy}","received_events_url":"https://api.github.com/users/sakinshrestha/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-05T18:45:38Z","updated_at":"2016-07-06T01:00:24Z","closed_at":"2016-07-06T01:00:24Z","body":"* You have added variable to the jQuery in using `wp_localize_script` in` functions.php` line 178, but only `theme.js` looks to be using the variable, so why add it in jquery?\r\n* You can modify that piece of code as follows to add it properly to `theme.js`\r\n```\r\nwp_localize_script( 'screenr-theme', 'Screenr',\r\n    apply_filters( 'screenr_localize_script',\r\n        array(\r\n            'ajax_url'              => admin_url( 'admin-ajax.php' ),\r\n            'full_screen_slider' => ( get_theme_mod( 'slider_fullscreen' ) ) ? true : false,\r\n            'header_layout'      => get_option( 'header_layout' ),\r\n            'slider_parallax'      => get_theme_mod( 'slider_parallax', 1 ),\r\n            'is_home_front_page' => ( is_page_template( 'template-frontpage.php' ) && is_front_page() ) ? 1 : 0,\r\n            'autoplay'           => 7000,\r\n            'speed'              => 700,\r\n            'effect'             => 'slide',\r\n        )\r\n    )\r\n);\r\n```\r\n* You can add it likewise if you need that variable in other files as well"}}
{"actor":{"display_login":"shrimp2t"}}