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
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
"test": "vendor/bin/phpunit",
"coverage": "@php -d xdebug.mode=coverage vendor/bin/phpunit --coverage-html tests/coverage",
"phpstan": "vendor/bin/phpstan analyze --memory-limit=1G",
"php74": "phpcs -p ./*.php includes/ --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 7.4",
"php82": "phpcs -p ./*.php includes/ --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.2",
"php83": "phpcs -p ./*.php includes/ --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.3",
"php84": "phpcs -p ./*.php includes/ --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 8.4",
"phpcs": "phpcs -p ./*.php includes/ --standard=vendor/phpcompatibility/php-compatibility/PHPCompatibility --runtime-set testVersion 7.4-",
"prepare": "wget -O build/translations.json http://api.wordpress.org/translations/core/1.0/",
"flags-png": "php bin/flags-png.php > assets/flags/flags.php",
"flags-svg": "php bin/flags-svg.php > assets/css-flags/flags.php",
Expand Down
4 changes: 0 additions & 4 deletions includes/ContentImport/ContentImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

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 Expand Up @@ -285,7 +281,7 @@
*
* @param ImportCoordinates $import_coordinates
*/
do_action( self::MSLS_BEFORE_IMPORT_ACTION, $import_coordinates );

Check warning on line 284 in includes/ContentImport/ContentImporter.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_BEFORE_IMPORT_ACTION".

/**
* Filters the data before the import runs.
Expand Down Expand Up @@ -346,7 +342,7 @@
*
* @since TBD
*/
do_action( self::MSLS_AFTER_IMPORT_ACTION, $import_coordinates, $this->logger, $this->relations );

Check warning on line 345 in includes/ContentImport/ContentImporter.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_AFTER_IMPORT_ACTION".

/**
* Filters the data after the import ran.
Expand Down
4 changes: 0 additions & 4 deletions includes/ContentImport/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

namespace lloc\Msls\ContentImport;

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

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

Expand Down
4 changes: 0 additions & 4 deletions includes/MslsAdmin.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

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 @@ -239,7 +235,7 @@
*
* @since 1.0
*/
do_action( self::MSLS_REGISTER_ACTION, __CLASS__ );

Check warning on line 238 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 @@ -338,7 +334,7 @@
*
* @since 2.4.4
*/
do_action( self::MSLS_ACTION_PREFIX . $section, __CLASS__, $section );

Check warning on line 337 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: 0 additions & 4 deletions includes/MslsAdminBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

namespace lloc\Msls;

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

class MslsAdminBar {

/**
Expand Down
6 changes: 1 addition & 5 deletions includes/MslsBlogCollection.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

namespace lloc\Msls;

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

/**
* Collection of blog-objects
*
Expand Down Expand Up @@ -318,7 +314,7 @@

if ( $number !== 1 ) { // Check total users only if not fetching a single user
$user_count = count_users();
if ( isset( $user_count['total_users'] ) && $user_count['total_users'] > $number ) {
if ( $user_count['total_users'] > $number ) {
/* translators: %s: maximum number of users */
$format = __(
'Multisite Language Switcher: The user list has been limited to %d users.',
Expand Down
4 changes: 0 additions & 4 deletions includes/MslsContentFilter.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

namespace lloc\Msls;

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

class MslsContentFilter {

/**
Expand Down
4 changes: 0 additions & 4 deletions includes/MslsCustomColumn.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

namespace lloc\Msls;

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

use lloc\Msls\Component\Component;

/**
Expand Down
4 changes: 0 additions & 4 deletions includes/MslsCustomColumnTaxonomy.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

namespace lloc\Msls;

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

/**
* Handling of existing/not existing translations in the backend
* listings of various taxonomies
Expand Down
4 changes: 0 additions & 4 deletions includes/MslsCustomFilter.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

namespace lloc\Msls;

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

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

Expand Down Expand Up @@ -83,7 +79,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 82 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: 0 additions & 4 deletions includes/MslsMetaBox.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

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: 0 additions & 4 deletions includes/MslsOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

namespace lloc\Msls;

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

use lloc\Msls\Component\Icon\IconPng;

/**
Expand Down
4 changes: 0 additions & 4 deletions includes/MslsOptionsTaxTerm.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

namespace lloc\Msls;

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

/**
* MslsOptionsTaxTerm
*
Expand Down
4 changes: 0 additions & 4 deletions includes/MslsPlugin.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

namespace lloc\Msls;

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

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

Expand Down
4 changes: 0 additions & 4 deletions includes/MslsPostTag.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?php declare( strict_types=1 );

namespace lloc\Msls;

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

use lloc\Msls\Component\Component;

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

do_action( self::MSLS_ADD_INPUT_ACTION, $taxonomy );

Check warning on line 111 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: "self::MSLS_ADD_INPUT_ACTION".
}

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

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

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

Check warning on line 145 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: "self::MSLS_EDIT_INPUT_ACTION".
}

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

declare(strict_types=1);

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

/**
* Deprecated: Get the output for using the links to the translations in your code.
*
Expand Down
Loading
Loading