[ 'default' => '', 'required' => true, 'placeholder' => 'eg.: 478dcc2136263f2b3a3726ff', 'name' => 'Trustindex Widget ID', 'help' => null, 'help-icon' => '' ], ]; private $errors = array(); public function __construct() { parent::__construct( 'trustindex_google_widget', 'Review Widgets for Google', [ 'classname' => 'trustindex-widget', 'description' => 'Embed Google reviews fast and easily into your WordPress site. Increase SEO, trust and sales using Google reviews.' ] ); } function widget($args, $instance) { global $wpdb; global $trustindex_pm_google; $pluginManager = 'TrustindexPlugin_google'; $pluginManagerInstance = $trustindex_pm_google; if ($pluginManagerInstance->is_enabled()) { extract($args); echo wp_kses_post($before_widget); $wasError = false; foreach ($this->widget_fields as $fname => $fparams) { if ($fparams['required'] && (!isset($instance[ $fname ]) || $instance[ $fname ] == "")) { $wasError = true; break; } } if (!$wasError && $instance['ti-widget-ID']) { echo wp_kses($pluginManagerInstance->renderWidgetFrontend($instance['ti-widget-ID']), $pluginManager::$allowedAttributesForWidget); } else if ($pluginManagerInstance->is_noreg_linked()) { $html = preg_replace('/]*>.*?<\/style>/is', '', $pluginManagerInstance->renderWidgetFrontend()); echo wp_kses($html, $pluginManager::$allowedAttributesForWidget); if (!is_file($chosedPlatform->getCssFile()) || get_option($chosedPlatform->get_option_name('load-css-inline'), 0)) { // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped echo ''; } } else { /* translators: %s: URL */ echo wp_kses_post($pluginManagerInstance->frontEndErrorForAdmins(sprintf(__("Please fill out all the required fields in the widget settings page", 'wp-reviews-plugin-for-google'), admin_url('admin.php?page='.$pluginManagerInstance->get_plugin_slug().'/settings.php')))); } echo wp_kses_post($after_widget); } else { } } function form($instance) { global $wp_version; global $trustindex_pm_google; $pluginManager = 'TrustindexPlugin_google'; $pluginManagerInstance = $trustindex_pm_google; $tiWidgets = $pluginManagerInstance->get_trustindex_widgets(); $selectedWidgetId = isset($instance['ti-widget-ID']) ? esc_attr($instance['ti-widget-ID']) : $this->widget_fields['ti-widget-ID']['default']; ?>
is_trustindex_connected()): ?>

:


". esc_html(__("Let's go, create amazing widgets for free!", 'wp-reviews-plugin-for-google'))."" )); ?> widget_fields as $fname => $fparams): ?>
required="required" />

Check our portal, list your widgets and find IDs in the first colums.

ID column here: <?php echo esc_url('https://admin.trustindex.io/'); ?>widget
' /* translators: %s: URL */ . wp_kses_post(sprintf(__("Go to plugin setup page to complete the one-step setup guide and enjoy the full functionalization!", 'wp-reviews-plugin-for-google'), admin_url('admin.php?page='.$pluginManagerInstance->get_plugin_slug().'/settings.php&tab=setup_trustindex'))) )); ?>