2017 © Pedro Peláez
 

library wp-atom-builder

Build filterable atomic elements.

image

cnp/wp-atom-builder

Build filterable atomic elements.

  • Friday, September 9, 2016
  • by cnp
  • Repository
  • 3 Watchers
  • 1 Stars
  • 70 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 17 Versions
  • 1 % Grown

The README.md

Atom Builder

The Atom class builds atomic markup from PHP arguments. For example, if you wanted this output:, (*1)

<h2 class="section-title">A Section Title</h2>

You could use this PHP code to render it:, (*2)

$section_title_args = [
  'tag' => 'h2',
  'content' => 'A Section Title'
];

$section_title = CNP\Atom::Assemble('section-title', $section_title_args);

echo $section_title;

Sure, this is slightly longer, but here's what is included in the Atom class:, (*3)

Filters

All the filters in the Atom class are namespaced to the name of the atom. An atom named 'section-title' would have an arguments filter named 'section-title_args'., (*4)

  1. $atom_name_args: filter the arguments array.
  2. $atom_name_classes: filter the classes array.
  3. $atom_name_id: filter the ID.
  4. $atom_name``$attribute_name_value: filter a specific attribute's value.
  5. $atom_name_attributes: filter the completed attributes array.
  6. $atom_name_content: filter the atom content.
  7. $atom_name_markup: filter the compiled markup.

Filtering the markup means that we can dynamically change the atom output on different areas of a site, without needing to change the atom arguments., (*5)

This also allows us to create generic blueprints that we can reuse from site-to-site, either adjusting arguments or filtering the atom where necessary., (*6)

The Versions

09/09 2016

dev-master

9999999-dev https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

09/09 2016

v0.14

0.14.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

20/06 2016

v0.13.2

0.13.2.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

20/06 2016

v0.13.1

0.13.1.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

17/06 2016

v0.13.0

0.13.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

09/05 2016

v0.12

0.12.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

03/05 2016

v0.11

0.11.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

02/05 2016

v0.10

0.10.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

06/04 2016

v0.9

0.9.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

09/03 2016

v0.8

0.8.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

18/01 2016

v0.7

0.7.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

31/12 2015

v0.6

0.6.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

31/12 2015

v0.5

0.5.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

30/12 2015

v0.4

0.4.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

29/12 2015

v0.3

0.3.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

29/12 2015

v0.2

0.2.0.0 https://github.com/Clark-Nikdel-Powell/Atom-Builder

Build filterable atomic elements.

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

29/12 2015

v0.1

0.1.0.0 https://github.com/Clark-Nikdel-Powell/Module-Builder

Build modules of filterable code piece by piece.

  Sources   Download

MIT

The Requires

  • php >=5.3.3