Render widget content
767142
function render_dashboard_widget() {
		$this->setup_feeds();
		if ( empty( $this->items ) || ! is_array( $this->items ) ) {
			return;
		}
		?>
		<style type="text/css">
			#themeisle ul li.ti-dw-recommend-item {
				padding-left: 7px;
				border-top: 1px solid #eee;
				margin-bottom: 0px;
				padding-top: 6px;
			}

			#themeisle h2.hndle {
				background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3Ny4xMiA3Ny4xMiI+PHRpdGxlPkFzc2V0IDM8L3RpdGxlPjxwYXRoIGQ9Ik03NS43Niw0Ny42cS0xLjUsNi40Ni00LjA3LDkuMjZBMzYuMjIsMzYuMjIsMCwwLDEsNjMuMjYsNjNhNTEsNTEsMCwwLDEtOS43OSw0LjZoLS4xNXY0LjgyQTQuNjYsNC42NiwwLDAsMSw1Miw3NS43Niw0LjA3LDQuMDcsMCwwLDEsNDksNzcuMTJhNCw0LDAsMCwxLTIuMTgtLjYxQTQuOTQsNC45NCwwLDAsMSw0NS4xOSw3NWE0LjQyLDQuNDIsMCwwLDEtNy41NCwwLDQuOTQsNC45NCwwLDAsMS0xLjU4LDEuNSwzLjc1LDMuNzUsMCwwLDEtMiwuNjFBNC4yNyw0LjI3LDAsMCwxLDMwLjI3LDc1YTQuOTQsNC45NCwwLDAsMS0xLjU4LDEuNSw0LDQsMCwwLDEtMi4xOC42MSwzLjkzLDMuOTMsMCwwLDEtMy4xNi0xLjQzLDUuMyw1LjMsMCwwLDEtMS4yMS0zLjU0LDEzLjgxLDEzLjgxLDAsMCwxLTguNTgsMywxMy4yMywxMy4yMywwLDAsMS05LTMuNDdBMTguMjEsMTguMjEsMCwwLDAsOSw3MC43OWExNC4yNiwxNC4yNiwwLDAsMS03LjgzLTUuNDIsMTYuMTIsMTYuMTIsMCwwLDAsNS4xOS4wNywxMi44OSwxMi44OSwwLDAsMCw0LjktMS43M1EzLjE1LDU1LjQzLDEuMDUs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My4wNiwwLDAsMC0uOSwyLjI2djQuODJhMy4zMiwzLjMyLDAsMCwwLC45LDIuMzMsMi44NCwyLjg0LDAsMCwwLDIuMTksMSwyLjYxLDIuNjEsMCwwLDAsMi4xLTEsMy40NSwzLjQ1LDAsMCwwLC44My0yLjMzVjY3LjYzQTMuMTcsMy4xNywwLDAsMCw0My42LDY1LjM3Wm03LjQ2LDBhMywzLDAsMCwwLTIuMTgtLjksMi43MywyLjczLDAsMCwwLTIuMTEuOSwzLjE3LDMuMTcsMCwwLDAtLjgzLDIuMjZ2NC44MmEzLjQ1LDMuNDUsMCwwLDAsLjgzLDIuMzMsMi42MSwyLjYxLDAsMCwwLDIuMTEsMSwyLjgzLDIuODMsMCwwLDAsMi4xOC0xLDMuMzIsMy4zMiwwLDAsMCwuOS0yLjMzVjY3LjYzQTMuMDYsMy4wNiwwLDAsMCw1MS4wNiw2NS4zN1oiLz48L3N2Zz4=');
				background-repeat: no-repeat;
				background-position: 92% 50%;
				background-size: 30px;
			}

			#themeisle .inside {
				padding: 0;
			}

			.ti-feed-list {
				padding: 0 12px 5px;
				margin-bottom: 10px;
				border-bottom: 1px solid #eee;
			}

			.ti-dw-feed-item a {
				display: flex;
				align-items: center;
				margin-bottom: 5px;
				padding: 5px;
				transition: .2s ease;
				border-radius: 3px;
			}

			.ti-dw-feed-item a:hover {
				background-color: #f8f8f8;
			}

			.ti-dw-feed-item a:hover .ti-dw-date-container {
				opacity: .9;
			}

			.ti-dw-feed-item .ti-dw-month-container {
				margin-top: -5px;
				text-transform: uppercase;
				font-size: 10px;
				letter-spacing: 1px;
				font-weight: 700;
			}

			.ti-dw-feed-item .ti-dw-date-container {
				border-radius: 3px;
				transition: .2s ease;
				min-height: 35px;
				margin-right: 5px;
				min-width: 35px;
				text-align: center;
				border: 1px solid #2a6f97;
				color: #fff;
				background: #2ea2cc;
				display: flex;
				flex-direction: column;
				justify-content: center;
			}

			.ti-dw-footer {
				padding: 0 12px 5px;
				text-align: center;
			}

			.ti-dw-recommend-item {
				display: block;
			}

			.ti-dw-recommend-item span {
				color: #72777c;
			}

			.ti-dw-powered-by {
				font-size: 11px;
				margin-top: 3px;
				display: block;
				color: #72777c;
			}

			.ti-dw-powered-by span {
				font-weight: 600;
			}

		</style>
		<?php do_action( 'themeisle_sdk_dashboard_widget_before', $this->product ); ?>

		<ul class="ti-feed-list">
			<?php

			foreach ( $this->items as $item ) {
				?>
				<li class="ti-dw-feed-item">
					<a href="
						<?php
						echo add_query_arg(
							array(
								'utm_source'   => 'wpadmin',
								'utm_campaign' => 'feed',
								'utm_medium'   => 'dashboard_widget',
							),
							$item['link']
						);
						?>
						" target="_blank">
							<span class="ti-dw-date-container"><span
										class="ti-dw-day-container"><?php echo date( 'd', $item['date'] ); ?></span> <span
										class="ti-dw-month-container"><?php echo substr( date( 'M', $item['date'] ), 0, 3 ); ?></span></span><?php echo $item['title']; ?>
					</a>
				</li>
				<?php
			}
			?>
		</ul>
		<?php
		$recommend = apply_filters( 'themeisle_sdk_recommend_plugin_or_theme', array() );
		if ( ! is_array( $recommend ) || empty( $recommend ) ) {
			return;
		}

		$type = $recommend['type'];

		if ( ( 'theme' === $type && ! current_user_can( 'install_themes' ) ) ) {
			return;
		}
		if ( ( 'plugin' === $type && ! current_user_can( 'install_plugins' ) ) ) {
			return;
		}

		add_thickbox();
		$url = add_query_arg(
			[
				'theme' => $recommend['slug'],
			],
			network_admin_url( 'theme-install.php' )
		);

		if ( 'plugin' === $type ) {

			$url = add_query_arg(
				array(
					'tab'    => 'plugin-information',
					'plugin' => $recommend['slug'],
				),
				network_admin_url( 'plugin-install.php' )
			);
		}
		?>
		<div class="ti-dw-footer">
					<span class="ti-dw-recommend-item ">
							<span class="ti-dw-recommend"><?php echo apply_filters( 'themeisle_sdk_dashboard_popular_label', sprintf( 'Popular %s', ucwords( $type ) ) ); ?>
								: </span>
						<?php
						echo trim(
							str_replace(
								array(
									'lite',
									'Lite',
									'(Lite)',
									'(lite)',
								),
								'',
								$recommend['name']
							)
						);
						?>
						(<a class="thickbox open-plugin-details-modal"
							href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php echo apply_filters( 'themeisle_sdk_dashboard_install_label', 'Install' ); ?></a>)
					</span>
			<span class="ti-dw-powered-by"><span><?php echo apply_filters( 'themeisle_sdk_dashboard_widget_powered_by', esc_attr( sprintf( 'Powered by %s', $this->product->get_friendly_name() ) ) ); ?></span></span>
		</div>

		<?php

	}
1237956
protected function displayWidgetCell()
    {
        $td_tag = new SwatHtmlTag('td');
        $colspan = $this->view->getXhtmlColspan();
        $td_tag->colspan = $colspan - $this->offset;
        $td_tag->class = 'widget-cell';
        $td_tag->open();
        $this->widget->display();
        $td_tag->close();
    }
327980
public function renderContentBegin() {
		
		echo CHtml::openTag('div', $this->contentHtmlOptions);
		if (!empty($this->content)) {
			echo $this->content;
		}
	}
845795
public function render(): string {
		$out = $this->before();
		foreach ( $this->_widgets as $widget ) {
			$out .= $widget->render();
		}
		$out .= $this->after();

		$this->content = $out;

		return $this->template ? render( $this->template, $this->getAttributes() ) : $out;
	}
1111787
function render(content, data) {
    if (content && /{{([^{}]+)}}/g.test(content)) {
        Object.keys(data).forEach(key => {
            if (data[key] && typeof data[key] === 'string') {
                content = content.split(new RegExp(`{{\\s*${key}\\s*}}`, 'g')).join(data[key]);
            }
        });
        return content;
    }

    return content;
}
319191
public function Content()
    {
        $templates = array_reverse(array_values(ClassInfo::ancestry($this->widget->class)));
        return $this->renderWith($templates);
    }
811951
def update
      unless widget.present? && widget.update(widget_update_params)
        return render json: { errors: 'Cannot update widget' }, status: :bad_request
      end

      MnoEnterprise::EventLogger.info('widget_update', current_user.id, "#{container} Widget Update", widget)
      @nocontent = !params['metadata']
      render 'show'
    end
311276
def render(self, *args, **kwargs):
        """"""
        # args kwargs API provided for last minute content injection
        # self._reverse_mro_func('pre_render')
        pretty = kwargs.pop("pretty", False)
        if pretty and self._stable != "pretty":
            self._stable = False

        for arg in args:
            self._stable = False
            if isinstance(arg, dict):
                self.inject(arg)
        if kwargs:
            self._stable = False
            self.inject(kwargs)

        # If the tag or his contents are not changed and we already have rendered it
        # with the same attrs we skip all the work
        if self._stable and self._render:
            return self._render

        pretty_pre = pretty_inner = ""
        if pretty:
            pretty_pre = "\n" + ("\t" * self._depth) if pretty else ""
            pretty_inner = "\n" + ("\t" * self._depth) if len(self.childs) > 1 else ""
        inner = self.render_childs(pretty) if not self._void else ""

        # We declare the tag is stable and have an official render:
        tag_data = (
            pretty_pre,
            self._get__tag(),
            self.render_attrs(),
            inner,
            pretty_inner,
            self._get__tag()
        )[: 6 - [0, 3][self._void]]
        self._render = self._template % tag_data
        self._stable = "pretty" if pretty else True
        return self._render
111112
def render_widgets(kb_app: kb,
                   sphinx_app: Sphinx,
                   doctree: doctree,
                   fromdocname: str,
                   ):
    

    builder: StandaloneHTMLBuilder = sphinx_app.builder

    for node in doctree.traverse(widget):
        # Render the output
        w = sphinx_app.env.widgets.get(node.name)
        context = builder.globalcontext.copy()

        # Add in certain globals
        context['resources'] = sphinx_app.env.resources
        context['references'] = sphinx_app.env.references
        output = w.render(sphinx_app, context)

        # Put the output into the node contents
        listing = [nodes.raw('', output, format='html')]
        node.replace_self(listing)
383519
function render() {
      var checked = rgCtrl.getViewValue() == attr.value;

      if (checked === lastChecked) return;

      if (element[0].parentNode.nodeName.toLowerCase() !== 'md-radio-group') {
        // If the radioButton is inside a div, then add class so highlighting will work
        element.parent().toggleClass(CHECKED_CSS, checked);
      }

      if (checked) {
        rgCtrl.setActiveDescendant(element.attr('id'));
      }

      lastChecked = checked;

      element
        .attr('aria-checked', checked)
        .toggleClass(CHECKED_CSS, checked);
    }
1229232
public function renderWidget()
    {
        $items = [];
        foreach ($this->items as $item) {
            $appkey = $this->getShareKey($item);
            $name = self::t(ArrayHelper::getValue($this->shareMapping, $item));
            $icon = Html::tag('i', '', ['class' => "fa fa-{$this->icon_size} fa-{$item} share-{$item}", 'aria-hidden' => 'true']);
            $link = Html::a($icon, 'javascript:void(0);', [
                'data' => ['toggle' => 'tooltip', 'placement' => 'top', 'original-title' => self::t('Share to {name}', ['name' => $name])]
            ]);
            $items[] = Html::tag('li', $link, ['data' => ['network' => $item, 'appkey' => $appkey]]);
        }
        return Html::tag('ul', implode("\n", $items), $this->itemOptions);
    }
1032881
def render(self):
		
		self.widget.attrs = {
			k: v for k, v in self.attrs.items() if k[0] != "_"
		}
		self.set_input()

		if not self.attrs.get("_no_wrapper"):
			self.set_label()
			self.set_help()
			self.set_errors()
			self.set_classes()
			self.set_icon()  # Must be the bottom-most setter

		self.values["class"] = pad(" ".join(self.values["class"])).lstrip()
		result = mark_safe(FIELD_WRAPPER % self.values)
		self.widget.attrs = self.attrs  # Re-assign variables
		return result
1065221
def render(self, name, value, attrs=None, multi=False, renderer=None):
        
        DJANGO_111_OR_UP = (VERSION[0] == 1 and VERSION[1] >= 11) or (
            VERSION[0] >= 2
        )
        if DJANGO_111_OR_UP:
            return super(DynamicRawIDWidget, self).render(
                name, value, attrs, renderer=renderer
            )

        if attrs is None:
            attrs = {}

        related_url = reverse(
            'admin:{0}_{1}_changelist'.format(
                self.rel.to._meta.app_label,
                self.rel.to._meta.object_name.lower(),
            ),
            current_app=self.admin_site.name,
        )

        params = self.url_parameters()
        if params:
            url = u'?' + u'&'.join(
                [u'{0}={1}'.format(k, v) for k, v in params.items()]
            )
        else:
            url = u''
        if "class" not in attrs:
            attrs[
                'class'
            ] = (
                'vForeignKeyRawIdAdminField'
            )  # The JavaScript looks for this hook.
        app_name = self.rel.to._meta.app_label.strip()
        model_name = self.rel.to._meta.object_name.lower().strip()
        hidden_input = super(widgets.ForeignKeyRawIdWidget, self).render(
            name, value, attrs
        )

        extra_context = {
            'hidden_input': hidden_input,
            'name': name,
            'app_name': app_name,
            'model_name': model_name,
            'related_url': related_url,
            'url': url,
        }
        return render_to_string(
            'dynamic_raw_id/admin/widgets/dynamic_raw_id_field.html',
            extra_context,
        )
942830
function renderItems(items) {
    var filesContainer = document.getElementById('files');
    items.forEach(function (item) {
        var li = document.createElement('li');
        li.innerHTML = item.name;
        filesContainer.appendChild(li);
    });
}
381631
def render(self, data, div_id="chart", head=""):
        """"""
        if not self.is_valid_name(div_id):
            raise ValueError(
                "Name {} is invalid. Only letters, numbers, '_', and '-' are permitted ".format(
                    div_id))

        return Template(head + self.template).render(
            div_id=div_id.replace(" ", "_"),
            data=json.dumps(
                data, indent=4).replace("'", "\\'").replace('"', "'"))
178595
def render_data(context, templateContent, proxyMode, rendered_data, menukey='menubar'):
    """"""

    if proxyMode:
        # Update csrf_tokens
        csrf = unicode(context['csrf_token'])
        tag = u'{~__PLUGIT_CSRF_TOKEN__~}'
        rendered_data = unicode(rendered_data, 'utf-8').replace(tag, csrf)

        result = rendered_data  # Render in proxy mode
        menu = None  # Proxy mode plugit do not have menu

    else:
        # Render it
        template = Template(templateContent)
        result = template.render(context)
        menu = _get_node(template, context, menukey)

    return (result, menu)
766541
function renderElement(tag, attrs, content, indentStr, indentLevel) {
    let indent = indentStr.repeat(indentLevel);
    content = renderFalsey(content);
    content = isNested(content) ? ('\n' + jxh(content, indentStr, ++indentLevel) + indent) : content;
    return Tag.render(indent, tag, attrs, content);
}