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
<?php | |
/* Add image data column to Media Library */ | |
/** | |
* Add columns (file-size) to the Media Library list table. | |
* | |
* @param array $posts_columns Existing array of columns displayed in the Media list table. | |
* @return array Amended array of columns to be displayed in the Media list table. | |
*/ | |
function my_media_columns( $posts_columns ) { | |
$posts_columns['size'] = __( 'Size', 'headecon' ); |
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
<?php | |
/** | |
* Add a Character Counter to Excerpt box in Edit Post screen. | |
* | |
* Includes suggested range. | |
* Char-count number is color red when outside range and green within. | |
* | |
* @link http://wpsites.org/add-character-counter-excerpt-box-10503/ | |
*/ | |
function my_excerpt_count_js() { |
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
<ol> | |
<?php | |
/* Remove duplicate meta, in this case Author and Contact (custom tax) */ | |
// Get all posts assigned a term in a specific custom taxonomy. | |
$tax = 'contact'; | |
$args = array( | |
'post_type' => 'post', | |
'posts_per_page' => 1000, | |
'orderby' => 'ID', |
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
<?php | |
/******************************* | |
=Yoast SEO Hooks (includes Premium) | |
******************************/ | |
/* Remove default redirects feature, for posts and term. | |
* @link https://kb.yoast.com/kb/how-to-disable-automatic-redirects/ | |
*/ | |
add_filter('wpseo_premium_post_redirect_slug_change', '__return_true' ); | |
add_filter('wpseo_premium_term_redirect_slug_change', '__return_true' ); |
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
<?php | |
/* | |
Creates and end-point that get Yoast SEO meta tags... | |
*/ | |
add_action('rest_api_init', 'add_yoast_data'); | |
function add_yoast_data() | |
{ | |
// Add your post types here... | |
register_rest_field(array( |
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
<script type = 'application/ld+json' class = 'yoast-schema-graph yoast-schema-graph--main'> { | |
"@context": "https://schema.org", | |
"@graph": [{ | |
"@type": "Organization", | |
"@id": "https://yoast.com/#organization", | |
"name": "Yoast", | |
"url": "https://yoast.com/", | |
"sameAs": ["https://www.facebook.com/yoast", "https://www.instagram.com/yoast/", "https://www.linkedin.com/company/1414157/", "https://www.youtube.com/yoast", "https://www.pinterest.com/yoast/", "https://en.wikipedia.org/wiki/Yoast", "https://twitter.com/yoast"], | |
"logo": { | |
"@type": "ImageObject", |
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
<script type = 'application/ld+json' class = 'yoast-schema-graph yoast-schema-graph--main'> { | |
"@context": "https://schema.org", | |
"@graph": [{ | |
"@type": "Organization", | |
"@id": "https://yoast.com/#organization", | |
"name": "Yoast", | |
"url": "https://yoast.com/", | |
"sameAs": ["https://www.facebook.com/yoast", "https://www.instagram.com/yoast/", "https://www.linkedin.com/company/1414157/", "https://www.youtube.com/yoast", "https://www.pinterest.com/yoast/", "https://en.wikipedia.org/wiki/Yoast", "https://twitter.com/yoast"], | |
"logo": { | |
"@type": "ImageObject", |
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
<?php | |
namespace App\Listeners; | |
use App\Media; | |
use FFMpeg\FFMpeg; | |
use FFMpeg\Format\Video\X264; | |
use Illuminate\Queue\InteractsWithQueue; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use Illuminate\Queue\SerializesModels; |
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
<?php | |
// I made this array by joining all the following lists + .php extension which is missing in all of them. | |
// please contribute to this list to make it as accurate and complete as possible. | |
// https://gist.github.com/plasticbrain/3887245 | |
// http://pastie.org/5668002 | |
// http://pastebin.com/iuTy6K6d | |
// total: 1223 extensions as of 16 November 2015 | |
$mime_types = array( | |
'3dm' => array('x-world/x-3dmf'), | |
'3dmf' => array('x-world/x-3dmf'), |
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
<?php | |
/* | |
* Remote File Copy PHP Script 2.0.0 | |
* | |
* Copyright 2012, Sebastian Tschan | |
* https://blueimp.net | |
* | |
* Licensed under the MIT license: | |
* http://www.opensource.org/licenses/MIT | |
*/ |