• Resolved amglasser

    (@amglasser)


    Quick question here – where is the data stored for special hours?

    I am trying to build a simple admin page that will query the appropriate table, show any days that have special opening/closing hours, and then allow me to add or modify these records.

    The reason is that I have a number of users who need to be able to go in and administer special opening times, but don’t want them to have access to any other part of WP-Admin.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Design Extreme

    (@designextreme)

    @amglasser If you check the code, it’s located in the wp_options table, starting with the name: opening_hours_.

    Plugin Author Design Extreme

    (@designextreme)

    @amglasser Correction, it is the specific option entry: we_are_open_special. You can get this data in PHP using:

    $special_hours = get_option('we_are_open_special');
    Thread Starter amglasser

    (@amglasser)

    Thanks! The code is now working perfectly… I now have a PHP snippet that I can embed into a password protected page that will poll the current data in get_option(‘we_are_open_special’), allow the operator to either add or delete existing special hours, modify the array and then update_option(‘we_are_open_special’) the data back into the table.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Location of Data’ is closed to new replies.