LLMS_Lesson::has_modified_slug()
Determine if the slug (post name) of a lesson has been modified
Description Description
Ensures that lessons created via the builder with "New Lesson" as the title (default slug "new-lesson-{$num}") have their slug renamed when the title is renamed for the first time.
Return Return
(bool)
Source Source
File: includes/models/model.llms.lesson.php
public function has_modified_slug() { $default = sanitize_title( __( 'New Lesson', 'lifterlms' ) ); return ( false === strpos( $this->get( 'name' ), $default ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.14.8 | Introduced. |