{"id":13357,"date":"2011-05-23T15:54:36","date_gmt":"2011-05-23T15:54:36","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/boones-sortable-columns\/"},"modified":"2011-05-27T00:19:47","modified_gmt":"2011-05-27T00:19:47","slug":"boones-sortable-columns","status":"publish","type":"plugin","link":"https:\/\/ru.wordpress.org\/plugins\/boones-sortable-columns\/","author":2881701,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1","stable_tag":"1.1","tested":"3.2.1","requires":"3.1","requires_php":"","requires_plugins":"","header_name":"Boone's Sortable Columns","header_author":"Boone B Gorges","header_description":"","assets_banners_color":"","last_updated":"2011-05-27 00:19:47","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/teleogistic.net\/donate","header_plugin_uri":"http:\/\/github.com\/boonebgorges\/boones-sortable-columns","header_author_uri":"http:\/\/boonebgorges.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2839,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[854,1487,1240],"plugin_category":[],"plugin_contributors":[77845],"plugin_business_model":[],"class_list":["post-13357","plugin","type-plugin","status-publish","hentry","plugin_tags-columns","plugin_tags-custom-post-types","plugin_tags-tables","plugin_contributors-boonebgorges","plugin_committers-boonebgorges"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/boones-sortable-columns.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Here's how I recommend using the class.<\/p>\n\n<ol>\n<li>Either activate this plugin, or include the class in your own plugin file.<\/li>\n<li>When you start to render the page with the post list, define some columns and then instantiate the class:\n$cols = array(\n    array(\n        'name'      =&gt; 'restaurant_name',\n        'title'     =&gt; 'Restaurant Name',\n        'css_class' =&gt; 'restaurant-name',\n        'is_default'    =&gt; true\n    ),\n    array(\n        'name'      =&gt; 'cuisine_type',\n        'title'     =&gt; 'Cuisine Type',\n        'css_class' =&gt; 'cuisine-type',\n        'default_order' =&gt; 'desc'\n    )\n);\n$sortable = new BBG_CPT_Sort( $cols );<\/li>\n<li>As you render your table, you can use all sorts of fun methods to create column headers. Example:<\/li>\n<\/ol>\n\n\n        \n        have_columns() ) : ?&gt;\n            have_columns() ) : $sortable-&gt;the_column() ?&gt;\n                &lt;th class=&quot;the_column_css_class() ?&gt;\"&gt;\n                    &lt;a href=&quot;the_column_next_link( 'url' ) ?&gt;\"&gt;the_column_title() ?&gt;<\/a>\n                \n            \n        \n        \n    \n        \n        ...\n\n<!--section=installation-->\n<p>Two choices:\n1. Install from the plugins repository and activate for use in your theme\nor \n2. Copy the BBG_CPT_Sort class into your own plugin\/theme and require it manually.<\/p>\n\n<!--section=changelog-->\n<h4>1.1<\/h4>\n\n<ul>\n<li>Adds setup_base_url() method, for greater control over how column header URLs are generated<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"A handy, extensible class for adding sortable columns your custom post type lists.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/13357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=13357"}],"author":[{"embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/boonebgorges"}],"wp:attachment":[{"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=13357"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=13357"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=13357"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=13357"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=13357"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ru.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=13357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}