geno/wp-content/plugins/mailpoet/lib/WP/Posts.php
2024-02-01 11:54:18 +00:00

18 lines
485 B
PHP

<?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing
namespace MailPoet\WP;
if (!defined('ABSPATH')) exit;
use MailPoet\WP\Functions as WPFunctions;
class Posts {
public static function getTypes($args = [], $output = 'names', $operator = 'and') {
$defaults = [
'exclude_from_search' => false,
];
$args = array_merge($defaults, $args);
return WPFunctions::get()->getPostTypes($args, $output, $operator);
}
}