Compile User Tags.
495294
protected static function compileUserTags()
    {
        if (!is_null(self::$userTags)) {
            foreach (self::$userTags as $compiler) {
                self::$output = $compiler::run(self::$output);
            }
        }
    }
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;
    }
1065995
def tags(self, value): # pylint: disable-msg=E0102
        """"""
        if not isinstance(value, list):
            raise TypeError
        self._config['tags'] = value
779007
def add_tags(self, tags):
        
        if self.cloud_manager.assign_tags(self.uuid, tags):
            tags = self.tags + [str(tag) for tag in tags]
            object.__setattr__(self, 'tags', tags)
559635
def tag_user(self, tag_id, user_id):
        
        data = {'tagid': tag_id}
        if isinstance(user_id, (tuple, list)):
            data['openid_list'] = user_id
        else:
            data['openid_list'] = [user_id, ]
        return self._post('tags/members/batchtagging', data=data)
221768
def parse_tags(self):
        """"""
        tags = []
        try:
            for tag in self._tag_group_dict["tags"]:
                tags.append(Tag(tag))
        except:
            return tags
        return tags
335864
def add_tags(self, *tags):
        '''
        
        '''
        normed_tags = self.api.manager._normalize_tags(tags)
        self.api.manager.add_tags(self.archive_name, normed_tags)
1321519
public function initTemplateTags()
    {
        if ($this->template
            && $this->app->hasMethod('setTags')
        ) {
            /** @type App_Web $this->app */
            $this->app->setTags($this->template);
        }
    }
926251
def tag_builder(parser, token, cls, flow_type):
    """"""
    tokens = token.split_contents()
    tokens_num = len(tokens)

    if tokens_num == 1 or (tokens_num == 3 and tokens[1] == 'for'):
        flow_name = None
        if tokens_num == 3:
            flow_name = tokens[2]
        return cls(flow_name)
    else:
        raise template.TemplateSyntaxError(
            '"sitegate_%(type)s_form" tag requires zero or two arguments. '
            'E.g. {%% sitegate_%(type)s_form %%} or '
            '{%% sitegate_%(type)s_form for ClassicSignup %%}.' % {'type': flow_type})
62405
def generate_tags(self):
		
		for tag in self.tags:
			posts = self.get_posts(tag=tag, private=True)
			self.generate_page(['tags', tag.slug],
				template='archive.html.jinja', posts=posts)
898108
protected static function fetchUserTags()
    {
        $files = Bus::fetch('resources/tags', false);
        //
        if (!is_null($files)) {
            foreach (Bus::fetch('resources/tags', false) as $file) {
                Bus::need($file);
            }
        }
    }
710756
def _compile_tag_re(self):
        
        device_tag_list = []
        for regex_str, tags in iteritems(self._device_tag_re):
            try:
                device_tag_list.append([re.compile(regex_str, IGNORE_CASE), [t.strip() for t in tags.split(',')]])
            except TypeError:
                self.log.warning('{} is not a valid regular expression and will be ignored'.format(regex_str))
        self._device_tag_re = device_tag_list
1083143
def list_tags(userdata):
        
        macros = re.findall('@(.*?)@', userdata)
        logging.info('List of available macros:')
        for macro in macros:
            logging.info('\t%r', macro)
98263
protected function register_rewrite_tags() {
		if ( ! empty( $this->rewrite_tag ) ) {
			foreach ( $this->rewrite_tag as $param => $value ) {
				\add_rewrite_tag( $param, $value );
			}
		}
	}
643293
public function compileAuthors()
	{
		foreach ($this->site->getAuthors() as $author) 
		{
			$template = $this->twig->loadTemplate( 'author.html.tpl' );
			$content = $template->render(array('site' => $this->site, 'author' => $author));
			$this->createFile($content, $author);
		}
	}
60925
def tag(tags):
        """"""
        def dec(cls):
            """Add the words in `tags` as class tags to this class."""
            # Add in this class's tags
            cls._class_tags.update(tags.replace(",", " ").split())  # pylint: disable=protected-access
            return cls
        return dec
827550
public static function update_tags($tags) {
        global $CFG, $PAGE, $DB;

        // Validate and normalize parameters.
        $tags = self::validate_parameters(self::update_tags_parameters(), array('tags' => $tags));

        $systemcontext = context_system::instance();
        $canmanage = has_capability('moodle/tag:manage', $systemcontext);
        $canedit = has_capability('moodle/tag:edit', $systemcontext);
        $warnings = array();

        if (empty($CFG->usetags)) {
            throw new moodle_exception('tagsaredisabled', 'tag');
        }

        $renderer = $PAGE->get_renderer('core');
        foreach ($tags['tags'] as $tag) {
            $tag = (array)$tag;
            if (array_key_exists('rawname', $tag)) {
                $tag['rawname'] = clean_param($tag['rawname'], PARAM_TAG);
                if (empty($tag['rawname'])) {
                    unset($tag['rawname']);
                }
            }
            if (!$canmanage) {
                // User without manage capability can not change any fields except for descriptions.
                $tag = array_intersect_key($tag, array('id' => 1,
                    'description' => 1, 'descriptionformat' => 1));
            }
            if (!$canedit) {
                // User without edit capability can not change description.
                $tag = array_diff_key($tag,
                        array('description' => 1, 'descriptionformat' => 1));
            }
            if (count($tag) <= 1) {
                $warnings[] = array(
                    'item' => $tag['id'],
                    'warningcode' => 'nothingtoupdate',
                    'message' => get_string('nothingtoupdate', 'core_tag')
                );
                continue;
            }
            if (!$tagobject = core_tag_tag::get($tag['id'], '*')) {
                $warnings[] = array(
                    'item' => $tag['id'],
                    'warningcode' => 'tagnotfound',
                    'message' => get_string('tagnotfound', 'error')
                );
                continue;
            }
            // First check if new tag name is allowed.
            if (!empty($tag['rawname']) && ($existing = core_tag_tag::get_by_name($tagobject->tagcollid, $tag['rawname']))) {
                if ($existing->id != $tag['id']) {
                    $warnings[] = array(
                        'item' => $tag['id'],
                        'warningcode' => 'namesalreadybeeingused',
                        'message' => get_string('namesalreadybeeingused', 'core_tag')
                    );
                    continue;
                }
            }
            if (array_key_exists('official', $tag)) {
                // Parameter 'official' deprecated and replaced with 'isstandard'.
                $tag['isstandard'] = $tag['official'] ? 1 : 0;
                unset($tag['official']);
            }
            if (isset($tag['flag'])) {
                if ($tag['flag']) {
                    $tagobject->flag();
                } else {
                    $tagobject->reset_flag();
                }
                unset($tag['flag']);
            }
            unset($tag['id']);
            if (count($tag)) {
                $tagobject->update($tag);
            }
        }
        return array('warnings' => $warnings);
    }