LLMS_Section::get_next()
Retrieve the previous section
Description Description
Return Return
(obj|false)
Source Source
File: includes/models/model.llms.section.php
public function get_next() { $siblings = $this->get_siblings( 'ids' ); $index = array_search( $this->get( 'id' ), $siblings ); // $index will be false if the current section isn't found (don't know why that would happen....) // $index will equal the length of the array if it's the last one (and there is no next) if ( false === $index || count( $siblings ) - 1 === $index ) { return false; } return llms_get_post( $siblings[ $index + 1 ] ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: