{"id":16190,"date":"2011-12-25T20:28:41","date_gmt":"2011-12-25T20:28:41","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/ap-twig-bridge\/"},"modified":"2011-12-25T20:39:07","modified_gmt":"2011-12-25T20:39:07","slug":"ap-twig-bridge","status":"closed","type":"plugin","link":"https:\/\/fa-af.wordpress.org\/plugins\/ap-twig-bridge\/","author":7342894,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0","stable_tag":"1.0","tested":"3.3.2","requires":"3.3","requires_php":"","requires_plugins":"","header_name":"AP Twig Bridge","header_author":"Denis Voytyuk","header_description":"","assets_banners_color":"","last_updated":"2011-12-25 20:39:07","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/artprima.cz\/","header_author_uri":"http:\/\/artprima.cz\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1881,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[7899,7898],"plugin_category":[],"plugin_contributors":[83832],"plugin_business_model":[],"class_list":["post-16190","plugin","type-plugin","status-closed","hentry","plugin_tags-symfony","plugin_tags-template-twig","plugin_contributors-v-media","plugin_committers-v-media"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/ap-twig-bridge.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>AP Twig Bridge is a bridge between Wordpress and Twig. Wordpress is a great system mainly because of its simplicity,\nbut it is a headache to create templates for it. PHP-mess is not good for creating templates, that's why\nthere are different template engines. Twig is a new powerful template engine developed by <a href=\"http:\/\/fabien.potencier.org\/\">Fabien Potencier<\/a>. \nIt has very clear and simple syntax, inspired by Django and Jinja. So, if you ever thought of using some templating engine in Wordpress, try this plugin.\nFor now this plugin has a limited support for Wordpress API, but I'm going to develop it further.<\/p>\n\n<h4>Your Feedback Matters<\/h4>\n\n<p>Bugs to report? Feature requests? Criticism? New ideas? We want to hear from\nyou! Do not hesitate. Get in touch with us and share your views.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Get an archive with the most recent version of AP Twig Bridge.<\/li>\n<li>Uncompress the <code>ap-twigbridge<\/code> directory from the archive to your <code>wp-content\/plugins<\/code> directory.<\/li>\n<li>Activate the plugin in the administration panel.<\/li>\n<li>Copy <code>twigbridge<\/code> from <code>wp-content\/plugins\/ap-twigbridge\/themes<\/code> to <code>wp-content\/themes<\/code><\/li>\n<li>Activate AP Twig Bridge theme in the administration panel.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>What PHP version does this plugin support?<\/dt>\n<dd><p>This plugin should support php &gt; 5.3.0, but is tested only on php 5.3.8.<\/p><\/dd>\n<dt>How do I start creating my theme?<\/dt>\n<dd><p>You can directly edit files in twigbridge theme folder (don't forget to copy it to you <code>wp-content\/themes<\/code> directory). You can use functions.php to add some hooks or to load text domain.\nYou must have at least these files: style.css, index.php (must contain php-code to display the template, please check the example), header.php, footer.php, searchform.php.\nAll twig files must be in <code>wp-content\/themes\/yourthemefolder\/Twig<\/code>. At least <code>index.html.twig<\/code> must exist.<\/p><\/dd>\n<dt>How do I create a special template for a page?<\/dt>\n<dd><p>Check please <code>links.php<\/code> and <code>archives.php<\/code> about how the php-file should look like. Create a similar file with the name you want (e.g. special.php). Then\nyou just create a <code>special.html.twig<\/code> file and write all the code you need there.<\/p><\/dd>\n<dt>Your plugin lacks some Wordpress functions. How can I add them?<\/dt>\n<dd><p>Yes, I know, that I didn't include many Wordpress API function, because initially this plugin was just a proff of concept. Actually, you can add the functions you need\nto APBridge_TwigExtension module yourself, but your changes will be overwritten next time you update the plugin to a new version. So, creating your own extension\nwill be the best way to add the functions you need. You can do it in <code>index.php<\/code> this way: <code>$twigBridge-&gt;getTwig()-&gt;addExtension(new YourExtensionClass())<\/code>.\nIt must be called befor template rendering, of course. You can use <code>APBridge_TwigExtension<\/code> class as an example. Also you can write to me about the functions you need,\nso that I could include them in future versions.<\/p><\/dd>\n<dt>Is there an easy way to contact the developer of this plugin?<\/dt>\n<dd><p>Of course there is. Visit <a href=\"http:\/\/artprima.cz\/\">ArtPrima.cz<\/a> in order to find our e-mail address and other contacts.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"AP Twig Bridge makes it possible to create templates for Wordpress using Twig template engine.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/16190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=16190"}],"author":[{"embeddable":true,"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/v-media"}],"wp:attachment":[{"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=16190"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=16190"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=16190"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=16190"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=16190"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/fa-af.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=16190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}