Returns a monthly archive link for the current blog post.

@param string $type
@return string
7348
public function getMonthlyArchiveLink($type = 'day')
    {
        /** @var DBDatetime $date */
        $date = $this->dbObject('PublishDate');

        if ($type !== 'year') {
            if ($type === 'day') {
                return Controller::join_links(
                    $this->Parent()->Link('archive'),
                    $date->format('Y'),
                    $date->format('M'),
                    $date->format('d')
                );
            }

            return Controller::join_links($this->Parent()->Link('archive'), $date->format('Y'), $date->format('M'));
        }

        return Controller::join_links($this->Parent()->Link('archive'), $date->format('Y'));
    }
1349134
public static function get_post_type_author_archive_support( $post_type ) {
		if ( is_string( $post_type ) ) {
			$post_type = get_post_type_object( $post_type );
		}

		if ( ! empty( $post_type->cptp ) && isset( $post_type->cptp['author_archive'] ) ) {
			return ! ! $post_type->cptp['author_archive'];
		}

		return true;

	}
918785
function urls($type = NULL)
	{
		switch($type)
		{
			case 'unlink':
				return '/_bors/admin/cross_unlink?from='
					.object_property($this->from_object(), 'internal_uri')
					.'&to='.object_property($this->target(), 'internal_uri');
		}

		return parent::urls($type);
	}
89371
protected function getCurrentPage()
    {
        if (is_post_type_archive()) {
            $pageForPostType = get_option('page_for_' . get_post_type());
            return get_post($pageForPostType);
        }

        global $post;

        if (!is_object($post)) {
            return get_queried_object();
        }

        return $post;
    }
1224978
public function getLink($type = 'edit')
	{
		$links = $this->xml->link;

		foreach ($links as $link)
		{
			if ($link->attributes()->rel == $type)
			{
				return (string) $link->attributes()->href;
			}
		}

		return false;
	}
226980
public function getRatings(string $type = null): PaginatedResults
    {
        if ($type !== null) {
            if (Rating::isValidRatingType($type) === false) {
                throw new InvalidArgumentException('Invalid rating type');
            }
            $json = $this->parent->performAPICallWithJsonResponse(
                'get',
                '/user/ratings/query',
                ['query' => ['itemType' => $type]]
            );
        } else {
            $json = $this->parent->performAPICallWithJsonResponse('get', '/user/ratings');
        }

        return new PaginatedResults(DataParser::parseDataArray($json, Rating::class), $this->parent->getLastLinks());
    }
301867
public function getArchive()
    {
        $format = ($this->ArchiveType == 'Yearly') ? '%Y' : '%Y-%m';
        $publishDate = DB::get_conn()->formattedDatetimeClause('"PublishDate"', $format);
        $fields = [
            'PublishDate' => $publishDate,
            'Total' => "COUNT('\"PublishDate\"')"
        ];

        $stage = Versioned::get_stage();
        $suffix = ($stage === Versioned::LIVE) ? '_' . Versioned::LIVE : '';
        $query = SQLSelect::create($fields, '"BlogPost' . $suffix . '"')
            ->addGroupBy($publishDate)
            ->addOrderBy('"PublishDate" DESC')
            ->addWhere(['"PublishDate" <= ?' => DBDatetime::now()->Format(DBDatetime::ISO_DATETIME)]);

        $posts = $query->execute();
        $result = ArrayList::create();
        foreach ($posts as $post) {
            if ($this->ArchiveType == 'Yearly') {
                $year  = $post['PublishDate'];
                $month = null;
                $title = $year;
            } else {
                $date = DBDate::create();
                $date->setValue(strtotime($post['PublishDate']));

                $year  = $date->Format('y');
                $month = $date->Format('MM');
                $title = $date->Format('MMMM y');
            }

            $result->push(ArrayData::create([
                'Title' => $title,
                'Link' => Controller::join_links($this->Blog()->Link('archive'), $year, $month)
            ]));
        }

        $this->extend('updateGetArchive', $result);

        return $result;
    }
475951
public function getIndex($type = null)
	{
		$container = Input::get('c');
		$files = Input::get('files', '');
		
		if (empty($type) || !in_array($type, array('style', 'script'))) {
			App::abort(404);
		}
		
		if (empty($container)) {
			App::abort(404);
		}
		
		$files = json_decode(base64_decode($files), true);
		if (empty($files) || !is_array($files)) {
			App::abort(404);
		}
		
		foreach ($files as $file) {
			Facades\Casset::container($container)->add(
				array_get($file, 'source'),
				array(),
				array_get($file, 'dependencies', array())
			);
		}
		
		$response = Response::make(Facades\Casset::container($container)->content($type));
		
		if ('style' == $type) {
			$response->headers->set('Content-Type', 'text/css');
		}
		else {
			
			$response->headers->set('Content-Type', 'application/json');
		}
		
		return $response;
	}
446312
public function get($type)
    {
        $sum = 0;
        $now = $this->getTimeInMilliseconds();

        for ($i = 0; $i < $this->rollingStatisticalWindowBuckets; $i++) {
            $bucketIndex = $this->getBucketIndex($i, $now);
            $sum += $this->stateStorage->getBucket($this->commandKey, $type, $bucketIndex);
        }

        return $sum;
    }
672903
public function getReplacementUrls($type)
    {
        $replacementUrls = array_map(function ($a1) use ($type) {
            return array_map(function ($a2) use ($type) {
                return $a2[$type];
            }, $a1);
        }, $this->replacementUrls);

        return $replacementUrls;
    }
883933
public function getImageUrl($type = ''): string
    {
        if ($this->getMedia()->isEmpty()) {
            return asset('assets/back/img/other.png');
        }
        $extension = $this->getExtensionType();
        if ($extension === 'image') {
            return $this->getFileUrl($type);
        } elseif ($extension) {
            return asset('assets/back/img/'.$extension.'.png');
        }

        return asset('assets/back/img/other.png');
    }
888836
public function currentPostType(): string
    {
        if (!$this->Wp->is_admin) {
            return ''; // Not applicable.
        }
        return !empty($_GET['post_type'])
            ? $this->c::unslash((string) $_GET['post_type'])
            : $this->postTypeNow(); // Fallback on `$typenow`.
    }
486018
public static function getArchiveSlug()
    {
        global $wp_query;

        if ($wp_query && !is_tax() && (is_post_type_archive() || is_archive() || is_home() || is_search() || is_404())) {
            $postType = get_post_type();

            if (isset($wp_query->query_vars['post_type']) && !empty($wp_query->query_vars['post_type'])) {
                $postType = $wp_query->query_vars['post_type'];
            }

            if (is_home()) {
                $archiveSlug = 'archive-post';
            } elseif (is_post_type_archive() && is_search()) {
                $archiveSlug = 'archive-' . get_post_type_object($postType)->name;
            } elseif (is_search()) {
                $archiveSlug = 'search';
            } elseif (is_404()) {
                $archiveSlug = 'e404';
            } elseif (is_author()) {
                $archiveSlug = 'author';
            } else {
                $archiveSlug = 'archive-' . get_post_type_object($postType)->name;
            }

            return $archiveSlug;
        }

        return false;
    }
1133440
private function getLinkHref(string $type): array
    {
        if (empty($this->feedUris[$type])) {
            $this->findFeedUrls();
        }

        return array_values($this->feedUris[$type]);
    }
36267
public function fetch($type = parent::FETCH_TYPE_NUM)
    {
        $callback = $this->_callback;
        $row = $this->_statement->fetch($type);

        return $row === false ? $row : $callback($row);
    }
1280197
public function get_endpoint_url($type) {
        $endpoint = endpoint::get_record([
            'issuerid' => $this->get('id'),
            'name' => $type . '_endpoint'
        ]);

        if ($endpoint) {
            return $endpoint->get('url');
        }
        return false;
    }
423289
protected function obtainAPIURLEndpoint($type)
    {
        $uri = str_replace('{forgeserver}', $this->server, config('forge-publish.' . $type));
        $uri = str_replace('{forgesite}', $this->site, $uri);
        return config('forge-publish.url') . $uri;
    }