From 0aa11a60bd9d63d61cc8a28482e8197da67df228 Mon Sep 17 00:00:00 2001 From: g <> Date: Tue, 10 Nov 2020 14:28:12 +0300 Subject: [PATCH 1/3] LAW-3719 --- htdocs/wp-content/themes/lawcarta/functions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/wp-content/themes/lawcarta/functions.php b/htdocs/wp-content/themes/lawcarta/functions.php index 18129cd..64a4f14 100644 --- a/htdocs/wp-content/themes/lawcarta/functions.php +++ b/htdocs/wp-content/themes/lawcarta/functions.php @@ -250,5 +250,16 @@ function remove_width_attribute( $html ) { return $html; } +/* Register template redirect action callback */ +add_action('template_redirect', 'meks_remove_wp_archives'); + +/* Remove archives */ +function meks_remove_wp_archives(){ + //If we are on category or tag or date or author archive + if( is_category() || is_tag() || is_date() || is_author() ) { + global $wp_query; + $wp_query->set_404(); //set to 404 not found page + } +} From 0f68115cbbed3428f79ad7eef7084018f765286f Mon Sep 17 00:00:00 2001 From: g <> Date: Wed, 11 Nov 2020 14:38:59 +0300 Subject: [PATCH 2/3] force https for staging --- environments/staging/wp-config-local.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environments/staging/wp-config-local.php b/environments/staging/wp-config-local.php index e65b749..d7a381c 100644 --- a/environments/staging/wp-config-local.php +++ b/environments/staging/wp-config-local.php @@ -15,7 +15,7 @@ define('LAWCARTA_WP_REST_API_RESPONSE_URL', 'https://app-staging-law.carta.live/ define('LAWCARTA_ENVIRONMENT_NAME', 'staging'); -//$_SERVER['HTTPS'] = 'On'; +$_SERVER['HTTPS'] = 'On'; //S3 uploads settings define( 'S3_UPLOADS_BUCKET', 'law-carta-staging-wp' ); From f4d8723fc54095531bee6b72818930ffc0c9f231 Mon Sep 17 00:00:00 2001 From: g <> Date: Thu, 26 Nov 2020 12:33:10 +0300 Subject: [PATCH 3/3] LAW-3646 --- htdocs/wp-content/themes/lawcarta/functions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/wp-content/themes/lawcarta/functions.php b/htdocs/wp-content/themes/lawcarta/functions.php index 64a4f14..ede0624 100644 --- a/htdocs/wp-content/themes/lawcarta/functions.php +++ b/htdocs/wp-content/themes/lawcarta/functions.php @@ -262,4 +262,13 @@ function meks_remove_wp_archives(){ } } +add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2); + +function special_nav_class ($classes, $item) { + if ($item->current){ + $classes[] = 'active '; + } + return $classes; +} +