Skip to content

Releases: lipemat/wordpress-libs

Admin menu location support for Taxonomy

12 Apr 19:18
Compare
Choose a tag to compare

Using the already available "show_in_menu" Taxonomy class property, now supports specifying an admin menu location. This will add the taxonomy menu under the desired parent menu as well as highlight the correct menus when viewing or editing terms.

To simply add the taxonomy under the Tools menu:

use Lipe\Lib\Taxonomy\Taxonomy;
$tax = new Taxonomy( 'example' );  
$tax->show_in_menu = 'tools.php';

To specify which order it should show up in desired menu may be achieved by passing an array:

use Lipe\Lib\Taxonomy\Taxonomy;
$tax = new Taxonomy( 'example' );  
$tax->show_in_menu = [ 'tools.php' => 6 ];

Introducing a new class Comment/Comment_Trait

12 Apr 19:12
Compare
Choose a tag to compare

This class mimics the functionality already available for post types and taxonomies which gives access to the meta repo as well as exposing some basic methods for interactions.

With this being a Trait you obviously will want to extend with a child class like so.

use Lipe\Lib\Comment\Comment_Trait;

class Comment {
     use Comment_Trait;
}

Then use the class via the standard factory method like so

$comment = Comment::factory( $comment_id );
echo $comment->get_comment()->comment_content;

Class_Names

12 Mar 15:28
Compare
Choose a tag to compare

Introducing a new class Util/Class_Names.

This class mimics the functionality of node classNames to allow conditional classes passed as an array then outputted as standard html classes.

Example:

$form_classes = new Class_Names( [
	    'entry'         => 1,
	    'form'          => 1,
	    'open          => isset( $_GET[ 'open' ] ),
    ] );

<form class="<?= $form_classes; ?>"></form>

This also works with non associative arrays:

$form_classes = new Class_Names( [ 'entry', 'form' ] );

<form class="<?= $form_classes; ?>"></form>

Remove Action/Filter Always

21 Feb 17:19
Compare
Choose a tag to compare

Introducing a new class call Util/Actions with the following highlights:

  1. remove_action_always() method
  2. remove_filter_always() method

These new methods allow for removing filters or actions no matter where they are in the stack. You may call the method before, after, or during the add_action() or add_filter() call being removed. You no longer have to wait until an action or filter is registered before removing it.

Many other under the hood enhancements since version 1.2.0:

  • Repeatable Term_Select_2 CMB2 fields
  • Meta_Box class cleanup and enhancements
  • Bug fixes
  • PHP docs
  • Add show_on_cb() method to CMB2\Field

Hard Tested The CMB2 Meta Classes

07 Feb 19:53
Compare
Choose a tag to compare

Everything has been refined in terms of CMB2 as well as support for:

  • Tabs
  • Select2 Taxonomy fields

Many other under the hood enhancements including but not limited to:

  • Support to trigger callback once
  • Init a singleton once
    .......

Officially Out Of Beta

26 Jan 20:15
Compare
Choose a tag to compare

This is now ready for production sites. Any future changes will respect standard versioning practices and respect backward compatibility of any minor and dot version updates.

Getting Really Close To First Stable

07 Dec 16:45
Compare
Choose a tag to compare
Pre-release

All planned features have been accounted for. All satisfaction is acquired. Only thing left to do is give this a hard test against an actual production project.
Next non maintenance project I get, this will be used.

First Beta

22 Aug 14:58
Compare
Choose a tag to compare
First Beta Pre-release
Pre-release

Still open to structure changes, but stable enough to use in projects and/or fork.

Repo Ready

23 Jun 10:28
Compare
Choose a tag to compare
Repo Ready Pre-release
Pre-release
0.1-alpha

Create composer.json