feat: initial ACRIB WordPress deployment
- WordPress 6.9.4 (es_ES) with Kadence theme - Homepage: Hero, La Asociación, Pilares, Beneficios, Eventos, Miembros, Hazte Miembro, Contacto - Brand identity: #13294b navy, #a12932 burgundy, #c69c48 gold - Fonts: Raleway (headings) + Source Sans 3 (body) + Lato (UI) - Plugins: Kadence Blocks, Polylang, Contact Form 7 - Custom CSS with full brand styling and responsive layout - HTTPS enforced via wp-config.php proxy detection
This commit is contained in:
39
wp-content/plugins/polylang/src/Model/Hide_Default.php
Normal file
39
wp-content/plugins/polylang/src/Model/Hide_Default.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Polylang
|
||||
*/
|
||||
|
||||
namespace WP_Syntex\Polylang\Model;
|
||||
|
||||
/**
|
||||
* Class to filter the list of languages to only include non-default languages.
|
||||
*/
|
||||
class Hide_Default implements Languages_Proxy_Interface {
|
||||
/**
|
||||
* Returns the proxy's key.
|
||||
*
|
||||
* @since 3.8
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function key(): string {
|
||||
return 'hide_default';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of non-default languages after passing it through this proxy.
|
||||
*
|
||||
* @since 3.8
|
||||
*
|
||||
* @param \PLL_Language[] $languages List of languages to filter.
|
||||
* @return \PLL_Language[]
|
||||
*/
|
||||
public function filter( array $languages ): array {
|
||||
return array_filter(
|
||||
$languages,
|
||||
static function ( $lang ) {
|
||||
return ! $lang->is_default;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
39
wp-content/plugins/polylang/src/Model/Hide_Empty.php
Normal file
39
wp-content/plugins/polylang/src/Model/Hide_Empty.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Polylang
|
||||
*/
|
||||
|
||||
namespace WP_Syntex\Polylang\Model;
|
||||
|
||||
/**
|
||||
* Class to filter the list of languages to only include non-empty languages.
|
||||
*/
|
||||
class Hide_Empty implements Languages_Proxy_Interface {
|
||||
/**
|
||||
* Returns the proxy's key.
|
||||
*
|
||||
* @since 3.8
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function key(): string {
|
||||
return 'hide_empty';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of non-empty languages after passing it through this proxy.
|
||||
*
|
||||
* @since 3.8
|
||||
*
|
||||
* @param \PLL_Language[] $languages List of languages to filter.
|
||||
* @return \PLL_Language[] Filtered languages.
|
||||
*/
|
||||
public function filter( array $languages ): array {
|
||||
return array_filter(
|
||||
$languages,
|
||||
static function ( $lang ) {
|
||||
return $lang->get_tax_prop( 'language', 'count' ) > 0;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
1396
wp-content/plugins/polylang/src/Model/Languages.php
Normal file
1396
wp-content/plugins/polylang/src/Model/Languages.php
Normal file
File diff suppressed because it is too large
Load Diff
88
wp-content/plugins/polylang/src/Model/Languages_Proxies.php
Normal file
88
wp-content/plugins/polylang/src/Model/Languages_Proxies.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Polylang
|
||||
*/
|
||||
|
||||
namespace WP_Syntex\Polylang\Model;
|
||||
|
||||
use PLL_Language;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/**
|
||||
* Class allowing to chain language proxies.
|
||||
*
|
||||
* @since 3.8
|
||||
*/
|
||||
class Languages_Proxies {
|
||||
/**
|
||||
* @var Languages
|
||||
*/
|
||||
protected $languages;
|
||||
|
||||
/**
|
||||
* @var Languages_Proxy_Interface[]
|
||||
*
|
||||
* @phpstan-var array<non-falsy-string, Languages_Proxy_Interface>
|
||||
*/
|
||||
private $proxies = array();
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
protected $stack = array();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.8
|
||||
*
|
||||
* @param Languages $languages Languages' model.
|
||||
* @param array $proxies List of registered proxies.
|
||||
* @param string $parent Key of the first item of the proxies stack to traverse.
|
||||
*/
|
||||
public function __construct( Languages $languages, array $proxies, string $parent ) {
|
||||
$this->languages = $languages;
|
||||
$this->proxies = $proxies;
|
||||
$this->stack[] = $parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the list of available languages after passing it through proxies.
|
||||
*
|
||||
* @since 3.8
|
||||
*
|
||||
* @param array $args Optional arguments to pass to `Languages::get_list()`.
|
||||
* @return array List of `PLL_Language` objects or `PLL_Language` object properties.
|
||||
*/
|
||||
public function get_list( array $args = array() ): array {
|
||||
$all_args = $args;
|
||||
unset( $args['fields'] );
|
||||
|
||||
$languages = $this->languages->get_list( $args );
|
||||
|
||||
foreach ( $this->stack as $key ) {
|
||||
if ( ! isset( $this->proxies[ $key ] ) ) {
|
||||
continue;
|
||||
}
|
||||
$languages = $this->proxies[ $key ]->filter( $languages );
|
||||
}
|
||||
|
||||
$languages = array_values( $languages ); // Re-index.
|
||||
|
||||
return $this->languages->maybe_convert_list( $languages, $all_args );
|
||||
}
|
||||
|
||||
/**
|
||||
* Stacks a proxy that will filter the list of languages.
|
||||
*
|
||||
* @since 3.8
|
||||
*
|
||||
* @param string $key Proxy's key.
|
||||
* @return Languages_Proxies
|
||||
*/
|
||||
public function filter( string $key ): Languages_Proxies {
|
||||
$this->stack[] = $key;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Polylang
|
||||
*/
|
||||
|
||||
namespace WP_Syntex\Polylang\Model;
|
||||
|
||||
use PLL_Language;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/**
|
||||
* Interface allowing to proxy the list of languages.
|
||||
*
|
||||
* @since 3.8
|
||||
*/
|
||||
interface Languages_Proxy_Interface {
|
||||
/**
|
||||
* Returns the proxy's key.
|
||||
*
|
||||
* @since 3.8
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @phpstan-return non-falsy-string
|
||||
*/
|
||||
public function key(): string;
|
||||
|
||||
/**
|
||||
* Returns the list of available languages after passing it through this proxy.
|
||||
*
|
||||
* @since 3.8
|
||||
*
|
||||
* @param PLL_Language[] $languages List of languages to filter.
|
||||
* @return PLL_Language[]
|
||||
*/
|
||||
public function filter( array $languages ): array;
|
||||
}
|
||||
69
wp-content/plugins/polylang/src/Model/Post_Types.php
Normal file
69
wp-content/plugins/polylang/src/Model/Post_Types.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Polylang
|
||||
*/
|
||||
|
||||
namespace WP_Syntex\Polylang\Model;
|
||||
|
||||
use PLL_Translated_Post;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/**
|
||||
* Model for post types translated by Polylang.
|
||||
*
|
||||
* @since 3.7
|
||||
*/
|
||||
class Post_Types {
|
||||
/**
|
||||
* Translated post model.
|
||||
*
|
||||
* @var PLL_Translated_Post
|
||||
*/
|
||||
public $translated_object;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.7
|
||||
*
|
||||
* @param PLL_Translated_Post $translated_object Posts model.
|
||||
*/
|
||||
public function __construct( PLL_Translated_Post $translated_object ) {
|
||||
$this->translated_object = $translated_object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns post types that need to be translated.
|
||||
* The post types list is cached for better better performance.
|
||||
* The method waits for 'after_setup_theme' to apply the cache
|
||||
* to allow themes adding the filter in functions.php.
|
||||
*
|
||||
* @since 1.2
|
||||
* @since 3.7 Moved from `PLL_Model::get_translated_post_types()` to `WP_Syntex\Polylang\Model\Taxonomies::get_translated()`.
|
||||
*
|
||||
* @param bool $filter True if we should return only valid registered post types.
|
||||
* @return string[] Post type names for which Polylang manages languages and translations.
|
||||
*/
|
||||
public function get_translated( $filter = true ): array {
|
||||
return $this->translated_object->get_translated_object_types( $filter );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if Polylang manages languages and translations for this post type.
|
||||
*
|
||||
* @since 1.2
|
||||
* @since 3.7 Moved from `PLL_Model::is_translated_post_type()` to `WP_Syntex\Polylang\Model\Taxonomies::is_translated()`.
|
||||
*
|
||||
* @param string|string[] $post_type Post type name or array of post type names.
|
||||
* @return bool
|
||||
*/
|
||||
public function is_translated( $post_type ): bool {
|
||||
if ( empty( array_filter( (array) $post_type ) ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/** @phpstan-var non-empty-array<non-empty-string>|non-empty-string $post_type */
|
||||
return $this->translated_object->is_translated_object_type( $post_type );
|
||||
}
|
||||
}
|
||||
135
wp-content/plugins/polylang/src/Model/Taxonomies.php
Normal file
135
wp-content/plugins/polylang/src/Model/Taxonomies.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Polylang
|
||||
*/
|
||||
|
||||
namespace WP_Syntex\Polylang\Model;
|
||||
|
||||
use PLL_Translated_Term;
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
/**
|
||||
* Model for taxonomies filtered/translated by Polylang.
|
||||
*
|
||||
* @since 3.7
|
||||
*/
|
||||
class Taxonomies {
|
||||
/**
|
||||
* Translated term model.
|
||||
*
|
||||
* @var PLL_Translated_Term
|
||||
*/
|
||||
public $translated_object;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @since 3.7
|
||||
*
|
||||
* @param PLL_Translated_Term $translated_object Terms model.
|
||||
*/
|
||||
public function __construct( PLL_Translated_Term $translated_object ) {
|
||||
$this->translated_object = $translated_object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns taxonomies that need to be translated.
|
||||
* The taxonomies list is cached for better better performance.
|
||||
* The method waits for 'after_setup_theme' to apply the cache
|
||||
* to allow themes adding the filter in functions.php.
|
||||
*
|
||||
* @since 1.2
|
||||
* @since 3.7 Moved from `PLL_Model::get_translated_taxonomies()` to `WP_Syntex\Polylang\Model\Taxonomies::get_translated()`.
|
||||
*
|
||||
* @param bool $filter True if we should return only valid registered taxonomies.
|
||||
* @return string[] Array of registered taxonomy names for which Polylang manages languages and translations.
|
||||
*/
|
||||
public function get_translated( $filter = true ): array {
|
||||
return $this->translated_object->get_translated_object_types( $filter );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if Polylang manages languages and translations for this taxonomy.
|
||||
*
|
||||
* @since 1.2
|
||||
* @since 3.7 Moved from `PLL_Model::is_translated_taxonomy()` to `WP_Syntex\Polylang\Model\Taxonomies::is_translated()`.
|
||||
*
|
||||
* @param string|string[] $tax Taxonomy name or array of taxonomy names.
|
||||
* @return bool
|
||||
*/
|
||||
public function is_translated( $tax ): bool {
|
||||
if ( empty( array_filter( (array) $tax ) ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return $this->translated_object->is_translated_object_type( $tax );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return taxonomies that need to be filtered (post_format like).
|
||||
*
|
||||
* @since 1.7
|
||||
* @since 3.7 Moved from `PLL_Model::get_filtered_taxonomies()` to `WP_Syntex\Polylang\Model\Taxonomies::get_filtered()`.
|
||||
*
|
||||
* @param bool $filter True if we should return only valid registered taxonomies.
|
||||
* @return string[] Array of registered taxonomy names.
|
||||
*/
|
||||
public function get_filtered( $filter = true ): array {
|
||||
if ( did_action( 'after_setup_theme' ) ) {
|
||||
static $taxonomies = null;
|
||||
}
|
||||
|
||||
if ( empty( $taxonomies ) ) {
|
||||
$taxonomies = array( 'post_format' => 'post_format' );
|
||||
|
||||
/**
|
||||
* Filters the list of taxonomies not translatable but filtered by language.
|
||||
* Includes only the post format by default
|
||||
* The filter must be added soon in the WordPress loading process:
|
||||
* in a function hooked to ‘plugins_loaded’ or directly in functions.php for themes.
|
||||
*
|
||||
* @since 1.7
|
||||
*
|
||||
* @param string[] $taxonomies List of taxonomy names.
|
||||
* @param bool $is_settings True when displaying the list of custom taxonomies in Polylang settings.
|
||||
*/
|
||||
$taxonomies = apply_filters( 'pll_filtered_taxonomies', $taxonomies, false );
|
||||
}
|
||||
|
||||
return $filter ? array_intersect( $taxonomies, get_taxonomies() ) : $taxonomies;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if Polylang filters this taxonomy per language.
|
||||
*
|
||||
* @since 1.7
|
||||
* @since 3.7 Moved from `PLL_Model::is_filtered_taxonomy()` to `WP_Syntex\Polylang\Model\Taxonomies::is_filtered()`.
|
||||
*
|
||||
* @param string|string[] $tax Taxonomy name or array of taxonomy names.
|
||||
* @return bool
|
||||
*/
|
||||
public function is_filtered( $tax ): bool {
|
||||
$taxonomies = $this->get_filtered( false );
|
||||
return ( is_array( $tax ) && array_intersect( $tax, $taxonomies ) ) || in_array( $tax, $taxonomies );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the query vars of all filtered taxonomies.
|
||||
*
|
||||
* @since 1.7
|
||||
* @since 3.7 Moved from `PLL_Model::get_filtered_taxonomies_query_vars()` to `WP_Syntex\Polylang\Model\Taxonomies::get_filtered_query_vars()`.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function get_filtered_query_vars(): array {
|
||||
$query_vars = array();
|
||||
foreach ( $this->get_filtered() as $filtered_tax ) {
|
||||
$tax = get_taxonomy( $filtered_tax );
|
||||
if ( ! empty( $tax ) && is_string( $tax->query_var ) ) {
|
||||
$query_vars[] = $tax->query_var;
|
||||
}
|
||||
}
|
||||
return $query_vars;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user