$this->templates_data['use_child_theme'] = $this->functions->is_child_theme($stylesheet, $all_templates); $main_theme_directory = $this->functions->get_main_theme_directory($stylesheet, $all_templates); $this->templates_data['main'] = array(); $this->templates_data['main']['folder_name'] = $main_theme_directory; $this->templates_data['_template_' . $main_theme_directory] = 'main'; if($this->templates_data['use_child_theme']) { $this->templates_data['child'] = array(); $this->templates_data['child']['folder_name'] = $stylesheet; $this->templates_data['_template_' . $stylesheet] = 'child'; } //catch the absolute siteurl in case wp folder is different than domain root $this->default_variables['wordpress_directory'] = ''; $this->default_variables['content_directory'] = ''; $this->default_variables['plugins_directory'] = ''; //content_directory $this->default_variables['content_directory'] = str_replace(ABSPATH, "", WP_CONTENT_DIR); $home_url = defined('WP_HOME') ? WP_HOME : get_option('home'); $home_url = untrailingslashit($home_url); $siteurl = defined('WP_HOME') ? WP_SITEURL : get_option('siteurl'); $siteurl = untrailingslashit($siteurl); $wp_directory = str_replace($home_url, "" , $siteurl); $wp_directory = trim(trim($wp_directory), '/'); if($wp_directory != '') { $this->default_variables['wordpress_directory'] = $wp_directory; $domain_ABSPATH = str_replace($wp_directory, "", untrailingslashit( realpath( ABSPATH ))); $content_directory = str_replace($domain_ABSPATH, "" , untrailingslashit( realpath( WP_CONTENT_DIR ))); $content_directory = str_replace('\\', '/', $content_directory); $this->default_variables['content_directory'] = $content_directory; } } /** * Apply new changes for e-mail content too * * @param mixed $atts */ function apply_for_wp_mail($atts) { $atts['message'] = $this->functions->content_urls_replacement($atts['message'], $this->functions->get_replacement_list() ); return $atts; } /** * Add default Url Replacements * */ function add_default_replacements() { do_action('wp-hide/add_default_replacements', $this->urls_replacement); } function switch_theme() { $this->disable_filters = TRUE; $this->get_default_variables(); //allow rewrite flush_rewrite_rules(); $this->disable_filters = FALSE; } function permalink_change_redirect() { $screen = get_current_screen(); if(empty($screen)) return; if($screen->base != "options-permalink") return; //recheck if the permalinks where sucesfully saved $this->permalinks_not_applied = ! $this->functions->rewrite_rules_applied(); //ignore if permalinks are available if($this->permalinks_not_applied === TRUE) return; $new_location = trailingslashit( site_url() ) . "wp-admin/options-permalink.php"; if($this->functions->is_permalink_enabled()) { $new_admin_url = $this->functions->get_module_item_setting('admin_url' , 'admin'); if(!empty($new_admin_url)) $new_location = trailingslashit( site_url() ) . $new_admin_url . "/options-permalink.php"; } $new_location .= '?settings-updated=true'; //no need to redirect if it's on the same path $request_uri = $_SERVER['REQUEST_URI']; $new_location_uri = $this->functions->get_url_path($new_location, TRUE); if($request_uri == $new_location_uri) return; wp_redirect( $new_location ); die(); } /** * General Plugins Conflicts Handle * */ function plugin_conflicts() { //w3-cache conflicts handle include_once(WPH_PATH . 'conflicts/w3-cache.php'); WPH_conflict_handle_w3_cache::init(); //super-cache conflicts handle include_once(WPH_PATH . 'conflicts/super-cache.php'); WPH_conflict_handle_super_cache::init(); //BuddyPress handle include_once(WPH_PATH . 'conflicts/buddypress.php'); WPH_conflict_handle_BuddyPress::init(); //WP Fastest Cache handle include_once(WPH_PATH . 'conflicts/wp-fastest-cache.php'); WPH_conflict_handle_wp_fastest_cache::init(); //WP Rocket include_once(WPH_PATH . 'conflicts/wp-rocket.php'); WPH_conflict_handle_wp_rocket::init(); } function log_save($text) { $myfile = fopen(WPH_PATH . "/debug.txt", "a") or die("Unable to open file!"); $txt = $text . "\n"; fwrite($myfile, $txt); fclose($myfile); } } ?> Projaro – People | Technology | Products

If you've got all it takes become a world-class software developer?

Who we are

We build people, products and projects with the aim of meeting the business needs of various customers.

read more

What we do

Rapid and sustainable solutions to the most complex business challenges with cooperative process-driven.

read more

Work with us

Partner with amazing teams to get the support you need to take your idea from papers to products.

read more
We build people, technology and products
with a highly motivated team of trainers, developers and designers