first commit

This commit is contained in:
2024-11-04 20:48:19 +01:00
commit 2fa33a3be9
7968 changed files with 2313063 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<?php
/**
* Loads the integration with No Category Base.
*
* @package Polylang
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Don't access directly.
};
PLL_Integrations::instance()->no_category_base = new PLL_No_Category_Base();
PLL_Integrations::instance()->no_category_base->init();

View File

@@ -0,0 +1,36 @@
<?php
/**
* @package Polylang
*/
/**
* Manages the compatibility with No Category Base.
* Works for Yoast SEO too.
*
* @since 2.8
*/
class PLL_No_Category_Base {
/**
* Setups actions.
*
* @since 2.8
*/
public function init() {
add_filter( 'get_terms_args', array( $this, 'no_category_base_get_terms_args' ), 5 ); // Before adding our cache domain.
}
/**
* Make sure No category base plugins get all the categories when flushing rules.
*
* @since 2.1
*
* @param array $args WP_Term_Query arguments.
* @return array
*/
public function no_category_base_get_terms_args( $args ) {
if ( doing_filter( 'category_rewrite_rules' ) ) {
$args['lang'] = '';
}
return $args;
}
}