Permalink
Browse files

separated config file for sec im

  • Loading branch information...
franciscof5 committed Jul 27, 2017
1 parent 90267a6 commit c28a3b455752cd7b9494ee0da67f09394f409e89
Showing with 39 additions and 10 deletions.
  1. +1 −0 .gitignore
  2. +19 −0 config.example.php
  3. +19 −10 f5sites-shared-posts-tables-and-uploads-folder.php
View
@@ -0,0 +1 @@
config.php
View
@@ -0,0 +1,19 @@
<?php
#$config = array("asd");
#
$config["posts"] = "wp2_posts";
$config["postmeta"] ="wp2_postmeta";
#
$config["terms"] ="wp2_terms";
$config["term_taxonomy"] ="wp2_term_taxonomy";
$config["term_relationships"] ="wp2_term_relationships";
$config["termmeta"] ="wp2_termmeta";
$config["taxonomy"] ="wp2_taxonomy";
#
$config["comments"] ="wp3_comments";
$config["commentmeta"] ="wp3_commentmeta";
#
$config["links"] ="wp4_fnetwork_links";
?>
@@ -75,20 +75,29 @@ function set_shared_database_schema() {
#require_wp_db();
#wp_set_wpdb_vars();
#die;
#var_dump(dirname(__FILE__)."/config.php");
if(is_file(dirname(__FILE__)."/config.php")) {
include("config.php");
#echo $config["posts"];die;
} else {
echo "F5 Sites Shared posts warning: please enter plugin folder and configure it: copy config.example.php and rename it to config.php with you changes";die;
}
#var_dump($config);die;
#
$wpdb->posts ="1fnetwork_posts";
$wpdb->postmeta ="1fnetwork_postmeta";
$wpdb->posts = $config["posts"];
$wpdb->postmeta = $config["postmeta"];
#
$wpdb->comments ="1fnetwork_comments";
$wpdb->commentmeta ="1fnetwork_commentmeta";
$wpdb->terms = $config["terms"];
$wpdb->term_taxonomy = $config["term_taxonomy"];
$wpdb->term_relationships = $config["term_relationships"];
$wpdb->termmeta = $config["termmeta"];
$wpdb->taxonomy = $config["taxonomy"];
#
$wpdb->links ="1fnetwork_links";
$wpdb->comments = $config["comments"];
$wpdb->commentmeta = $config["commentmeta"];
#
$wpdb->terms ="1fnetwork_terms";
$wpdb->term_taxonomy ="1fnetwork_term_taxonomy";
$wpdb->term_relationships ="1fnetwork_term_relationships";
$wpdb->termmeta ="1fnetwork_termmeta";
$wpdb->taxonomy ="1fnetwork_taxonomy";
$wpdb->links = $config["links"];
#var_dump($wpdb->posts);die;
}
function setWooFilters() {
if(function_exists("is_woocommerce")) {

0 comments on commit c28a3b4

Please sign in to comment.