Download WP-CLI
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Test to see if it works correctly
php wp-cli.phar --info
Add extra permissions
| <?php | |
| class Main { | |
| public function __construct() { | |
| $this->init(); | |
| } | |
| public function init() { | |
| add_action( 'after_setup_theme', array( $this, 'add_image_sizes' ) ); | |
| add_filter( 'image_size_names_choose', array( $this, 'show_image_sizes' ) ); | |
| } |
Download WP-CLI
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
Test to see if it works correctly
php wp-cli.phar --info
Add extra permissions
composer installrestart-php-fpm.phpphp restart-php-fpm.php| .mphb-reserve-btn-wrapper { | |
| position: relative; | |
| } | |
| .mphb-preloader { | |
| position: absolute; | |
| left: 5px; | |
| top: -23px; | |
| } |
| FROM ubuntu:18.04 | |
| # Update and install software-properties-common (for some reason) | |
| RUN apt update && apt upgrade -y && \ | |
| apt-get install software-properties-common -y | |
| # Add repo's (whyuuut) | |
| RUN add-apt-repository ppa:nginx/stable && \ | |
| add-apt-repository ppa:jonathonf/ffmpeg-4 |
| # HEAVILY BASED ON: https://github.com/alfg/docker-nginx-rtmp/blob/master/Dockerfile | |
| ARG NGINX_VERSION=1.16.1 | |
| ARG NGINX_RTMP_VERSION=1.2.1 | |
| ARG FFMPEG_VERSION=4.2.2 | |
| ARG IM_VERSION=7.0.10-6 | |
| ############################## | |
| # Build the NGINX-build image. |
| .advertisement .bsaProItemInner__img { | |
| background-size: contain; | |
| } |
| <?php | |
| add_action( 'wp', function () { | |
| if ( get_post_type() === 'person' ) { | |
| remove_all_filters( 'the_title' ); | |
| } | |
| } ); |
| # Set MAMP's latest PHP version | |
| PHP_VERSION=$(ls /Applications/MAMP/bin/php/ | sort -n | tail -1) | |
| export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH | |
| # Add support for MYSQL (wp db commands) | |
| export PATH=/Applications/MAMP/Library/bin:$PATH |
| <?php | |
| class Sample { | |
| public function __construct() { | |
| $this->hooks(); | |
| } | |
| public function hooks() { | |
| // Remove the existing block register function | |
| remove_action( 'init', 'register_block_core_latest_posts', 10 ); |