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.7' | |
services: | |
db: | |
image: mariadb:latest | |
container_name: nextcloud_db | |
volumes: | |
- nextcloud-db:/var/lib/mysql | |
networks: |
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
name: Checks | |
on: push | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: npm install | |
- run: npm run lint |
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
const bodyParser = require( 'body-parser' ) | |
const express = require( 'express' ) | |
const morgan = require( 'morgan' ) | |
const { Client } = require( 'pg' ) | |
const squel = require( 'squel' ) | |
console.log('START') | |
const CLIENT = new Client({ | |
<<TOP-SECRET>> |
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
// inspired by: https://gist.github.com/rveitch/9018669face1686e74aaa68026856f36 | |
// add title to CPTs which don't provide a title (useful for the relationship field (https://www.advancedcustomfields.com/resources/relationship/)) | |
function sync_acf_post_title($post_id, $post, $update) { | |
$post_type = get_post_type($post_id); | |
// check for the current CPT | |
if($post_type === "cpt_name_1") { |