<p><?php<br />
/**<br />
* Plugin main file.<br />
*<br />
* @package Google\Site_Kit<br />
* @copyright 2021 Google LLC<br />
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0<br />
* @link https://sitekit.withgoogle.com<br />
*<br />
* @wordpress-plugin<br />
* Plugin Name: Site Kit by Google<br />
* Plugin URI: https://sitekit.withgoogle.com<br />
* Description: Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.<br />
* Version: 1.144.0<br />
* Requires at least: 5.2<br />
* Requires PHP: 7.4<br />
* Author: Google<br />
* Author URI: https://opensource.google.com<br />
* License: Apache License 2.0<br />
* License URI: https://www.apache.org/licenses/LICENSE-2.0<br />
* Text Domain: google-site-kit<br />
*/</p>
<p>if ( ! defined( 'ABSPATH' ) ) {<br />
exit; // Exit if accessed directly.<br />
}</p>
<p>// Define most essential constants.<br />
define( 'GOOGLESITEKIT_VERSION', '1.144.0' );<br />
define( 'GOOGLESITEKIT_PLUGIN_MAIN_FILE', __FILE__ );<br />
define( 'GOOGLESITEKIT_PHP_MINIMUM', '7.4.0' );<br />
define( 'GOOGLESITEKIT_WP_MINIMUM', '5.2.0' );</p>
<p>/**<br />
* Handles plugin activation.<br />
*<br />
* Throws an error if the plugin is activated with an insufficient version of PHP.<br />
*<br />
* @since 1.0.0<br />
* @since 1.3.0 Minimum required version of PHP raised to 5.6<br />
* @since 1.125.0 Minimum required version of PHP raised to 7.4<br />
* @access private<br />
*<br />
* @param bool $network_wide Whether to activate network-wide.<br />
*/<br />
function googlesitekit_activate_plugin( $network_wide ) {<br />
if ( version_compare( PHP_VERSION, GOOGLESITEKIT_PHP_MINIMUM, '<' ) ) {<br />
wp_die(<br />
/* translators: %s: version number */<br />
esc_html( sprintf( __( 'Site Kit requires PHP version %s or higher', 'google-site-kit' ), GOOGLESITEKIT_PHP_MINIMUM ) ),<br />
esc_html__( 'Error Activating', 'google-site-kit' )<br />
);<br />
}</p>
<p> if ( version_compare( get_bloginfo( 'version' ), GOOGLESITEKIT_WP_MINIMUM, '<' ) ) {<br />
wp_die(<br />
/* translators: %s: version number */<br />
esc_html( sprintf( __( 'Site Kit requires WordPress version %s or higher', 'google-site-kit' ), GOOGLESITEKIT_WP_MINIMUM ) ),<br />
esc_html__( 'Error Activating', 'google-site-kit' )<br />
);<br />
}</p>
<p> if ( $network_wide ) {<br />
return;<br />
}</p>
<p> do_action( 'googlesitekit_activation', $network_wide );<br />
}<br />
register_activation_hook( __FILE__, 'googlesitekit_activate_plugin' );</p>
<p>/**<br />
* Handles plugin deactivation.<br />
*<br />
* @since 1.0.0<br />
* @access private<br />
*<br />
* @param bool $network_wide Whether to deactivate network-wide.<br />
*/<br />
function googlesitekit_deactivate_plugin( $network_wide ) {<br />
if ( version_compare( PHP_VERSION, GOOGLESITEKIT_PHP_MINIMUM, '<' ) ) {<br />
return;<br />
}</p>
<p> if ( $network_wide ) {<br />
return;<br />
}</p>
<p> do_action( 'googlesitekit_deactivation', $network_wide );<br />
}<br />
register_deactivation_hook( __FILE__, 'googlesitekit_deactivate_plugin' );</p>
<p>/**<br />
* Resets opcache if possible.<br />
*<br />
* @since 1.3.0<br />
* @access private<br />
*/<br />
function googlesitekit_opcache_reset() {<br />
if ( version_compare( PHP_VERSION, GOOGLESITEKIT_PHP_MINIMUM, '=’ ) &&<br />
version_compare( get_bloginfo( ‘version’ ), GOOGLESITEKIT_WP_MINIMUM, ‘>=’ )<br />
) {<br />
require_once plugin_dir_path( __FILE__ ) . ‘includes/loader.php’;<br />
}</p>
<!– wp:details –>
<details class=”wp-block-details”><summary></summary><!– wp:paragraph {“placeholder”:”Type / to add a hidden block”} –>
<p></p>
<!– /wp:paragraph –></details>
<!– /wp:details –>
Yorum bırakın