This snippet shows you how to load a file by uri. Basically this option is available with file_load_mulitple only.
You are here
Web development includes non-design aspects of building web sites: writing markup and coding.
4 May, 2018
Field group lets you do some amazing forms. Still when you have empty element or the form just is too long and needs some custom modifications, you can then use prefix and suffix from form api to...
26 Mar, 2018
Delete all terms from all vocabularies in Drupal 7. This is ran by Drush, but you can run it from wherever Drupal is initialised.
12 Mar, 2018
Handles any HTTP request correctly. This is a flexible and powerful HTTP client implementation of GET, POST, PUT or any other HTTP requests. The reason I built this was due to use of url arguments...
12 Mar, 2018
Example for how to create product variation types programmatically.
20 Dec, 2017
Snippet shows you how to catch errors like 404 when you submit form using jQuery.
2 Nov, 2017
Get first n amount of characters from a string. You could use substr for that, but you will get empty results when there are special characters. Thus multibyte string method is the right way to go.
2 Aug, 2017
Instagram gives out json feed. You can use this little php snippet to create rss feed from the given json. The script leverages paging, which enables you to control the items count in the output feed.
25 Jul, 2017
React: Warning: Failed context type: The context `router` is marked as required in `Link`, but its value is `undefined`
Testing React components with Jest I got an error: "Warning: Failed context type: The context `router` is marked as required in `Link`, but its value is `undefined`.". I am using Link from react-...
1 Jun, 2017
You can minify css with optimize-css-assets-webpack-plugin, but by default some comments are left untouched. If you want to remove all comments you have to use an option for the cssnano, that is used...