{"id":28087,"date":"2014-02-28T15:27:56","date_gmt":"2014-02-28T15:27:56","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/sensei-order\/"},"modified":"2014-02-28T15:30:55","modified_gmt":"2014-02-28T15:30:55","slug":"sensei-order","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/sensei-order\/","author":9179663,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.02","stable_tag":"trunk","tested":"3.9.40","requires":"2.8","requires_php":"","requires_plugins":"","header_name":"Sensei Re-ordering","header_author":"Chuck Ainsworth","header_description":"","assets_banners_color":"","last_updated":"2014-02-28 15:30:55","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/ainsworthetc.com\/plugins","header_plugin_uri":"http:\/\/ainsworthEtc.com","header_author_uri":"http:\/\/ainsworthEtc.com","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1888,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog","other_notes"],"tags":[],"upgrade_notice":{"":"<p>1st submisstion.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":"1539269","resolution":"2","location":"plugin"},"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":"1539269","resolution":"1","location":"plugin"}},"screenshots":{"1":"<p>Course Re-ording allows you to re-order WooThemes-Sensei courses\nthrough a drag and drop interface.<\/p>","2":"<p>Lesson Re-Order allows you to re-order WooThemes-Sensei lessons\nthrough a drag and drop interface. Initally all lessons shown. You can\nthen filter the lessons down to the course itself, thus greatly reducing\nthe lessons list.<\/p>"}},"plugin_section":[],"plugin_tags":[8102,40116,5851,50978],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-28087","plugin","type-plugin","status-closed","hentry","plugin_tags-course","plugin_tags-lesson","plugin_tags-module","plugin_tags-sensei","plugin_committers-cainsworth"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/sensei-order.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/sensei-order\/trunk\/screenshot-1.jpg?rev=1539269","caption":"<p>Course Re-ording allows you to re-order WooThemes-Sensei courses\nthrough a drag and drop interface.<\/p>"},{"src":"https:\/\/ps.w.org\/sensei-order\/trunk\/screenshot-2.jpg?rev=1539269","caption":"<p>Lesson Re-Order allows you to re-order WooThemes-Sensei lessons\nthrough a drag and drop interface. Initally all lessons shown. You can\nthen filter the lessons down to the course itself, thus greatly reducing\nthe lessons list.<\/p>"}],"raw_content":"<!--section=description-->\n<p>Plugin Sensei Re-ordering allows you to re-order courses and lessons,\ncreated by WooThemes-Sensei, through a drag and drop interface. This\nplugin follows similiar principles used in plugin 'My Page Order' and\nhas been tested as best as possible with WooTheme-Sensei and WooThemes\nSensei-module.<\/p>\n\n<!--section=installation-->\n<p>Extract the zip file and just drop the contents in the wp-\ncontent\/plugins\/ directory of your WordPress installation and then\nactivate the Plugin from Plugins page.<\/p>\n\n<p>After activation, Course Re-Order and Lessons Re-Order will be found in\nthe Sensei Lessons sub-menu.<\/p>\n\n<!--section=faq-->\n<p>This is a new plugin.<\/p>\n\n<!--section=changelog-->\n<p>1.00 - Inital Version<\/p>\n\n<p>1.01 - Fixed problem when WooSensei was updated, Sensei-Ordering would\nlock\u00a0in a continuous reporting error.\u00a0Changed Re-ordering button to\nshow what lesson what being updated.<\/p>\n\n<p>1.02 - Tested with 3.9 and donation had incorrect web address.<\/p>\n\n<!--section=other_notes-->\n<h3>Donation<\/h3>\n\n<p>If you like the plugin, consider showing your appreciation by saying\nthank you or making a <a href=\"http:\/\/ainsworthetc.com\/plugins\">small donation<\/a>.<\/p>\n\n<h3>Known Issues<\/h3>\n\n<p>I have not created the translation table for other languages, but the\ncode is written for translation.<\/p>\n\n<h3>Disclaimer<\/h3>\n\n<p>Ainsworth, Etc., LLC does not warrant the accuracy or completeness of\nany plugin and is not responsible for mistakes or omissions that may be\ncaused as a result of using it.<\/p>\n\n<h3>Changes in Woothemes-Sensi to support this plugin.<\/h3>\n\n<p>To support this plugin, there are changes that will need to be made in\nthe Woothemes-Sensi files to support the change in sort orders.<\/p>\n\n<ol>\n<li><p>Replace the file \".\/wp_content\/plugins\/woothemes-\nsensei\/templates\/wrappers\/pagination-posts.php\" with the one included\nzip file.<\/p><\/li>\n<li><p>Replace the file \".\/wp_content\/plugins\/woothemes-\nsensei\/inc\/woothemes-sensei-template.php\" with the one included zip\nfile.<\/p><\/li>\n<li><p>Replace the file \".\/wp_content\/plugins\/woothemes-\nsensei\/classes\/class-woothemes-sensei-course.php\" with the one included\nzip file.<\/p><\/li>\n<\/ol>\n\n<p>Note: If you have altered any of the above files,make the changes as\nnoted below.<\/p>\n\n<h3>Following are the changes made to the files<\/h3>\n\n'.\/woolthemes-sensei\/classes\/class-woothemes-sensei-course.php'\n\n<p>lines 492, 493 were changed:\n   from  'orderby' =&gt; 'date',       'order'  =&gt; 'DESC',\n   to    'orderby' =&gt; 'menu_order', 'order'  =&gt; 'ASC',<\/p>\n\n<p>lines 521, 522 were changed:\n   from  'orderby' =&gt; 'date',       'order'  =&gt; 'DESC',\n   to    'orderby' =&gt; 'menu_order', 'order'  =&gt; 'ASC',<\/p>\n\n<p>lines 572, 573 were changed:\n   from  'orderby' =&gt; 'date',       'order'  =&gt; 'DESC',\n   to    'orderby' =&gt; 'menu_order', 'order'  =&gt; 'ASC',<\/p>\n\n<p>lines 604, 605 were changed:\n   from  'orderby' =&gt; 'date',       'order'  =&gt; 'DESC',\n   to    'orderby' =&gt; 'menu_order', 'order'  =&gt; 'ASC',<\/p>\n\n<p>lines 617, 618 were changed:\n   from  'orderby' =&gt; 'date',       'order'  =&gt; 'DESC',\n   to    'orderby' =&gt; 'menu_order', 'order'  =&gt; 'ASC',<\/p>\n\n'.\/woothemes-sensei\/inc\/woothemes-sensei-template.php'\n\n<p>lines 38,39 from\n      set_query_var( 'orderby', 'date' );\n      set_query_var( 'order', 'DESC' );\n   to\n      set_query_var( 'orderby', 'menu_order' );\n      set_query_var( 'order', 'ASC' );<\/p>\n\n<p>lines 42.43 from\n      set_query_var( 'orderby', 'date' );\n      set_query_var( 'order', 'DESC' );\n   to\n      set_query_var( 'orderby', 'menu_order' );\n      set_query_var( 'order', 'ASC' );<\/p>\n\n<p>lines 49.50 from\n      set_query_var( 'orderby', 'date' );\n      set_query_var( 'order', 'DESC' );\n   to\n      set_query_var( 'orderby', 'menu_order' );\n      set_query_var( 'order', 'ASC' );<\/p>\n\n<p>lines 56.57 from\n      set_query_var( 'orderby', 'date' );\n      set_query_var( 'order', 'DESC' );\n   to\n      set_query_var( 'orderby', 'menu_order' );\n      set_query_var( 'order', 'ASC' );<\/p>\n\n<p>Following function inserted at line 489<\/p>\n\n\n\n<pre><code>\/**\n* sensei_get_prev_next_courses Returns the next and previous Courses\n* since 1.0.9\n* @param  integer $course_id\n* @return array $return_values\n*\/\nfunction sensei_get_prev_next_courses( $course_id = 0 ) {\n  global $woothemes_sensei;\n\n  $return_values = array();\n  $return_values['prev_lesson'] = 0;\n  $return_values['next_lesson'] = 0;\n\n  if ( 0 &lt; $course_id ) {\n     \/\/ Get the List of Courses\n     $args = array( 'post_type'       =&gt; 'course',\n                 'numberposts'     =&gt; -1,\n                 'orderby'            =&gt; 'menu_order',\n                 'order'              =&gt; 'ASC',\n                 'post_status'        =&gt; 'publish',\n                 'suppress_filters'   =&gt; true\n                 );\n\n     $courses = get_posts( $args );\n\n     \/\/ Index the Lessons\n     if ( 0 &lt; count( $courses ) ) {\n        $found_index = false;\n        foreach ($courses as $course){\n           if ( $found_index &amp;&amp; $return_values['next_lesson'] == 0 )\n           {\n              $return_values['next_lesson'] = $course-&gt;ID;\n           } \/\/ End If Statement\n\n           if ( $course-&gt;ID == $course_id ) {\n              \/\/ Is the current post\n              $found_index = true;\n           } \/\/ End If Statement\n\n           if ( !$found_index ) {\n              $return_values['prev_lesson'] = $course-&gt;ID;\n           } \/\/ End If Statement\n        } \/\/ End For Loop\n     } \/\/ End If Statement\n  } \/\/ End If Statement\n  return $return_values;\n<\/code><\/pre>\n\n<p>} \/\/ End sensei_get_prev_next_courses()<\/p>\n\n'.\/woothemes-sensei\/templates\/wrappers\/pagination-posts.php'\n\n<p>Re-written<\/p>","raw_excerpt":"Plugin Sensei Re-ordering allows you to re-order courses and lessons\nthrough a drag and drop interface that have been created with Wootheme-\nSensei","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/28087","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=28087"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cainsworth"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=28087"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=28087"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=28087"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=28087"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=28087"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=28087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}