- Advanced Custom Fields (ACF) - useful for custom values like social medias and contact / home page fields
- ACF to REST API
- ACF Photo Gallery Field (Optionnal)
- Classic Editor Addon - useful to disable new block editor (will install Classic Editor plugin)
- Disable Comments
- Simple Website Redirect - Redirect for pages links into Frontity
- Roles & Capabilities - Create specific rôle for clients
- Code Snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (is_admin()) { | |
function remove_draft_preview () { | |
?> | |
<style> | |
#minor-publishing-actions { | |
padding-top: 0; | |
} | |
#save-action #save-post, #save-action .spinner { | |
margin-top: 10px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_quick_edit($actions) { | |
unset($actions['inline hide-if-no-js']); | |
return $actions; | |
} | |
if (!current_user_can('manage_options')) { | |
add_filter('page_row_actions', 'remove_quick_edit', 10, 1); | |
add_filter('post_row_actions', 'remove_quick_edit', 10, 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function disable_content_editor () { | |
$pages_ids = array(2); // add your page / post id here | |
if ($_GET['post']) { | |
$post_id = $_GET['post']; | |
} else { | |
$post_id = $_POST['post_ID']; | |
} | |
if (!isset($post_id)) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (is_admin() && !current_user_can('administrator')) { | |
add_action('profile_personal_options', 'remove_profile_fields'); | |
function remove_profile_fields() { | |
?> | |
<style> | |
#your-profile h2, /* hide profile titles */ | |
.user-rich-editing-wrap, | |
.user-syntax-highlighting-wrap, | |
.user-admin-color-wrap, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
services: | |
postgres: | |
image: postgres:10-alpine | |
environment: | |
- POSTGRES_DB=peertube_dev | |
- POSTGRES_USER=peertube | |
- POSTGRES_PASSWORD=peertube |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PEERTUBE_DB_USERNAME=postgres_user | |
PEERTUBE_DB_PASSWORD=postgres_password | |
PEERTUBE_WEBSERVER_HOSTNAME=domain.tld | |
# If you need more than one IP as trust_proxy | |
# pass them as a comma separated array: | |
PEERTUBE_TRUST_PROXY=["127.0.0.1", "loopback", "172.18.0.0/16"] | |
#PEERTUBE_SMTP_USERNAME= | |
#PEERTUBE_SMTP_PASSWORD= | |
PEERTUBE_SMTP_HOSTNAME=postfix | |
PEERTUBE_SMTP_PORT=25 |
Automatic production setup with docker-compose for a PeerTube instance.
You must install docker and docker-compose.
You also must be logged as root for a full setup with systemd.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const crypto = require('crypto') | |
const path = require('path') | |
const mudb = require('mudb') | |
const { STORAGE, SALT } = process.env | |
let db |
NewerOlder