Changeset 1824010
- Timestamp:
- 02/18/2018 02:13:46 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
demo-content-templates/trunk/src/Infrastructure/WP_Persistent_Notices.php
r1801770 r1824010 40 40 'location' => 'default' 41 41 ); 42 add_action('admin_init', array($this, 'admin_init'));43 42 add_action('admin_notices', array($this, 'render_notices')); 44 43 add_action('wp_ajax_get_persistent_notices', array( … … 47 46 )); 48 47 add_action('shutdown', array($this, 'save_notices')); 49 }50 51 public function admin_init() {52 // add a filter and that returns true to replace or prevent the session initialization functionality53 if (!apply_filters('wp_persistent_notices_replace_initialization', FALSE)) {54 if (session_status() == PHP_SESSION_NONE) {55 try {56 session_start();57 }catch (\Exception $e) {58 59 }60 }61 }62 48 } 63 49
Note: See TracChangeset
for help on using the changeset viewer.