{"id":19104,"date":"2012-07-19T11:58:51","date_gmt":"2012-07-19T11:58:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/libwp\/"},"modified":"2021-04-04T09:11:07","modified_gmt":"2021-04-04T09:11:07","slug":"libwp","status":"publish","type":"plugin","link":"https:\/\/szl.wordpress.org\/plugins\/libwp\/","author":2259401,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.2","stable_tag":"2.2","tested":"5.6.17","requires":"3.0","requires_php":"7.1","requires_plugins":"","header_name":"LibWp","header_author":"VeronaLabs","header_description":"","assets_banners_color":"","last_updated":"2021-04-04 09:11:07","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/wp-sms-pro.com\/donate","header_plugin_uri":"https:\/\/github.com\/vitathemes\/libwp","header_author_uri":"https:\/\/veronalabs.com\/","rating":4,"author_block_rating":0,"active_installs":400,"downloads":7668,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0":{"tag":"1.0","author":"mostafa.s1990","date":"2012-07-19 13:26:58"},"1.1":{"tag":"1.1","author":"mostafa.s1990","date":"2012-08-01 09:23:01"},"1.2":{"tag":"1.2","author":"mostafa.s1990","date":"2012-10-05 12:28:13"},"1.3":{"tag":"1.3","author":"mostafa.s1990","date":"2013-10-19 14:36:04"},"1.4":{"tag":"1.4","author":"mostafa.s1990","date":"2014-12-12 17:51:19"},"2.0":{"tag":"2.0","author":"mostafa.s1990","date":"2021-01-14 20:10:17"},"2.1":{"tag":"2.1","author":"mostafa.s1990","date":"2021-02-14 15:00:51"},"2.2":{"tag":"2.2","author":"mostafa.s1990","date":"2021-04-04 09:11:07"}},"upgrade_notice":{"2.0":"<ul>\n<li>IMPORTANT: the structure is totally changed, so if you&#039;re using any functionality of the old version, upgrading to this version might break down your site.<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":"1","5":0},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":1043606,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":1043606,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.4","2.0","2.1","2.2"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[27765,1980,2008,91,1141],"plugin_category":[57],"plugin_contributors":[183049,77754,193288],"plugin_business_model":[],"class_list":["post-19104","plugin","type-plugin","status-publish","hentry","plugin_tags-functionality","plugin_tags-library","plugin_tags-post-type","plugin_tags-taxonomy","plugin_tags-theme","plugin_category-taxonomy","plugin_contributors-kashani","plugin_contributors-mostafas1990","plugin_contributors-veronalabs","plugin_committers-mostafas1990"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/libwp\/assets\/icon-128x128.png?rev=1043606","icon_2x":"https:\/\/ps.w.org\/libwp\/assets\/icon-256x256.png?rev=1043606","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Provide some simple functionality to register some hooks that could not register inside the WordPress themes<\/p>\n\n<h3>Quick Start<\/h3>\n\n<p>Get instance of main class.<\/p>\n\n<pre><code>LibWp();\n<\/code><\/pre>\n\n<p><strong>Post type<\/strong><\/p>\n\n<pre><code>LibWp()-&gt;postType();\n<\/code><\/pre>\n\n<p><strong>Taxonomy<\/strong><\/p>\n\n<pre><code>LibWp()-&gt;taxonomy();\n<\/code><\/pre>\n\n<h3>Register a new taxonomy<\/h3>\n\n<pre><code>LibWp()-&gt;postType()\n    -&gt;setName('book')\n    -&gt;setLabels([\n        'name'          =&gt; _x('Books', 'Post type general name', 'textdomain'),\n        'singular_name' =&gt; _x('Book', 'Post type singular name', 'textdomain'),\n        'menu_name'     =&gt; _x('Books', 'Admin Menu text', 'textdomain'),\n        'add_new'       =&gt; __('Add New', 'textdomain'),\n        'edit_item'     =&gt; __('Edit Book', 'textdomain'),\n        'view_item'     =&gt; __('View Book', 'textdomain'),\n        'all_items'     =&gt; __('All Books', 'textdomain'),\n    ])\n    -&gt;setFeatures([\n        'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments'\n    ])\n    -&gt;setArgument('show_ui', true)\n    -&gt;register();\n<\/code><\/pre>\n\n<h3>Register a new taxonomy belongs to previous post type<\/h3>\n\n<pre><code>LibWp()-&gt;taxonomy()\n    -&gt;setName('types')\n    -&gt;setPostTypes('book')\n    -&gt;setArgument('show_in_rest', true)\n    -&gt;setLabels([\n        'name'          =&gt; _x('Types', 'taxonomy general name', 'textdomain'),\n        'singular_name' =&gt; _x('Type', 'taxonomy singular name', 'textdomain'),\n        'search_items'  =&gt; __('Search Types', 'textdomain'),\n        'all_items'     =&gt; __('All Types', 'textdomain'),\n        'edit_item'     =&gt; __('Edit Type', 'textdomain'),\n        'add_new_item'  =&gt; __('Add New Type', 'textdomain'),\n        'new_item_name' =&gt; __('New Type Name', 'textdomain'),\n        'menu_name'     =&gt; __('Types', 'textdomain'),\n    ])\n    -&gt;register();\n<\/code><\/pre>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>libwp<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>2.2<\/h4>\n\n<ul>\n<li>Added support filters post type and taxonomy<\/li>\n<li>Registered an example of post type &amp; taxonomy after plugin initialization.<\/li>\n<\/ul>\n\n<h4>2.1<\/h4>\n\n<ul>\n<li>Added support custom argument for register the taxonomy<\/li>\n<\/ul>\n\n<h4>2.0<\/h4>\n\n<ul>\n<li>Changed the structure fo boilerplate<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial the plugin<\/li>\n<\/ul>","raw_excerpt":"Provide some simple functionality to register some hooks that could not register inside the WordPress themes","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/19104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=19104"}],"author":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/mostafas1990"}],"wp:attachment":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=19104"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=19104"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=19104"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=19104"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=19104"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=19104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}