| Server IP : 146.59.209.152 / Your IP : 216.73.216.46 Web Server : Apache System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : infrafs ( 43850) PHP Version : 8.2.29 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/infrafs/www/wp-content/plugins/wp-store-locator/inc/ |
Upload File : |
<?php
/**
* WPSL Install
*
* @author Tijmen Smit
* @since 2.0.0
*/
if ( !defined( 'ABSPATH' ) ) exit;
/**
* Run the install.
*
* @since 1.2.20
* @return void
*/
function wpsl_install( $network_wide ) {
global $wpdb;
if ( function_exists( 'is_multisite' ) && is_multisite() ) {
if ( $network_wide ) {
$blog_ids = $wpdb->get_col( "SELECT blog_id FROM $wpdb->blogs" );
foreach ( $blog_ids as $blog_id ) {
switch_to_blog( $blog_id );
wpsl_install_data();
}
restore_current_blog();
} else {
wpsl_install_data();
}
} else {
wpsl_install_data();
}
if ( function_exists( 'BorlabsCookieHelper' ) ) {
require_once( 'class-borlabs-cookie.php' );
$borlabs = New WPSL_Borlabs_Cookie();
$borlabs->enable();
}
}
/**
* Install the required data.
*
* @since 1.2.20
* @return void
*/
function wpsl_install_data() {
global $wpsl;
// Register the post type and flush the permalinks.
$wpsl->post_types->register_post_types();
flush_rewrite_rules();
// Create the default settings.
wpsl_set_default_settings();
// Set the correct version.
update_option( 'wpsl_version', WPSL_VERSION_NUM );
// Add user roles.
wpsl_add_roles();
// Add user capabilities.
wpsl_add_caps();
}