-
Notifications
You must be signed in to change notification settings - Fork 47
/
mf_constants.php
41 lines (33 loc) · 1.47 KB
/
mf_constants.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
40
41
<?php
if ( !defined('DS') ){
if (strpos(php_uname('s'), 'Win') !== false )
define('DS', '\\');
else
define('DS', '/');
}
//useful for get quickly the path for images/javascript files and css files
//return something like: http://wordpress.local/wp-content/plugins/Magic-Fields/
define('MF_BASENAME',plugins_url().'/'.str_replace(basename(__FILE__),"",plugin_basename(__FILE__)));
define('MF_URL',MF_BASENAME);
//return something like: /Users/user/sites/wordpres/wp-content/plugins/Magic-Fields
define("MF_PATH", dirname(__FILE__));
define("PHPTHUMB",MF_URL."thirdparty/phpthumb/phpThumb.php");
define('MF_FILES_NAME','files_mf');
define('MF_CACHE_NAME','cache');
//ToDo: falta probar que en MU este colocando el path correcto
define('MF_FILES_DIR', WP_CONTENT_DIR.DS.MF_FILES_NAME.DS);
define('MF_FILES_URL', WP_CONTENT_URL.'/'.MF_FILES_NAME.'/');
define('MF_CACHE_DIR', MF_FILES_DIR.MF_CACHE_NAME.DS);
define('MF_CACHE_URL', MF_FILES_URL.MF_CACHE_NAME.'/');
global $supports,$wpdb;
$supports = array(
'title','editor','author',
'thumbnail','excerpt','trackbacks',
'custom_fields','comments','revisions',
'page_attributes'
);
define( 'MF_TABLE_POSTTYPES', $wpdb->prefix . 'mf_posttypes' );
define( 'MF_TABLE_CUSTOM_TAXONOMY', $wpdb->prefix . 'mf_custom_taxonomy' );
define( 'MF_TABLE_CUSTOM_FIELDS',$wpdb->prefix . 'mf_custom_fields' );
define( 'MF_TABLE_CUSTOM_GROUPS',$wpdb->prefix . 'mf_custom_groups' );
define( 'MF_TABLE_POST_META', $wpdb->prefix.'mf_post_meta' );