What is a slug ?
A slug is a part of a URL which identifies a particular page on a website in a form readable by users. It’s the nice part of the URL, which explains the page’s content. In WordPress, it’s the editable part of your URL that you can edit when writing a new post.
nSlug allows to create those urls for any language easily.
use NSlug\SlugGenerator; $options = [ 'limit' => null, 'delimiter' => '-', 'lowercase' => true, ]; $slugGenerator = new SlugGenerator($options); // English strings. echo $slugGenerator->generate('Hello World'); // Prints 'hello-world'. echo $slugGenerator->generate('Life is too short!'); // Prints 'life-is-too-short'. // Arabic strings. echo $slugGenerator->generate('صباح جميل'); // Prints 'صباح-جميل'. echo $slugGenerator->generate('مساء الخير'); // Prints 'مساء-الخير'.
BOOKING SOLUTIONS 202x This is my take on a subset of booking, appointment, PMS or… Read More
THE GOAL Create a system cron for WordPress, that is accessible and can be easily… Read More
2024, what's cooking? Slowly getting into the 2024 spirit. 3 projects coming to a close… Read More
Short look back at 2023 This has been a busy and interesting year. I am… Read More
Elementor Pro provides grid containers as an experimental feature. The options provided are limited, when… Read More
Archaeology Travel is an online travel guide for people who enjoy exploring the world’s pasts.… Read More