-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfm-enable-wp.php
39 lines (30 loc) · 1.02 KB
/
fm-enable-wp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/*
Plugin Name: Make WordPress more FileMaker friendly
Plugin URI: https://github.com/LuminFire/fm-enable-wp/
Description: Making FileMaker and WordPress play better together since 2017
Author: LuminFire (Nick Ciske)
Version: 1.1
Author URI: https://luminfire.com/
*/
if( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
/**
* ensure brand consistency
*/
add_filter( 'the_content', 'fmwp_capital_M_dangit' );
add_filter( 'the_title', 'fmwp_capital_M_dangit' );
add_filter( 'widget_title', 'fmwp_capital_M_dangit' );
add_filter( 'widget_content', 'fmwp_capital_M_dangit' );
function fmwp_capital_M_dangit( $text ){
$text = str_replace( array( 'filemaker', 'Filemaker' ), 'FileMaker', $text );
return $text;
}
/**
* allow filemaker .fmp12 uploads
*/
function fmwp_mime_type( $mime_types ){
$mime_types['fmp12'] = 'application/x-filemaker'; //Adding fmp12 extension
$mime_types['fp7'] = 'application/x-filemaker'; //Adding fp7 extension
return $mime_types;
}
add_filter('upload_mimes', 'fmwp_mime_type', 1, 1);