-
Notifications
You must be signed in to change notification settings - Fork 4
/
voice-search.php
64 lines (57 loc) · 2.03 KB
/
voice-search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* Main plugin file.
*
* @package VoiceSearch
*
* Plugin Name: Voice Search
* Plugin URI: https://github.com/swissspidy/voice-search
* Description: Allows visitors using Google Chrome to search the site using their voice.
* Version: 1.4.0
* Author: Pascal Birchler
* Author URI: https://pascalbirchler.com
* License: GPLv2+
* Text Domain: voice-search
* Requires at least: 5.0
* Requires PHP: 7.4
*/
/**
* Copyright (c) 2018 Pascal Birchler (swissspidy@chat.wordpress.org)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2 or, at
* your discretion, any later version, as published by the Free
* Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
defined( 'WPINC' ) or die;
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}
$voice_search_requirements_check = new WP_Requirements_Check(
array(
'title' => __( 'Voice Search', 'voice-search' ),
'php' => '7.4',
'wp' => '5.0',
'file' => __FILE__,
'i18n' => array(
/* translators: 1: plugin name. 2: minimum PHP version. */
'php' => __( '“%1$s” requires PHP %2$s or higher. Please upgrade.', 'voice-search' ),
/* translators: 1: plugin name. 2: minimum WordPress version. */
'wp' => __( '“%1$s” requires WordPress %2$s or higher. Please upgrade.', 'voice-search' ),
),
)
);
if ( $voice_search_requirements_check->passes() ) {
require_once __DIR__ . '/inc/namespace.php';
VoiceSearch\bootstrap();
}
unset( $voice_search_requirements_check );