Compare commits
2 Commits
9785cee0f6
...
a9ac439f25
| Author | SHA1 | Date | |
|---|---|---|---|
| a9ac439f25 | |||
| 7bf5d5d5fc |
43
mu-plugins/wp-migrate-db-pro-compatibility.php
Normal file
43
mu-plugins/wp-migrate-db-pro-compatibility.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/*
|
||||
Plugin Name: WP Migrate DB Pro Compatibility
|
||||
Plugin URI: http://deliciousbrains.com/wp-migrate-db-pro/
|
||||
Description: Prevents 3rd party plugins from being loaded during WP Migrate DB specific operations
|
||||
Author: Delicious Brains
|
||||
Version: 1.2
|
||||
Author URI: http://deliciousbrains.com
|
||||
*/
|
||||
|
||||
if ( ! version_compare( PHP_VERSION, '5.4', '>=' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$GLOBALS['wpmdb_compatibility']['active'] = true;
|
||||
|
||||
if ( defined( 'WP_PLUGIN_DIR' ) ) {
|
||||
$plugins_dir = trailingslashit( WP_PLUGIN_DIR );
|
||||
|
||||
} else if ( defined( 'WPMU_PLUGIN_DIR' ) ) {
|
||||
$plugins_dir = trailingslashit( WPMU_PLUGIN_DIR );
|
||||
|
||||
} else if ( defined( 'WP_CONTENT_DIR' ) ) {
|
||||
$plugins_dir = trailingslashit( WP_CONTENT_DIR ) . 'plugins/';
|
||||
|
||||
} else {
|
||||
$plugins_dir = plugin_dir_path( __FILE__ ) . '../plugins/';
|
||||
}
|
||||
|
||||
$compat_class_path = 'class/Common/Compatibility/Compatibility.php';
|
||||
$compat_class_name = 'DeliciousBrains\WPMDB\Common\Compatibility\Compatibility';
|
||||
$wpmdbpro_compatibility_class = $plugins_dir . 'wp-migrate-db-pro/' . $compat_class_path;
|
||||
$wpmdb_compatibility_class = $plugins_dir . 'wp-migrate-db/' . $compat_class_path;
|
||||
|
||||
if ( file_exists( $wpmdbpro_compatibility_class ) ) {
|
||||
include_once $wpmdbpro_compatibility_class;
|
||||
} elseif ( file_exists( $wpmdb_compatibility_class ) ) {
|
||||
include_once $wpmdb_compatibility_class;
|
||||
}
|
||||
|
||||
if ( class_exists( $compat_class_name ) ) {
|
||||
new $compat_class_name;
|
||||
}
|
||||
|
|
@ -52,7 +52,6 @@ $issue_related_articles = new WP_Query(array(
|
|||
</div>
|
||||
<div class="content-meta">
|
||||
<span class="content-meta__type content-meta__type--revue">Revue</span>
|
||||
<span class="content-meta__reading-time"><?php echo calculate_reading_time($last_issue->post_content); ?> minutes de lecture</span>
|
||||
</div>
|
||||
|
||||
<div class="block-dernieres-dynamiques__issue-content-wrapper">
|
||||
|
|
@ -61,6 +60,7 @@ $issue_related_articles = new WP_Query(array(
|
|||
<h3 class="block-dernieres-dynamiques__issue-title">
|
||||
<?php echo $last_issue->post_title; ?>
|
||||
</h3>
|
||||
<h4 class="block-dernieres-dynamiques__issue-description-title">Édito</h4>
|
||||
<p class="block-dernieres-dynamiques__issue-description">
|
||||
<?php echo $last_issue->post_excerpt; ?>
|
||||
</p>
|
||||
|
|
@ -89,10 +89,14 @@ $issue_related_articles = new WP_Query(array(
|
|||
<div class="article-card">
|
||||
<div class="content-meta">
|
||||
<span class="content-meta__type content-meta__type--article">Article</span>
|
||||
<span class="content-meta__reading-time"><?php echo calculate_reading_time($article->post_content); ?> minutes de lecture</span>
|
||||
<!-- <span class="content-meta__reading-time"><?php echo calculate_reading_time($article->post_content); ?> minutes de lecture</span> -->
|
||||
</div>
|
||||
|
||||
<h4 class="article-card__title"><?php echo $article->post_title; ?></h4>
|
||||
|
||||
<a href="<?php echo get_the_permalink($article->ID); ?>" class="article-card__link">
|
||||
|
||||
<h4 class="article-card__title"><?php echo $article->post_title; ?></h4>
|
||||
</a>
|
||||
|
||||
<ul class="article-card__tags">
|
||||
<?php
|
||||
|
|
@ -104,6 +108,15 @@ $issue_related_articles = new WP_Query(array(
|
|||
<?php endif; ?>
|
||||
|
||||
</ul>
|
||||
<a class="article-card__link-button" href="<?php echo get_the_permalink($article->ID); ?>">
|
||||
|
||||
<?php
|
||||
$svg_path = get_template_directory() . '/resources/img/carhop-fleche-full.svg';
|
||||
if (file_exists($svg_path)) {
|
||||
echo file_get_contents($svg_path);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
@ -111,7 +124,13 @@ $issue_related_articles = new WP_Query(array(
|
|||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<button class="related-articles__show-all">
|
||||
Tout afficher
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
|
@ -149,7 +168,7 @@ $query = new WP_Query(array(
|
|||
// wp_enqueue_script('swiper-js', 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js', array(), null, true);
|
||||
|
||||
?>
|
||||
<section <?php echo get_block_wrapper_attributes(); ?>>
|
||||
<!-- <section <?php echo get_block_wrapper_attributes(); ?>>
|
||||
<h2>lalala actualités</h2>
|
||||
<?php if ($query->have_posts()) : ?>
|
||||
<div class="swiper latest-news-swiper">
|
||||
|
|
@ -181,4 +200,4 @@ $query = new WP_Query(array(
|
|||
|
||||
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
</section> -->
|
||||
|
|
@ -52,7 +52,6 @@ $issue_related_articles = new WP_Query(array(
|
|||
</div>
|
||||
<div class="content-meta">
|
||||
<span class="content-meta__type content-meta__type--revue">Revue</span>
|
||||
<span class="content-meta__reading-time"><?php echo calculate_reading_time($last_issue->post_content); ?> minutes de lecture</span>
|
||||
</div>
|
||||
|
||||
<div class="block-dernieres-dynamiques__issue-content-wrapper">
|
||||
|
|
@ -61,6 +60,7 @@ $issue_related_articles = new WP_Query(array(
|
|||
<h3 class="block-dernieres-dynamiques__issue-title">
|
||||
<?php echo $last_issue->post_title; ?>
|
||||
</h3>
|
||||
<h4 class="block-dernieres-dynamiques__issue-description-title">Édito</h4>
|
||||
<p class="block-dernieres-dynamiques__issue-description">
|
||||
<?php echo $last_issue->post_excerpt; ?>
|
||||
</p>
|
||||
|
|
@ -89,10 +89,14 @@ $issue_related_articles = new WP_Query(array(
|
|||
<div class="article-card">
|
||||
<div class="content-meta">
|
||||
<span class="content-meta__type content-meta__type--article">Article</span>
|
||||
<span class="content-meta__reading-time"><?php echo calculate_reading_time($article->post_content); ?> minutes de lecture</span>
|
||||
<!-- <span class="content-meta__reading-time"><?php echo calculate_reading_time($article->post_content); ?> minutes de lecture</span> -->
|
||||
</div>
|
||||
|
||||
<h4 class="article-card__title"><?php echo $article->post_title; ?></h4>
|
||||
|
||||
<a href="<?php echo get_the_permalink($article->ID); ?>" class="article-card__link">
|
||||
|
||||
<h4 class="article-card__title"><?php echo $article->post_title; ?></h4>
|
||||
</a>
|
||||
|
||||
<ul class="article-card__tags">
|
||||
<?php
|
||||
|
|
@ -104,6 +108,15 @@ $issue_related_articles = new WP_Query(array(
|
|||
<?php endif; ?>
|
||||
|
||||
</ul>
|
||||
<a class="article-card__link-button" href="<?php echo get_the_permalink($article->ID); ?>">
|
||||
|
||||
<?php
|
||||
$svg_path = get_template_directory() . '/resources/img/carhop-fleche-full.svg';
|
||||
if (file_exists($svg_path)) {
|
||||
echo file_get_contents($svg_path);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
@ -111,7 +124,13 @@ $issue_related_articles = new WP_Query(array(
|
|||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<button class="related-articles__show-all">
|
||||
Tout afficher
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<?php
|
||||
|
|
@ -149,7 +168,7 @@ $query = new WP_Query(array(
|
|||
// wp_enqueue_script('swiper-js', 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js', array(), null, true);
|
||||
|
||||
?>
|
||||
<section <?php echo get_block_wrapper_attributes(); ?>>
|
||||
<!-- <section <?php echo get_block_wrapper_attributes(); ?>>
|
||||
<h2>lalala actualités</h2>
|
||||
<?php if ($query->have_posts()) : ?>
|
||||
<div class="swiper latest-news-swiper">
|
||||
|
|
@ -181,4 +200,4 @@ $query = new WP_Query(array(
|
|||
|
||||
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
</section> -->
|
||||
Loading…
Reference in New Issue
Block a user