mindkomm/theme-lib-plugin-multilingualpress

Opinionated MultilingualPress optimizations for WordPress themes

1.0.0 2018-02-13 15:36 UTC

This package is auto-updated.

Last update: 2024-11-05 06:25:18 UTC


README

Opinionated MultilingualPress optimizations for WordPress themes.

  • Adds a language switcher widget.
  • Doesn’t add language switcher stylesheets in the frontend.
  • Adds filter to never redirect search engine bots based on their browser language.
  • Removes the «Translation Completed» checkbox when editing a post.

Installation

You can install the package via Composer:

composer require mindkomm/theme-lib-plugin-multilingualpress

Usage

functions.php

$multilingualpress = new Theme\Plugin\Multilingual_Press\Multilingual_Press();
$multilingualpress->init();

Add language switcher

add_filter( 'timber/context', function( $context ) {
    $context['language_switcher'] = Timber::get_widgets( 'language-switcher' );
    
    return $context;
} );

Support

This is a library that we use at MIND to develop WordPress themes. You’re free to use it, but currently, we don’t provide any support.