Download the PHP package sb2-media/svg-icon-system without Composer

On this page you can find all versions of the php package sb2-media/svg-icon-system. 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 svg-icon-system

SVG Icon System

A system for inlining accessible SVG icons in WordPress themes.

Features

Requirements

Installation

  1. From the command line navigate to your WordPress plugins directory.
  2. Run this command: composer create-project sb2-media/svg-icon-system.
  3. Change into the SVG Icon System directory: cd svg-icon-system.
  4. Run npm install.
  5. Run npm run dev.
  6. Run composer dump-autoload -o.
  7. In the WordPress dashboard, navigate to the Plugins page and locate the menu item that reads “SVG Icon System.”
  8. Click on Activate.

Usage

Icon Folder Storage

You may choose to store your SVG icon files in this plugin or anywhere in your theme. The plugin will strip the files of all <svg>, <title> and <desc> tags and reconstruct them in adherence to accessibility standards and guidelines.

Plugin

By default SVG icons are stored in the assets/icons folder in this plugin and then copied over to dist/icons when the Laravel Mix build process is run. Store your SVG icons in the assets/icons and run the command npm run dev or npm run production in the plugin's root folder if you wish to utilize the default behavior. npm run dev or npm run production must be run after adding new SVG icon files to storage.

The assets/icons directory contains a SVG icon file for demonstration purposes.

Theme

If you wish to store your SVG icon files in your theme, simply change the value of the icon_folder_path in config/svg-icons.php to the path where the files will be stored. A few examples are given in the comments.

Config

A single config file config/svg-icons.php is used to declare and configure the SVG icons. The configuration follows this convention:

Notes

Examples

File icon_menu.svg

Config with the bare minimum set:

Output:

Config with all attributes set:

Output:

Function

Icons defined in the config can be placed anywhere in your WordPress templates with the get_svg_icon( $icon_id ) function call.

License

SVG Icon System is licensed under the GPL v2 or later.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

A copy of the license is included in the root of the plugin’s directory. The file is named LICENSE.

Credits

Portions of this plugin uses code and concepts adapted from Carl Alexander and Tonya Mork's Fulcrum plugin.


All versions of svg-icon-system with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
composer/installers Version ~1.0
paragonie/random_compat Version ^2.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 sb2-media/svg-icon-system contains the following files

Loading the files please wait ....