evanshunt / carbon-fields-smartlink
Carbon Fields extension, that adds a SmartLink field type.
Installs: 1 960
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 0
Open Issues: 1
Language:JavaScript
Requires
- htmlburger/carbon-fields: ^3.6
- dev-master
- 1.0.9
- 1.0.8
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.1
- dev-dependabot/npm_and_yarn/node-sass-7.0.0
- dev-dependabot/npm_and_yarn/async-3.2.4
- dev-dependabot/npm_and_yarn/loader-utils-1.4.2
- dev-plugin-update
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/terser-4.8.1
- dev-dependabot/npm_and_yarn/minimist-1.2.6
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/ssri-6.0.2
- dev-gutenberg-compat
This package is auto-updated.
Last update: 2024-03-28 22:28:11 UTC
README
This field allows you to select between internal and external links, choosing from a dropdown of Posts and Archives for internal links or manually entering a URL for external.
This repository is based on htmlburger/carbon-fields-template.
Installation
composer require evanshunt/carbon-fields-smartlink
Usage
use Carbon_Fields\Field\Field;
...
Field::make('smartlink', 'your_field_name', 'Your Field Name');
TODO
- Build in logic to neatly upgrade from a text URL field, redefining such as an external link.
- Add support for taxonomies, etc.
Building assets
- Edit
webpack.config.js
and make sureconst root
points to the directory where Carbon Fields are installed (e.g.const root = path.resolve(__dirname, '../vendor/includes/htmlburger/carbon-fields');
) - Execute
yarn install
in the root directory to install all build process requirements. - Execute
yarn build
to build the final minimized assets
Optional
Execute yarn run dev
to continuously build assets during development. Note that you should add define( 'SCRIPT_DEBUG', true );
to your wp-config.php
file in order to load the files generated by the dev build process.