{"id":3820,"date":"2015-11-07T17:38:48","date_gmt":"2015-11-07T15:38:48","guid":{"rendered":"http:\/\/vitaliykiyko.com\/?p=3820"},"modified":"2016-02-18T09:39:57","modified_gmt":"2016-02-18T07:39:57","slug":"uni-sortable-users-bezkoshtovnyy-wp-plahin","status":"publish","type":"post","link":"https:\/\/vitaliykiyko.com\/en\/3820\/uni-sortable-users-bezkoshtovnyy-wp-plahin\/","title":{"rendered":"Uni Sortable Users free WP plugin"},"content":{"rendered":"I have created and posted on BitBucket for free access <a href=\"https:\/\/bitbucket.org\/mrpsiho\/uni-sortable-users\">Uni Sortable Users<\/a> WordPress plugin (ver. 1.0.0). This plugin adds sorting of WP users by dragging and dropping them within the user admin section. It is not entirely my creation. I have found the main idea of how it should work in the Internet, wrapped it and tested it then<\/p>\n<p>And this is how I use it to output sorted users in the front end:<\/p>\n<pre>\r\n\/\/ including of the required file that contains \"is_plugin_active\" function\r\ninclude_once( ABSPATH . 'wp-admin\/includes\/plugin.php' );\r\n\/\/ check if the plugin activated\r\nif ( is_plugin_active( 'uni-sortable-users\/uni-sortable-users.php' ) ) {\r\n        $oUserQuery = new WP_User_Query( array('role' => 'instructor', 'meta_key' => 'user_order', 'orderby' => 'meta_value_num', 'order' => 'asc') );\r\n} else {\r\n         $oUserQuery = new WP_User_Query( array('role' => 'instructor') );\r\n}\r\n<\/pre>\n<p>You can use your own name of a role or don&#8217;t use this argument at all.","protected":false},"excerpt":{"rendered":"<p>I have created and posted on BitBucket for free access Uni Sortable Users WordPress plugin (ver. 1.0.0). This plugin adds sorting of WP users by dragging and dropping them within the user admin section. It is not entirely my creation&#8230;.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[39,47,136],"_links":{"self":[{"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/posts\/3820"}],"collection":[{"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/comments?post=3820"}],"version-history":[{"count":2,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/posts\/3820\/revisions"}],"predecessor-version":[{"id":3822,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/posts\/3820\/revisions\/3822"}],"wp:attachment":[{"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/media?parent=3820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/categories?post=3820"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vitaliykiyko.com\/en\/wp-json\/wp\/v2\/tags?post=3820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}