{"id":35815,"date":"2015-04-22T13:20:53","date_gmt":"2015-04-22T13:20:53","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-html-class\/"},"modified":"2015-04-22T15:02:53","modified_gmt":"2015-04-22T15:02:53","slug":"wp-html-class","status":"publish","type":"plugin","link":"https:\/\/tr.wordpress.org\/plugins\/wp-html-class\/","author":13974636,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.0.1","stable_tag":"trunk","tested":"3.4.2","requires":"4.1.1","requires_php":"","requires_plugins":"","header_name":"WP Html Class","header_author":"Maickon Rangel","header_description":"","assets_banners_color":"485538","last_updated":"2015-04-22 15:02:53","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/maickon\/Wp-Html-Class","header_author_uri":"http:\/\/www.mrcurriculo.orgfree.com\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1901,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1142220","resolution":"128x128","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1142224","resolution":"772x250","location":"assets"},"banner-772x401.png":{"filename":"banner-772x401.png","revision":"1142220","resolution":"772x401","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1142250","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1142250","resolution":"2","location":"assets"}},"screenshots":{"1":"Exemple 1","2":"Exemple 2"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[246,662,90],"plugin_category":[57],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-35815","plugin","type-plugin","status-publish","hentry","plugin_tags-html","plugin_tags-php","plugin_tags-tag","plugin_category-taxonomy","plugin_committers-maickonrabgel"],"banners":{"banner":"https:\/\/ps.w.org\/wp-html-class\/assets\/banner-772x250.png?rev=1142224","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wp-html-class\/assets\/icon-128x128.png?rev=1142220","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-html-class\/assets\/screenshot-1.png?rev=1142250","caption":"Exemple 1"},{"src":"https:\/\/ps.w.org\/wp-html-class\/assets\/screenshot-2.png?rev=1142250","caption":"Exemple 2"}],"raw_content":"<!--section=description-->\n<p>A simple PHP class to work with PHP code instead of HTML in your projects. Once installed, simply use the object $ wp_tag to manipulate HTML elements.<\/p>\n\n<p>With this plugin you no longer use HTML code in your projects and starts to use a $ wp_tag object that will refer to any tag.<\/p>\n\n<p>For those who do not like to mix HTML with PHP code in your projects, this plugin offers of help.<\/p>\n\n<h3>Wp-Html-Class<\/h3>\n\n<p>Uma simples classe PHP para se trabalhar com c\u00f3digos PHP ao inv\u00e9s de HTML em seus projetos. Ap\u00f3s instalado, basta utilizar o objeto $wp_tag para manipular os elementos HTML.<\/p>\n\n<pre><code>\/**\n * Exemplo de uso da classe WpHtmlClass.\n * A abertura da tag \u00e9 feita com um m\u00e9todo. Este m\u00e9todo possui somente um parametro.\n * Este par\u00e2metro \u00e9 uma String.\n * \n *\/\n    &lt;?php\n        $wp_tag-&gt;div('class=\"x\" id=\"y\"'); \/\/Abre uma tag DIV com classe e id \n        $wp_tag-&gt;div; \/\/ fecha a tag DIV\n\n        $wp_tag-&gt;hr(); \/\/criar uma linha\n\n        $wp_tag-&gt;img('src=\"img\/image.png\"'); \/\/cria uma imagem\n\n        $wp_tag-&gt;h1();\n            $wp_tag-&gt;wp_print('Hello World'); \/\/inprime uma string\n\n            \/\/wp_print() aceita um segundo parametro que por padr\u00e3o \u00e9 null\n            \/\/ele pode ser \"decode\" ou \"encode\"\n            $wp_tag-&gt;wp_print('Hello World','decode'); \n        $wp_tag-&gt;h1;\n    ?&gt;\n<\/code><\/pre>\n\n<p>A id\u00e9ia principal \u00e9 tornar o c\u00f3digo mais claro, sem precisar estar misturando elementos HTML com PHP.<\/p>\n\n\n\n<h4>English Version<\/h4>\n\n<p>A simple PHP class to work with PHP code instead of HTML in your projects. Once installed, simply use the object $ wp_tag to manipulate HTML elements. ex:<\/p>\n\n<pre><code>\/**\n * Example using the Wp Html Class class.\n * The opening of the tag is performed with a method. This method has only one parameter.\n * This parameter is a String.\n * \n *\/\n\n    &lt;?php\n        $wp_tag-&gt;div('class=\"x\" id=\"y\"'); \/\/Opens a DIV tag with class and id\n        $wp_tag-&gt;div; \/\/closes the DIV tag\n\n        $wp_tag-&gt;hr(); \/\/create a line\n\n        $wp_tag-&gt;img('src=\"img\/image.png\"'); \/\/create a image\n\n        $wp_tag-&gt;h1();\n            $wp_tag-&gt;wp_print('Hello World'); \/\/print a string\n\n            \/\/print_wp () accepts a second parameter that by default is null\n            \/\/it can be \"decode\" or \"encode\"\n            $wp_tag-&gt;wp_print('Hello World','decode'); \n        $wp_tag-&gt;h1;\n    ?&gt;\n<\/code><\/pre>\n\n<p>The main idea is to make the code clearer, without being mixing HTML elements with PHP.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Unzip <code>wp-html-class.zip<\/code> inside the <code>\/wp-content\/plugins\/<\/code> directory (or install via the built-in WordPress plugin installer)<\/li>\n<li>Activate the plugin through the 'Plugins' admin menu in WordPress<\/li>\n<li>Create an instance of class Class WpHtml <code>$ wp tag = new Wp Html Class ();<\/code> within your PHP files and start using HTML tags with PHP code.<\/li>\n<\/ol>","raw_excerpt":"A simple PHP class to work with PHP code instead of HTML in your projects.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/35815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=35815"}],"author":[{"embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/maickonrabgel"}],"wp:attachment":[{"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=35815"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=35815"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=35815"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=35815"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=35815"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=35815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}