Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions MultisiteLanguageSwitcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
* @package msls
*/

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}
Expand Down
4 changes: 4 additions & 0 deletions includes/ContentImport/ContentImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls\ContentImport;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

use lloc\Msls\ContentImport\Importers\Importer;
use lloc\Msls\ContentImport\Importers\Map;
use lloc\Msls\ContentImport\Importers\WithRequestPostAttributes;
Expand Down
4 changes: 4 additions & 0 deletions includes/ContentImport/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls\ContentImport;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

use lloc\Msls\ContentImport\LogWriters\AdminNoticeLogger;
use lloc\Msls\MslsRegistryInstance;

Expand Down
4 changes: 4 additions & 0 deletions includes/MslsAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

use lloc\Msls\Component\Input\Checkbox;
use lloc\Msls\Component\Input\Group;
use lloc\Msls\Component\Input\Label;
Expand Down Expand Up @@ -235,7 +239,7 @@
*
* @since 1.0
*/
do_action( self::MSLS_REGISTER_ACTION, __CLASS__ );

Check warning on line 242 in includes/MslsAdmin.php

View workflow job for this annotation

GitHub Actions / test

WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_REGISTER_ACTION".
}

/**
Expand Down Expand Up @@ -334,7 +338,7 @@
*
* @since 2.4.4
*/
do_action( self::MSLS_ACTION_PREFIX . $section, __CLASS__, $section );

Check warning on line 341 in includes/MslsAdmin.php

View workflow job for this annotation

GitHub Actions / test

WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "self::MSLS_ACTION_PREFIX . $section".

return count( $map );
}
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsAdminBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

class MslsAdminBar {

/**
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsBlogCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

/**
* Collection of blog-objects
*
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsContentFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

class MslsContentFilter {

/**
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsCustomColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

use lloc\Msls\Component\Component;

/**
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsCustomColumnTaxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

/**
* Handling of existing/not existing translations in the backend
* listings of various taxonomies
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsCustomFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

use lloc\Msls\Component\Input\Select;
use lloc\Msls\Query\TranslatedPostIdQuery;

Expand Down Expand Up @@ -79,7 +83,7 @@
$sql_cache = MslsSqlCacher::create( __CLASS__, __METHOD__ );

// Load post we need to exclude (they already have a translation) from search query.
$query->query_vars['post__not_in'] = ( new TranslatedPostIdQuery( $sql_cache ) )( $blog->get_language() );

Check warning on line 86 in includes/MslsCustomFilter.php

View workflow job for this annotation

GitHub Actions / test

WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_post__not_in

Using exclusionary parameters, like post__not_in, in calls to get_posts() should be done with caution, see https://wpvip.com/documentation/performance-improvements-by-removing-usage-of-post__not_in/ for more information.

return $query;
}
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsMetaBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

use lloc\Msls\Component\Component;
use lloc\Msls\Component\Wrapper;
use lloc\Msls\ContentImport\MetaBox as ContentImportMetaBox;
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

use lloc\Msls\Component\Icon\IconPng;

/**
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsOptionsTaxTerm.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

/**
* MslsOptionsTaxTerm
*
Expand Down
4 changes: 4 additions & 0 deletions includes/MslsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

use lloc\Msls\Query\BlogsInNetworkQuery;
use lloc\Msls\Query\CleanupOptionsQuery;

Expand Down
4 changes: 4 additions & 0 deletions includes/MslsPostTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

namespace lloc\Msls;

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

use lloc\Msls\Component\Component;

/**
Expand Down Expand Up @@ -108,7 +112,7 @@
$this->the_input( null, $title_format, $item_format );
echo '</div>';

do_action( self::MSLS_ADD_INPUT_ACTION, $taxonomy );

Check warning on line 115 in includes/MslsPostTag.php

View workflow job for this annotation

GitHub Actions / test

WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: &quot;self::MSLS_ADD_INPUT_ACTION&quot;.
}

/**
Expand Down Expand Up @@ -142,7 +146,7 @@

$this->the_input( $tag, $title_format, $item_format );

do_action( self::MSLS_EDIT_INPUT_ACTION, $tag, $taxonomy );

Check warning on line 149 in includes/MslsPostTag.php

View workflow job for this annotation

GitHub Actions / test

WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: &quot;self::MSLS_EDIT_INPUT_ACTION&quot;.
}

/**
Expand Down
4 changes: 4 additions & 0 deletions includes/deprectated.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

declare(strict_types=1);

if ( ! defined( 'ABSPATH' ) ) {
exit;
}

/**
* Deprecated: Get the output for using the links to the translations in your code.
*
Expand Down
4 changes: 3 additions & 1 deletion src/msls-widget-block/render.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<?php
<?php if ( ! defined( 'ABSPATH' ) ) {
exit;
}

msls_the_switcher();
Loading