Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

WordPress, get configured first day of week option

Clients can freely configure what day they consider the week to start on. I can’t figure out how to access this configuration information however.

enter image description here

$calendar = IntlCalendar::createInstance(NULL, get_locale());
$calendar->getFirstDayOfWeek();

The above is the best I’ve been able to find, but that only takes what is officially considered the first day of the week from the locale; not what the client has configured themselves.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Anyone know how I can access the value of this field?

>Solution :

This is a site option, so you can use get_option to fetch the value.

The name of this particular option, as mentioned on the linked page, is start_of_week.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading