Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thanks for all 3sons.

    This plugin works on WP multisite. You can configure from wp-config.php using constants. You can read more in the readme.txt of plugin.

    The problem was because there were transient records in the table wp_options “_transient_wc_attribute_taxonomies” that kept a list of the attributes (also olders). I’ve deleted these transient records and now everything is fine.

    Thanks @dinamiko

    I did it! I have already added to the menu the links to change the language; furthermore, the link of the WooCommerce store is correct now.

    
    /*
     * Add links to the menus
     **/
    
    function agm_add_links_menu_mlp4sf ($items, $args) {
    
    	$langs = mlp_custom_get_language_items();
    
        if ( $args->theme_location == 'primary' || $args->theme_location == 'handheld' )
        {
            foreach ( $langs as $site_id => $lang )
            {
    			if ( ! $lang['active'] ) $items .= '<li class="menu-item-language lang-' . $site_id . '"><a rel="alternate" hreflang="' . $lang['code'] . '" href="' . $lang['url'] . '">' . $lang['name'] . '</a></li>';
    		}
        }
    
        return $items;
    }
    
    /**
     * Get language items.
     *
     * @return array|void
     */
    function mlp_custom_get_language_items() {
    
    	$api = apply_filters( 'mlp_language_api', NULL );
    	if ( ! is_a( $api, 'Mlp_Language_Api_Interface' ) ) {
    		return;
    	}
    
    	/**
    	 * @type int    $site_id      Base site
    	 * @type int    $content_id   post or term_taxonomy ID, *not* term ID
    	 * @type string $type         @see Mlp_Language_Api::get_request_type()
    	 * @type bool   $strict       When TRUE (default) only matching exact
    	 *                                 translations will be included
    	 * @type string $search_term  If you want to translate a search
    	 * @type string $post_type    For post type archives
    	 * @type bool   $include_base Include the base site in returned list
    	 */
    	$translations_args = array(
    		'strict'       => FALSE,
    		'include_base' => TRUE,
    	);
    	$translations      = $api->get_translations( $translations_args );
    	if ( empty( $translations ) ) {
    		return;
    	}
    
    	$items = array();
    	/** @var Mlp_Translation_Interface $translation */
    	foreach ( $translations as $site_id => $translation ) {
    
    		if ( is_shop() ) $url = get_blog_permalink( $site_id, get_blog_option( $site_id, "woocommerce_shop_page_id", 0 ) );
    		else $url = $translation->get_remote_url();
    		
    		if ( empty( $url ) ) {
    			continue;
    		}
    
    		$language = $translation->get_language();
    		$active   = FALSE;
    		if ( get_current_blog_id() === $site_id ) {
    			$active = TRUE;
    		}
    
    		/**
    		* Get different possible language names
    		*
    		* @param  string $name Possible values:
    		*                      - 'native' (default) ex: Deutsch for German
    		*                      - 'english' English name of the language
    		*                      - 'http' ex: 'de-AT'
    		*                      - 'language_long' alias for 'http'.
    		*                      - 'language_short' first part of 'http', ex: 'de' in 'de-AT'
    		*                      - 'lang' alias for 'language_short'
    		*                      - 'wp_locale' Identifier for translation files used by WordPress
    		*                      - 'custom' Language name set in the site preferences
    		*                      - 'text' alias for 'custom'
    		* @return string
    		*/
    
    		$items[ $site_id ] = array(
    			'url'    => $url,
    			'code'   => $language->get_name( 'http' ),
    			'name'   => $language->get_name( 'language_short' ),
    			'active' => $active,
    		);
    	}
    
    	return $items;
    } 
    
    /**
     * Hook to add the language links in the menus
     **/
    add_action( 'mlp_and_wp_loaded', function() {
    	add_filter('wp_nav_menu_items', 'agm_add_links_menu_mlp4sf', 10, 2);
    });
    

    However, I see that the tags that the plugin includes in the <header> are incorrect. How could I correct it?

    Now it’s:

    
    <link rel="alternate" hreflang="es-EN" href="https://www.tvplay.es/products/">
    <link rel="alternate" hreflang="en-US" href="https://www.playoutautomationsoftware.com/products/">
    

    But it should be:

    
    <link rel="alternate" hreflang="es-EN" href="https://www.tvplay.es/venta-de-software-de-automatizacion-tv/">
    <link rel="alternate" hreflang="en-US" href="https://www.playoutautomationsoftware.com/products/">
    

    Thanks 4 all!

    The problem are at file wp-content/plugins/dynamic-to-top/inc/cssmin-v3.0.1.php. It’s because clone is a keyword, not a function, therefore:

    clone( $date ) ❌
    clone $date 💚

    It’s easy solve this error.

    In line 3346 you must change:
    $source[] = clone($tokens[$iii]);
    by:
    $source[] = clone $tokens[$iii];

    In line 3353 you must change:
    $t[] = clone($token);
    by:
    $t[] = clone $token;

    Let’s hope the author solves this problem soon.

    Hello!

    Thanks, I didn’t know the utility of “priority” field. Now it’s all fine.

    Thanks 😉

    Tienes toda la razón con el tema de la donación Javier.

    Hemos hecho una pequeña aportación, no es grande pero si todos hiciésemos lo mismo… colaborar en la comunidad se haría más agradable 😉

    Enhorabuena por el plugin. Quedamos a la espera de la actualización y si necesitáis ayuda cuenta conmigo.

    That’s right @joshkho, you’re absolutely reason.

    I hope that you soon upgrade the plugin with solving this problem.

    I hope that you soon upgrade the plugin including open single images with photoswipe. Thanks and congratulations for your plugin.

    Thanks Jeff.

    Today i’ve updated to version 6.3.12 of TML and now all it’s OK.

    I suppose that error was solved by “Fix SSL admin JS”

    Thaks4all.

    Thanks!!! all it’s right now!

Viewing 12 replies - 1 through 12 (of 12 total)