Plugin's setup

Will create the tag used by this plugin
17715
protected function setUp()
	{
		if (isset($this->configurator->tags[$this->tagName]))
		{
			return;
		}

		$tag = $this->configurator->tags->add($this->tagName);
		foreach (['seq', 'tseq'] as $attrName)
		{
			$tag->attributes->add($attrName)->filterChain->append(
				$this->configurator->attributeFilters['#identifier']
			);
		}
		$tag->template = '<img alt="{.}" class="emoji" draggable="false" src="https://twemoji.maxcdn.com/2/svg/{@tseq}.svg"/>';
	}
1033571
def tag(name, path = Dir.pwd, opts = {})
      g = MiniGit.new(path)
      g.tag opts, name
    end
315627
function scriptTag(src, callback)  {
		
		var elem = doc.createElement('script');		
		elem.type = 'text/' + (src.type || 'javascript');
		elem.src = src.src || src;  
			
		elem.onreadystatechange = elem.onload = function() {
			var state = elem.readyState;

			if (!callback.done && (!state || /loaded|complete/.test(state))) {
				callback.call();
				callback.done = true;
			}
			
			// cleanup. IE runs into trouble
			if (!ie) {			
				head.removeChild(elem);
			}
		}; 
		
		head.appendChild(elem); 
	}
927397
def add_tag(self, tag):
        
        if tag not in self._tags:
            self._tags[tag] = dict()
913187
function startTagInTemplate(p, token) {
    const tn = token.tagName;

    if (
        tn === $.BASE ||
        tn === $.BASEFONT ||
        tn === $.BGSOUND ||
        tn === $.LINK ||
        tn === $.META ||
        tn === $.NOFRAMES ||
        tn === $.SCRIPT ||
        tn === $.STYLE ||
        tn === $.TEMPLATE ||
        tn === $.TITLE
    ) {
        startTagInHead(p, token);
    } else {
        const newInsertionMode = TEMPLATE_INSERTION_MODE_SWITCH_MAP[tn] || IN_BODY_MODE;

        p._popTmplInsertionMode();
        p._pushTmplInsertionMode(newInsertionMode);
        p.insertionMode = newInsertionMode;
        p._processToken(token);
    }
}
951969
protected function initTag()
    {
        $this->tagName = $this->definition->getTag();

        $description = trim($this->definition->getDescription());
        if ($description !== '') {
            $this->description = trim($this->definition->getDescription());
        }
    }
846400
function setupCustomPlugin(name, plugin) {
        plugin.active = true;
        plugin.params = EXTEND({}, plugin.params || {});
        plugin.name = name;

        return plugin;
    }
702731
private function createTags()
    {
        if($this->option('tags') || $this->option('tags_per_post_type') || $this->option('all')) {
            $this->comment('Creating dummy tags...');

            $output = (new \TagSeeder())
                ->setCommand($this)
                ->run(
                    ($this->getDefaultOption('tags_per_post_type') ? $this->getDefaultOption('tags_per_post_type') : $this->getDefaultOption('tags')),
                    $this->getDefaultOption('post_type'),
                    ($this->getDefaultOption('tags_per_post_type') ? true : false)
                );

            $this->info($output);
        }

        return $this;
    }
383061
def _plugin_tags_to_html(text, output_func):
    
    plugins_by_id = get_plugins_from_text(text)

    def _render_tag(m):
        try:
            plugin_id = int(m.groupdict()['pk'])
            obj = plugins_by_id[plugin_id]
        except KeyError:
            # Object must have been deleted.  It cannot be rendered to
            # end user so just remove it from the HTML altogether
            return u''
        else:
            obj._render_meta.text_enabled = True
            return output_func(obj, m)
    return OBJ_ADMIN_RE.sub(_render_tag, text)
931237
def make_tag(cls, tag_name):
		
		if cls.cm:
			return cls.cm.make_tag(tag_name)
		return Tag(tag_name.strip())
694306
def insert_by_tag_and_context!(inserter, snippet, context, tag)
      raise "must be passed snippet" unless snippet.is_a?(Snippet)

      src = insert_func(snippet, context, tag)

      options[:margin_top].times { inserter.insert "" }
      # @snip -> @snippet
      inserter.insert tag.to_snippet_tag unless snippet.no_tag?
      # insert snippet text
      inserter.insert src
      options[:margin_bottom].times { inserter.insert "" }

      visit tag
    end
1147994
def set_tag(self, namespace, repository, tag, image_id):
        """"""
        return self._http_call(self.TAGS + '/' + tag, put, data=image_id,
                               namespace=namespace, repository=repository)
304813
def add_tag(self, task, params={}, **options): 
        
        path = "/tasks/%s/addTag" % (task)
        return self.client.post(path, params, **options)
46881
function asb_setupDOM() {
                    var flyoutPointerReleasedHandler = this._flyoutPointerReleasedHandler.bind(this);
                    var inputOrImeChangeHandler = this._inputOrImeChangeHandler.bind(this);

                    // Root element
                    if (!this._element.getAttribute("aria-label")) {
                        this._element.setAttribute("aria-label", Strings.ariaLabel);
                    }
                    this._element.setAttribute("role", "group");

                    // Input element
                    this._inputElement = _Global.document.createElement("input");
                    this._inputElement.autocorrect = "off";
                    this._inputElement.type = "search";
                    this._inputElement.classList.add(ClassNames.asbInput);
                    this._inputElement.classList.add("win-textbox");
                    this._inputElement.setAttribute("role", "textbox");
                    this._inputElement.addEventListener("keydown", this._keyDownHandler.bind(this));
                    this._inputElement.addEventListener("keypress", this._keyPressHandler.bind(this));
                    this._inputElement.addEventListener("keyup", this._keyUpHandler.bind(this));
                    this._inputElement.addEventListener("focus", this._inputFocusHandler.bind(this));
                    this._inputElement.addEventListener("blur", this._inputBlurHandler.bind(this));
                    this._inputElement.addEventListener("input", inputOrImeChangeHandler);
                    this._inputElement.addEventListener("compositionstart", inputOrImeChangeHandler);
                    this._inputElement.addEventListener("compositionupdate", inputOrImeChangeHandler);
                    this._inputElement.addEventListener("compositionend", inputOrImeChangeHandler);
                    _ElementUtilities._addEventListener(this._inputElement, "pointerdown", this._inputPointerDownHandler.bind(this));
                    this._updateInputElementAriaLabel();
                    this._element.appendChild(this._inputElement);
                    var context = this._tryGetInputContext();
                    if (context) {
                        context.addEventListener("MSCandidateWindowShow", this._msCandidateWindowShowHandler.bind(this));
                        context.addEventListener("MSCandidateWindowHide", this._msCandidateWindowHideHandler.bind(this));
                    }

                    // Flyout element
                    this._flyoutElement = _Global.document.createElement("div");
                    this._flyoutElement.classList.add(ClassNames.asbFlyout);
                    this._flyoutElement.addEventListener("blur", this._flyoutBlurHandler.bind(this));
                    _ElementUtilities._addEventListener(this._flyoutElement, "pointerup", flyoutPointerReleasedHandler);
                    _ElementUtilities._addEventListener(this._flyoutElement, "pointercancel", flyoutPointerReleasedHandler);
                    _ElementUtilities._addEventListener(this._flyoutElement, "pointerout", flyoutPointerReleasedHandler);
                    _ElementUtilities._addEventListener(this._flyoutElement, "pointerdown", this._flyoutPointerDownHandler.bind(this));
                    this._element.appendChild(this._flyoutElement);

                    // Repeater
                    var that = this;
                    function repeaterTemplate(suggestion) {
                        return that._renderSuggestion(suggestion);
                    }
                    this._suggestionsData = new BindingList.List();
                    this._repeaterElement = _Global.document.createElement("div");
                    this._repeater = new Repeater.Repeater(this._repeaterElement, {
                        data: this._suggestionsData,
                        template: repeaterTemplate,
                    });
                    _ElementUtilities._ensureId(this._repeaterElement);
                    this._repeaterElement.setAttribute("role", "listbox");
                    this._repeaterElement.setAttribute("aria-live", "polite");
                    this._flyoutElement.appendChild(this._repeaterElement);
                }
459240
function createTag() {
  var newTagName = 'v1.0.0';

  return git.tag({tag: newTagName, message: newTagName + ' release', annotated: true})
      .then(git.push.bind(null, {tag: newTagName, remote: remote}));

}
36247
def register_html_tag(tag_name, type = :inline, **options)
      tag = HTMLTag.new(tag_name, type, **options)
      @permitted_html_tags[tag.name] = tag
    end
494384
def add_tag(context, id, name):
    

    result = job.add_tag(context, id=id, name=name)
    utils.format_output(result, context.format)