Download the PHP package mindkomm/theme-lib-links without Composer

On this page you can find all versions of the php package mindkomm/theme-lib-links. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package theme-lib-links

Links

Collection of link helper functions for WordPress themes.

Installation

You can install the package via Composer:

Functions

Name Summary Type Returns/Description
get_link_attributes Gets href attribute for a link tag with proper target and rel attributes. string or bool An href attribute with target and rel attributes, when necessary. Returns false if input is empty.
is_external_url Checks if a URL is external or internal. bool Whether the URL is external.
make_anchor_link Converts an URL to an anchor link. string The updated URL.
url_to_domain Converts an URL to just the domain name together with the TLD. string The domain part of the URL.

make_anchor_link

Converts an URL to an anchor link.

Prefix the last segment of a URL with a # to use it as an anchor link.

make_anchor_link( string $url )

Returns: string The updated URL.

Name Type Description
$url string URL to turn into an anchor link.

PHP


is_external_url

Checks if a URL is external or internal.

is_external_url( string $url )

Returns: bool Whether the URL is external.

Name Type Description
$url string URL to be parsed.

PHP

Twig


url_to_domain

Converts an URL to just the domain name together with the TLD.

url_to_domain( string $url, bool $strip_www = false, int|bool $limit = false )

Returns: string The domain part of the URL.

Name Type Description
$url string The URL to convert.
$strip_www bool Optional. Whether to strip the "www" part of the domain. Default false.
$limit int|bool Optional. Limit to a certain amount of characters. Default false.

PHP

Twig


get_link_attributes

Gets href attribute for a link tag with proper target and rel attributes.

Checks if the URL is internal or external. Adds a target="_blank" for external urls. Inspired by http://stackoverflow.com/a/25090564/1059980. To catch a security vulnerability, the attribute rel="noopener noreferrer" is added, see https://mathiasbynens.github.io/rel-noopener/ for more info.

get_link_attributes( string $url )

Returns: string|bool An href attribute with target and rel attributes, when necessary. Returns false if input is empty.

Name Type Description
$url string URL to be parsed.

PHP

Twig


Twig functions

You need Timber to use these functions.

Support

This is a library that we use at MIND to develop WordPress themes. You’re free to use it, but currently, we don’t provide any support.


All versions of theme-lib-links with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mindkomm/theme-lib-links contains the following files

Loading the files please wait ....