REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 4.13 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/mp-timetable/classes/class-permalinks.php
Text
Base64
<?php namespace mp_timetable\plugin_core\classes; class Permalinks { /** * Permalink settings. * * @var array */ private $permalinks = array(); /** * Hook in tabs. */ public function __construct() { $this->settings_init(); $this->settings_save(); } /** * Init our settings. */ public function settings_init() { add_settings_section( 'mp-timetable-permalinks', __( 'Timetable Permalinks', 'mp-timetable' ), array( $this, 'settings' ), 'permalink' ); add_settings_field( 'timetable_column_slug', __( 'Column base', 'mp-timetable' ), array( $this, 'timetable_column_slug_input' ), 'permalink', 'mp-timetable-permalinks' ); add_settings_field( 'timetable_event_slug', __( 'Event base', 'mp-timetable' ), array( $this, 'timetable_event_slug_input' ), 'permalink', 'mp-timetable-permalinks' ); add_settings_field( 'timetable_event_category_slug', __( 'Event Category base', 'mp-timetable' ), array( $this, 'timetable_event_category_slug_input' ), 'permalink', 'mp-timetable-permalinks' ); add_settings_field( 'timetable_event_tag_slug', __( 'Event Tag base', 'mp-timetable' ), array( $this, 'timetable_event_tag_slug_input' ), 'permalink', 'mp-timetable-permalinks' ); $this->permalinks = Core::get_instance()->get_permalink_structure(); } /** * Show a Column slug input box. */ public function timetable_column_slug_input() { ?> <input name="timetable_column_slug" type="text" class="regular-text" value="<?php echo esc_attr( $this->permalinks['column_base'] ); ?>" placeholder="timetable/column" /> <?php } /** * Show an Event slug input box. */ public function timetable_event_slug_input() { ?> <input name="timetable_event_slug" type="text" class="regular-text" value="<?php echo esc_attr( $this->permalinks['event_base'] ); ?>" placeholder="timetable/event" /> <?php } /** * Show an Event Category slug input box. */ public function timetable_event_category_slug_input() { ?> <input name="timetable_event_category_slug" type="text" class="regular-text" value="<?php echo esc_attr( $this->permalinks['event_category_base'] ); ?>" placeholder="timetable/category" /> <?php } /** * Show an Event Tag slug input box. */ public function timetable_event_tag_slug_input() { ?> <input name="timetable_event_tag_slug" type="text" class="regular-text" value="<?php echo esc_attr( $this->permalinks['event_tag_base'] ); ?>" placeholder="timetable/tag" /> <?php } /** * Show the settings. */ public function settings() { wp_nonce_field( 'timetable-permalinks', 'timetable-permalinks-nonce' ); } /** * Save the settings. */ public function settings_save() { if ( ! is_admin() ) { return; } // We need to save the options ourselves; settings api does not trigger save for the permalinks page. if ( isset( $_POST['permalink_structure'], $_POST['timetable-permalinks-nonce'], $_POST['timetable_column_slug'], $_POST['timetable_event_slug'], $_POST['timetable_event_category_slug'], $_POST['timetable_event_tag_slug'] ) && wp_verify_nonce( sanitize_key( $_POST['timetable-permalinks-nonce'] ), 'timetable-permalinks' ) ) { // WPCS: input var ok, sanitization ok. $permalinks = (array) get_option( 'mp_timetable_permalinks', array() ); $permalinks['column_base'] = $this->sanitize_permalink( wp_unslash( $_POST['timetable_column_slug'] ) ); // WPCS: input var ok, sanitization ok. $permalinks['event_base'] = $this->sanitize_permalink( wp_unslash( $_POST['timetable_event_slug'] ) ); // WPCS: input var ok, sanitization ok. $permalinks['event_category_base'] = $this->sanitize_permalink( wp_unslash( $_POST['timetable_event_category_slug'] ) ); // WPCS: input var ok, sanitization ok. $permalinks['event_tag_base'] = $this->sanitize_permalink( wp_unslash( $_POST['timetable_event_tag_slug'] ) ); // WPCS: input var ok, sanitization ok. update_option( 'mp_timetable_permalinks', $permalinks ); } } private function sanitize_permalink( $value ) { $value = esc_url_raw( trim( $value ) ); $value = str_replace( 'http://', '', $value ); return untrailingslashit( $value ); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 6 × Files: 12
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
blocks
DIR
-
drwxr-xr-x
2026-05-26 02:58:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
controllers
DIR
-
drwxr-xr-x
2026-05-26 02:58:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
libs
DIR
-
drwxr-xr-x
2026-05-26 02:58:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
models
DIR
-
drwxr-xr-x
2026-05-26 02:58:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
modules
DIR
-
drwxr-xr-x
2026-05-26 02:58:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
widgets
DIR
-
drwxr-xr-x
2026-05-26 02:58:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-controller.php
724 B
lrw-r--r--
2022-11-14 19:39:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-core.php
22.40 KB
lrw-r--r--
2026-05-25 23:22:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-hooks.php
11.84 KB
lrw-r--r--
2026-05-25 23:22:48
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-model.php
713 B
lrw-r--r--
2022-11-14 19:39:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-module.php
356 B
lrw-r--r--
2022-11-14 19:39:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-offer.php
8.16 KB
lrw-r--r--
2024-02-13 00:39:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-permalinks.php
4.13 KB
lrw-r--r--
2022-11-14 19:39:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-preprocessor.php
5.54 KB
lrw-r--r--
2022-11-14 19:39:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-shortcode.php
13.40 KB
lrw-r--r--
2024-02-28 20:54:34
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-state-factory.php
1.61 KB
lrw-r--r--
2024-02-13 00:39:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-view.php
5.74 KB
lrw-r--r--
2024-02-13 00:39:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
class-widgets-manager.php
630 B
lrw-r--r--
2023-01-31 01:14:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).