Plugin info

Total downloads: 1,812
Active installs: 10
Total reviews: 0
Average rating: 0
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 1
Last updated: 4/22/2015 (3905 days ago)
Added to WordPress: 4/22/2015 (10 years old)
Minimum WordPress version: 4.1.1
Tested up to WordPress version: 3.4.2
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 3905 days ago

20/100

Is Wp Html Class abandoned?

Possibly abandoned (last update 3905 days ago).

Compatibility

Requires WordPress: 4.1.1
Tested up to: 3.4.2
Requires PHP: f

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

PHP Everywhere
Rating 3.4/5 (47 reviews)Active installs 20,000
WP Coder – Insert & Manage Code Snippets
Rating 4.9/5 (31 reviews)Active installs 10,000
Snippet Shortcodes
Rating 4.7/5 (25 reviews)Active installs 5,000
Code Widget
Rating 4.9/5 (35 reviews)Active installs 4,000
My Syntax Highlighter
Rating 4.4/5 (7 reviews)Active installs 400
2MB Autocode
Rating 0.0/5 (0 reviews)Active installs 100

Description

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.

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.

For those who do not like to mix HTML with PHP code in your projects, this plugin offers of help.

Wp-Html-Class

Uma simples classe PHP para se trabalhar com códigos PHP ao invés de HTML em seus projetos. Após instalado, basta utilizar o objeto $wp_tag para manipular os elementos HTML.

/**
 * Exemplo de uso da classe WpHtmlClass.
 * A abertura da tag é feita com um método. Este método possui somente um parametro.
 * Este parâmetro é uma String.
 * 
 */
    div('class="x" id="y"'); //Abre uma tag DIV com classe e id 
        $wp_tag->div; // fecha a tag DIV

        $wp_tag->hr(); //criar uma linha

        $wp_tag->img('src="img/image.png"'); //cria uma imagem

        $wp_tag->h1();
            $wp_tag->wp_print('Hello World'); //inprime uma string

            //wp_print() aceita um segundo parametro que por padrão é null
            //ele pode ser "decode" ou "encode"
            $wp_tag->wp_print('Hello World','decode'); 
        $wp_tag->h1;
    ?>

A idéia principal é tornar o código mais claro, sem precisar estar misturando elementos HTML com PHP.

English Version

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:

/**
 * Example using the Wp Html Class class.
 * The opening of the tag is performed with a method. This method has only one parameter.
 * This parameter is a String.
 * 
 */

    div('class="x" id="y"'); //Opens a DIV tag with class and id
        $wp_tag->div; //closes the DIV tag

        $wp_tag->hr(); //create a line

        $wp_tag->img('src="img/image.png"'); //create a image

        $wp_tag->h1();
            $wp_tag->wp_print('Hello World'); //print a string

            //print_wp () accepts a second parameter that by default is null
            //it can be "decode" or "encode"
            $wp_tag->wp_print('Hello World','decode'); 
        $wp_tag->h1;
    ?>

The main idea is to make the code clearer, without being mixing HTML elements with PHP.

Installation

  1. Unzip wp-html-class.zip inside the /wp-content/plugins/ directory (or install via the built-in WordPress plugin installer)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. Create an instance of class Class WpHtml $ wp tag = new Wp Html Class (); within your PHP files and start using HTML tags with PHP code.

Frequently Asked Questions

No FAQ available

Review feed

No reviews available

Screenshots

  1. Exemple 1

    Exemple 1

  2. Exemple 2

    Exemple 2

Changelog

No changelog available