ffmpeg -i source.mp4 -c:v libx264 -b:v 1.5M -c:a aac -b:a 128k dest.mp4
Ref: https://dev.to/benjaminblack/use-ffmpeg-to-compress-and-convert-videos-458l
<script src="https://cdnjs.cloudflare.com/ajax/libs/Readmore.js/2.0.2/readmore.min.js" integrity="sha512-llWtDR3k09pa9nOBfutQnrS2kIEG7M6Zm7RIjVVLNab1wRs8NUmA0OjAE38jKzKeCg+A3rdq8AVW41ZTsfhu5Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> |
<?php | |
class CRUD { | |
protected $conn; | |
protected $tablename = 'MY_DEFAULT_TABLENAME'; | |
function __construct() { | |
$this->conn = new mysqli( 'HOST', 'USERNAME', 'PASSWORD', 'DB_NAME' ); | |
if ( $this->conn->connect_error ) { | |
die( $this->conn->connect_error ); |
{ | |
"scripts": { | |
"build": "npm run sass:dev && npm run postcss:build", | |
"dev": "npm run sass:dev && npm run postcss:dev", | |
"watch": "onchange \"assets/scss/**/*.scss\" -- npm run dev", | |
"sass:dev": "sass assets/scss/custom.scss assets/css/custom.css", | |
"postcss:dev": "postcss assets/css/custom.css --use=autoprefixer --output=assets/css/custom.css", | |
"postcss:build": "postcss assets/css/custom.css --use=autoprefixer --use cssnano --output=assets/css/custom.css" | |
}, | |
"browserslist": [ |
// Pause video when slick slide changed | |
$('.act-hero-carousel .the-carousel.carousel-1').on( | |
'beforeChange', | |
function (slick, currentSlide, nextSlide) { | |
var player, command; | |
//find the current slide element and decide which player API we need to use. | |
currentSlide = $('.act-hero-carousel .the-carousel.carousel-1').find( | |
'.slick-current' |
<?php | |
// Get only those services that has people assigned and store them into cache | |
if ( false === ( $available_services_array = get_transient( 'available_services_array' ) ) ) { | |
$available_services_array = array(); | |
$services = new WP_Query( | |
array( | |
'post_type' => array( 'service' ), | |
'posts_per_page' => '500', | |
'post_status' => array( 'publish' ), | |
'order' => 'ASC', |
<?php | |
add_action( 'wp_ajax_testttt', 'testttt' ); | |
function testttt() { | |
$our_people = new WP_Query( | |
array( | |
'post_type' => array( 'people' ), | |
'posts_per_page' => '4', | |
'post_status' => array( 'publish' ), | |
'orderby' => 'rand', | |
'meta_query' => array( |
ffmpeg -i source.mp4 -c:v libx264 -b:v 1.5M -c:a aac -b:a 128k dest.mp4
Ref: https://dev.to/benjaminblack/use-ffmpeg-to-compress-and-convert-videos-458l
<?php | |
// ========= Get embed code from video url for youtube or vimeo ============= | |
function wpmix_get_video_embed( $url ) { | |
$video_type = wpmix_get_video_type( $url ); | |
if ( $video_type == 'youtube' ) { | |
$video_id = wpmix_get_youtube_id( $url ); | |
return '<div class="embed-responsive embed-responsive-16by9"> | |
<iframe width="1268" height="713" src="https://www.youtube.com/embed/' . $video_id . '" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | |
</div>'; | |
} elseif ( $video_type == 'vimeo' ) { |