Plugin Directory

Changeset 2345501


Ignore:
Timestamp:
07/23/2020 03:48:18 PM (6 years ago)
Author:
chat2
Message:

Settings changes

Location:
chat2/tags/3.6.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chat2/tags/3.6.0/admin/field-configiguration-admin.php

    r2344763 r2345501  
    1616        public function __construct(){
    1717 
    18         $insancename = str_replace('.', '', $_SERVER['HTTP_HOST']);                         
    19         update_option('chat-field-settings-var-content', $insancename);
    20        
    21            
    22         add_action( 'admin_menu', array( $this, 'admin_menu' ) );
     18            $this->setInstanceName();
     19         
     20            add_action( 'admin_menu', array( $this, 'admin_menu' ) );
    2321       
    24         add_action( 'admin_post_chat_field_settings', array( $this, 'save_options' ) );;   
    25     }
    26    
     22            add_action( 'admin_post_chat_field_settings', array( $this, 'save_options' ) );;   
     23            }
     24
     25        public function setInstanceName(){
     26
     27             $subdomain = get_option('chat-field-settings-var-content') ? get_option('chat-field-settings-var-content') : false;
     28             if(!$subdomain){
     29                $insancename = str_replace('.', '', $_SERVER['HTTP_HOST']);                         
     30                update_option('chat-field-settings-var-content', $insancename);
     31             }
     32
     33        }
    2734    public function save_options(){
    2835        $params = $_POST;
  • chat2/tags/3.6.0/chat2.php

    r2344812 r2345501  
    2121}
    2222
    23 if ( ! class_exists( 'Field_Configuration_Admin_Settings' ) ) :
     23if ( ! class_exists( 'Chat2_Settings_Front' ) ) :
    2424
    2525class Chat2_Settings_Front {
Note: See TracChangeset for help on using the changeset viewer.