Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 16
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2/**
3 * Module Name: SEO Tools
4 * Module Description: Optimize titles, meta descriptions, and social previews for better search results.
5 * Sort Order: 35
6 * Recommendation Order: 15
7 * First Introduced: 4.4
8 * Requires Connection: No
9 * Requires User Connection: No
10 * Auto Activate: Yes
11 * Module Tags: Social, Appearance
12 * Feature: Traffic
13 * Additional Search Queries: search engine optimization, social preview, meta description, custom title format, seo, sitemap, open graph, search engine, title tag
14 *
15 * @package automattic/jetpack
16 */
17
18if ( ! defined( 'ABSPATH' ) ) {
19    exit( 0 );
20}
21
22require_once __DIR__ . '/seo-tools/seo-tools-conflicts.php';
23
24if ( jetpack_seo_has_conflicting_plugin() ) {
25    // Also disable default meta tags.
26    add_filter( 'jetpack_seo_meta_tags_enabled', '__return_false' );
27}
28
29// Preserve the general disable switch while deriving plugin conflicts from their own filter.
30add_filter(
31    'jetpack_disable_seo_tools',
32    static function ( $disabled ) {
33        return $disabled || jetpack_seo_has_conflicting_plugin();
34    }
35);
36
37/** This filter is documented in modules/seo-tools/class-jetpack-seo-utils.php */
38if ( ! apply_filters( 'jetpack_disable_seo_tools', false ) ) {
39    require_once __DIR__ . '/seo-tools/class-jetpack-seo.php';
40    new Jetpack_SEO();
41
42    require_once __DIR__ . '/seo-tools/class-jetpack-seo-admin-columns.php';
43    Jetpack_SEO_Admin_Columns::init();
44}