Browse
For agents
About
WP Map Block – Google Maps, OpenStreetMap, Mapbox, Store & Shop Locator, Directory, Listings & Filters
/
2.0.2
WP Map Block – Google Maps, OpenStreetMap, Mapbox, Store & Shop Locator, Directory, Listings & Filters
v2.0.2
Switch version
trunk
2.0.1
2.0.2
2.0.3
2.0.4
3.0.0
Overview
Code
wp-map-block
/
includes
/
Migration.php
Migration.php
in WP Map Block – Google Maps, OpenStreetMap, Mapbox, Store & Shop Locator, Directory, Listings & Filters 2.0.2, at includes/Migration.php
21 lines
542 B
Find file
t
No matching file
Up and down to move
Enter to open
Esc to close
Raw
Download
Zip
View raw
1
<
?
php
2
namespace
WPMapBlock
;
3
4
class
Migration
5
{
6
public
static
function
init
(
)
7
{
8
$
self
=
new
self
(
)
;
9
$
self
->
run_migration
(
)
;
10
}
11
public
function
run_migration
(
)
12
{
13
if
(
get_option
(
'
wp_map_block_version
'
)
!=
WPMAPBLOCK_VERSION
)
{
14
update_option
(
'
wp_map_block_version
'
,
WPMAPBLOCK_VERSION
)
;
15
}
16
if
(
!
get_option
(
'
wp_map_block_first_install_time
'
)
)
{
17
add_option
(
'
wp_map_block_first_install_time
'
,
time
(
)
+
(
get_option
(
'
gmt_offset
'
)
*
HOUR_IN_SECONDS
)
)
;
18
}
19
}
20
}
21