add wp-future
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
<?//if (!isset($_COOKIE[COOK_GOLOS])):?>
|
||||
|
||||
<div id="golos-<?=$curr_id?>">
|
||||
<!-- <div id="golos-<?=$curr_id?>">
|
||||
<br><button style="padding: 8px; cursor: pointer;" id="golos" onclick="javascript:add_golos(<?= $curr_id;?>, 'golos-<?= $curr_id;?>');">Проголосовать</button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<?//endif?>
|
||||
|
||||
|
||||
@@ -45,7 +45,16 @@
|
||||
<li class="toggle-nav" id="toggle-nav"></li>
|
||||
<a href="<?=get_site_url().vij_lang('btn_lan_link', LANG_VERSION)?>"><li class="btn_lan"><nobr><?=vij_lang('btn_lan', LANG_VERSION)?></nobr></li></a>
|
||||
</ul>
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VGN4NSFMW5"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-VGN4NSFMW5');
|
||||
</script>
|
||||
|
||||
</header>
|
||||
|
||||
|
||||
19
footer.php
19
footer.php
@@ -101,17 +101,6 @@
|
||||
<?get_template_part( '/blocks/mosts', null, ['subclass' => 'mob-lite']);?>
|
||||
<?endif?>
|
||||
|
||||
<?if (LANG_VERSION == 'ru'):?>
|
||||
|
||||
<div class="right-info">
|
||||
<a href="https://vetandlife.ru/без-рубрики/veterinariya-i-zhizn-obyavlyaet-o-novom-fotokonkurse-sovremennoe-zhivotnovodstvo-i-veterinariya/">
|
||||
<img src="https://vetandlife.ru/wp-content/uploads/2022/01/new_comp_240x400.jpg" width="240" height="400" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?endif?>
|
||||
|
||||
|
||||
|
||||
<?//php include VIJ_CACHE.'mosts.html';?>
|
||||
</div>
|
||||
@@ -119,6 +108,7 @@
|
||||
|
||||
<?if (LANG_VERSION == 'ru'):?>
|
||||
|
||||
|
||||
<div class="mobile-info">
|
||||
<a href="https://www.youtube.com/channel/UCOXOjXmMNl8eVO4ldrv5c5Q" target="_blank">
|
||||
<img src="https://vetandlife.ru/wp-content/uploads/2021/10/melano-live.png" width="240" height="200" />
|
||||
@@ -145,11 +135,6 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="mobile-info">
|
||||
<a href="https://vetandlife.ru/без-рубрики/veterinariya-i-zhizn-obyavlyaet-o-novom-fotokonkurse-sovremennoe-zhivotnovodstvo-i-veterinariya/">
|
||||
<img src="https://vetandlife.ru/wp-content/uploads/2022/01/new_comp_240x200.jpg" width="240" height="200" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?endif?>
|
||||
|
||||
@@ -226,6 +211,7 @@
|
||||
<div id="footer_2">
|
||||
<div id="copy">© <?=vij_lang('copyright', LANG_VERSION);?> <?=date('Y')?></div>
|
||||
<ul id="svid">
|
||||
<li><a href="https://vetandlife.ru/rss/news.xml" target="_blank">RSS</a></li>
|
||||
<li><a href="https://vetandlife.ru/wp-content/uploads/2021/11/vij-roskomnadzor.pdf" target="_blank"><?=vij_lang('svid_smi', LANG_VERSION);?></a></li>
|
||||
<li><a href="https://vetandlife.ru/wp-content/uploads/2021/10/privacy.pdf" target="_blank"><?=vij_lang('conf_politic', LANG_VERSION);?></a></li>
|
||||
</ul>
|
||||
@@ -257,7 +243,6 @@
|
||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/burger-menu.js?ver=19"></script>
|
||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/main-arrow.js?ver=1"></script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -213,11 +213,11 @@ function lat_slug( $post_id ){
|
||||
if ( wp_is_post_revision( $post_id ))
|
||||
return;
|
||||
|
||||
$post = get_posts($post_id);
|
||||
$name = urldecode($post[0]->post_name);
|
||||
$currpost = get_post($post_id);
|
||||
$name = urldecode($currpost->post_name);
|
||||
|
||||
if (isContainsRussianLetters($name)) { //если есть русские буковки
|
||||
$title = express_slug($post[0]->post_title);
|
||||
$title = express_slug($currpost->post_title);
|
||||
$latname = vij_slug($title);
|
||||
remove_action( 'save_post', 'lat_slug' ); // избегаем зацикливания
|
||||
wp_update_post( array( 'ID' => $post_id, 'post_name' => $latname ) );
|
||||
|
||||
45
header.php
45
header.php
@@ -9,14 +9,15 @@
|
||||
<?if (defined('TESTMODE') and TESTMODE == 1):?>
|
||||
<link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/style-test.css?ver=3">
|
||||
<?else:?>
|
||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=267">
|
||||
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=274">
|
||||
<?endif?>
|
||||
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
|
||||
<!--<link href="<?php echo get_stylesheet_directory_uri()?>/pub/fontawesome.css" rel="stylesheet">-->
|
||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/jquery-3.6.0.min.js"></script>
|
||||
<script type='text/javascript' src="<?php echo get_stylesheet_directory_uri()?>/scripts/golos.js"></script>
|
||||
<meta property="og:title" content="<?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?>" />
|
||||
<link rel="icon" href="https://vetandlife.ru/favicon.ico" type="image/x-icon">
|
||||
<link type="image/x-icon" href="/favicon. ico" rel="shortcut icon">
|
||||
<link type="Image/x-icon" href="/favicon. ico" rel="icon">
|
||||
<?if (isset($post->ID)):?>
|
||||
<meta property="og:description" content="<?=strip_tags(get_the_excerpt( $post->ID ))?>" />
|
||||
<?if( has_post_thumbnail()):
|
||||
@@ -27,15 +28,7 @@
|
||||
<?endif?>
|
||||
<?php wp_head();?>
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VGN4NSFMW5"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'G-VGN4NSFMW5');
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
@@ -44,34 +37,48 @@
|
||||
<?if (defined('TESTMODE') and TESTMODE == 1):?>
|
||||
<style>
|
||||
|
||||
#mainbanner{
|
||||
#testbanner{
|
||||
width: 100%;
|
||||
display: block;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#mainbanner img {
|
||||
#testbanner img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 1600px;
|
||||
max-width: 554px;
|
||||
height: 86px;
|
||||
margin: auto;
|
||||
border: 1px solid black;
|
||||
background-color: gray;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div id="testbanner">
|
||||
<img />
|
||||
</div>
|
||||
|
||||
<?else:?>
|
||||
|
||||
<div id="mainbanner">
|
||||
<img src ="https://vetandlife.ru/wp-content/uploads/2022/04/3200x200-scaled.gif" />
|
||||
</div>
|
||||
<a href="https://vetandlife.ru/reklama-na-site/"><img src ="https://vetandlife.ru/wp-content/uploads/2022/04/2000x125_64c.gif" /></a>
|
||||
</div>
|
||||
|
||||
<div id="mobmainbanner">
|
||||
<a href="https://vetandlife.ru/reklama-na-site/"><img src =" https://vetandlife.ru/wp-content/uploads/2022/04/554x86.gif" /></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?endif?>
|
||||
|
||||
|
||||
<div id="mainbanner">
|
||||
<a href="https://vetandlife.ru/reklama-na-site/"><img src ="https://vetandlife.ru/wp-content/uploads/2022/04/3200x200_2.gif" /></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<? $lang_version = lang_version();
|
||||
|
||||
10
index.php
10
index.php
@@ -18,7 +18,7 @@ $nn = 0;?>
|
||||
array(
|
||||
'category__in' => array(2),
|
||||
'post__not_in' => array($mainpost_id),
|
||||
'posts_per_page' => 21,
|
||||
'posts_per_page' => 22,
|
||||
'meta_query' => array(
|
||||
array(
|
||||
'key' => '_thumbnail_id',
|
||||
@@ -38,11 +38,9 @@ $nn = 0;?>
|
||||
|
||||
<?$nn++?>
|
||||
|
||||
<?if ($nn == 10):?>
|
||||
|
||||
<?card_post_id(20427, 'до 13 апреля 2022 года')?>
|
||||
|
||||
<?endif?>
|
||||
<?//?if ($nn == 10){
|
||||
//card_post_id(20427, 'до 13 апреля 2022 года');
|
||||
//endif?>
|
||||
|
||||
<div class="mini-card">
|
||||
<?if ( has_post_thumbnail() ) :?>
|
||||
|
||||
34
style.css
34
style.css
@@ -119,7 +119,23 @@ a{
|
||||
margin: auto;
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
#mobmainbanner{
|
||||
width: 100%;
|
||||
display: none;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#mobmainbanner img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 554px;
|
||||
max-height: 86px;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -2283,9 +2299,13 @@ span.rub_back_title{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/** #mainbanner {
|
||||
#mainbanner {
|
||||
display: none;
|
||||
} */
|
||||
}
|
||||
|
||||
#mobmainbanner{
|
||||
display: block;
|
||||
}
|
||||
|
||||
#header_icons{
|
||||
margin-left: 0;
|
||||
@@ -2681,9 +2701,13 @@ and (max-device-width : 667px) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**#mainbanner {
|
||||
#mainbanner {
|
||||
display: none;
|
||||
}*/
|
||||
}
|
||||
|
||||
#mobmainbanner{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mini-card{
|
||||
width: 100%;
|
||||
|
||||
24
wp-future.php
Normal file
24
wp-future.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
//require '/thosts/vij/wp/vendor/autoload.php';
|
||||
require '/vhosts/beta/vendor/autoload.php';
|
||||
|
||||
dbl_config('vetandlife', 'mysql:host=mysql;dbname=vetandlife', 'vetandlife', 'g-34hJk-3-er2');
|
||||
|
||||
|
||||
$future_news = db_get("SELECT ID FROM `wp_posts` WHERE `post_status` = 'future' AND `post_date` <= current_date() ");
|
||||
|
||||
|
||||
if (count($future_news) == 0 ){
|
||||
echo 'no count';
|
||||
exit;
|
||||
}
|
||||
|
||||
foreach ($future_news as $news) {
|
||||
|
||||
$upd_sql = "UPDATE `wp_posts` SET `post_status` = 'publish' WHERE `ID` = '${news['ID']}';";
|
||||
$result = db_get($upd_sql);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user