fethienv
Forum Replies Created
-
I have another request, can you integrate TeraWallet (https://ww.wp.xz.cn/plugins/woo-wallet/) with memberships plugin, because it work with wcfm marketplace and dosn’t work with wcfm memberships plugin
Hi!
Thanks for your reply
Concerning this
templates/vendor_membership.php
I have adopted this method in order let modifications work if there are updates in our theme or in your plugin
$custom_color_data = apply_filters( ‘wcfm_add_membership_custom_css’,$custom_color_data);
I add custom CSS to use them in plans customizationsForum: Plugins
In reply to: [AWS for WordPress] [Problem] All wp-admin Pages resreshHi
the problem is in this funcion
public function get_stack_state()
excactly in
wp_send_json_success(get_option('amazon_stack_state'));and “amazon_stack_state” is null in database
How can I slove that?
I added:
add_shortcode( 'wp_translate', array( $this,'WP_Translate_shortcode') ); add_shortcode( 'wpm_translate', array( $this,'wpm_translate_string_shortcode' ));in
public function __construct()and these 2 functions
/** * Language get translate string form default language * * @param $atts string * @param $content string * * @return string */ public function WP_Translate_shortcode( $atts, $content = null ) { extract(shortcode_atts( array( 'domain' => 'default', ), $atts )); return __($content,$domain); //return esc_html(wpm_translate_string($content)); } /** * wpm_translate_string shortcode * * @param $atts * * @return string */ public function wpm_translate_string_shortcode( $atts, $content = null ) { extract(shortcode_atts( array( 'domain' => 'default', ), $atts )); return wpm_translate_string($content); }Hi
Just replace the content of this file in WP Multilang
includes/class-wpm-shortcodes.phpHow to use:
1- get translation from default language
[wp_translate domain=”woovina”]Subscribe[/wp_translate]
2- shortcode to use plugin translation features
[wpm_translate][:ar]آخر التدوينات[:en]LATEST BLOG POST[:fr]DERNIERS ARTICLES DE BLOG[:][/wpm_translate]Full code
<?php namespace WPM\Includes; if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } /** * ShortCodes * * Class WPM_Shortcodes * @package WPM\Includes */ class WPM_Shortcodes { /** * WPM_Shortcodes constructor. */ public function __construct() { add_shortcode( 'wpm_lang_switcher', array( $this, 'language_switcher' ) ); add_shortcode( 'wp_translate', array( $this,'WP_Translate_shortcode') ); add_shortcode( 'wpm_translate', array( $this,'wpm_translate_string_shortcode' )); } /** * Language switcher html * * @param $atts * * @return string */ public function language_switcher( $atts ) { $atts = shortcode_atts( array( 'type' => 'list', 'show' => 'both' ), $atts ); return wpm_get_language_switcher( $atts['type'], $atts['show'] ); } /** * Language get translate string form default language * * @param $atts * * @return string */ public function WP_Translate_shortcode( $atts, $content = null ) { extract(shortcode_atts( array( 'domain' => 'default', ), $atts )); return __($content,$domain); //return esc_html(wpm_translate_string($content)); } /** * wpm_translate_string bu shortcode * * @param $atts * * @return string */ public function wpm_translate_string_shortcode( $atts, $content = null ) { extract(shortcode_atts( array( 'domain' => 'default', ), $atts )); return wpm_translate_string($content); } }