This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| {{ $image := .Params.image}} | |
| {{ $media := (.Site.GetPage "page" "media").Resources }} | |
| {{ $original := index ($media.Match (printf "%s" $image)) 0 }} | |
| {{ $width := $original.Width}} | |
| {{ $intWidth := int $width }} | |
| {{ $sizes := .Params.sizes}} | |
| {{ $options := .Params.options}} | |
| {{ if le (len $sizes) 1 }} | |
| {{ $oneSize := index $sizes 0}} |
| <?php | |
| // this is in the `/config` folder | |
| $app->on("collections.save.before.aktuelles", function($name, &$entry, $isUpdate) use ($app) { | |
| // generate slug on create only or when an existing one is empty | |
| if (!$isUpdate || ($isUpdate && trim($entry['slug']) == '')) { | |
| // generate slug based on entry name | |
| $slug = Str::slug($entry['name']); |
| /*Contact form 7 remove span*/ | |
| add_filter('wpcf7_form_elements', function($content) { | |
| $content = preg_replace('/<(span).*?class="\s*(?:.*\s)?wpcf7-form-control-wrap(?:\s[^"]+)?\s*"[^\>]*>(.*)<\/\1>/i', '\2', $content); | |
| $content = str_replace('<br />', '', $content); | |
| return $content; | |
| }); |
| <?php | |
| /* | |
| This script will allow you to send a custom email from anywhere within wordpress | |
| but using the woocommerce template so that your emails look the same. | |
| Created by [email protected] on 27th of July 2017 | |
| Put the script below into a function or anywhere you want to send a custom email | |
| */ |
Adminer is in the repos, so install it with:
apt install adminerCopy the configuration to your available configs folder and enable it.
cp /etc/adminer/apache.conf /etc/apache2/conf-available/adminer.conf| # ###################################################################### | |
| # BEGIN - WEB PERFORMANCE # | |
| # https://github.com/h5bp/html5-boilerplate/blob/master/dist/.htaccess # | |
| # ###################################################################### | |
| # ---------------------------------------------------------------------- | |
| # | Compression | | |
| # ---------------------------------------------------------------------- | |
| <IfModule mod_deflate.c> |
| ######################################################################## | |
| # OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024 | |
| # ---------------------------------------------------------------------- | |
| # @Author: Andreas Hecht | |
| # @Author URI: https://seoagentur-hamburg.com | |
| # License: GNU General Public License v2 or later | |
| # License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
| ######################################################################## | |
Using the REST API to upload a file to WordPress is
quite simple. All you need is to send the file in a
POST-Request to the wp/v2/media route.
There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:
| /*------------------------------------*\ | |
| #PRIMARY-MENU | |
| \*------------------------------------*/ | |
| .primary-menu { | |
| @include grid; | |
| @include sans-serif; | |
| font-weight: $bold; | |
| height: $nav-bar-height; | |
| &__wrapper { |