diff --git a/author.php b/author.php new file mode 100644 index 0000000..a55cebb --- /dev/null +++ b/author.php @@ -0,0 +1,82 @@ + + + + +
+ + + +

+ + + + + + + +
+ + + +

+
+
+
+
+
+ + +
+ + + 0):?> + +
+ + + +

+
+
+
+
+ + + + + +
+ + + + Здесь пока нет публикаций + + + + + +
+ + \ No newline at end of file diff --git a/footer.php b/footer.php index f281e12..c55c305 100644 --- a/footer.php +++ b/footer.php @@ -25,8 +25,15 @@ + + +
+ + +
+ @@ -74,10 +81,11 @@
- - + +
+ @@ -91,6 +99,8 @@ } ?> + + @@ -103,7 +113,15 @@ + + + + + + + + @@ -115,6 +133,12 @@ +
+ + + +
+ 'mob-lite']);?> @@ -130,8 +154,8 @@
- - + +
diff --git a/functions.php b/functions.php index deec510..180963c 100644 --- a/functions.php +++ b/functions.php @@ -677,6 +677,10 @@ add_action( 'pre_get_posts', function ($query) { else { $query->set( 'posts_per_page', 23 ); } + + if (is_author()){ + $query->set( 'posts_per_page', 23 ); + } } @@ -706,3 +710,47 @@ function add_text_to_the_feed_end( $content ){ add_filter( 'the_excerpt_rss', 'add_text_to_the_feed_end' ); + +function add_div_youtube($content){ + + $content = str_replace( + [''], + ['
'], + $content); + + return $content; + + +} + + +add_filter('the_content', 'add_div_youtube'); + + +//preview +ini_set('display_errors', 'off'); + +add_filter( 'posts_results', 'set_query_to_draft', null, 2 ); +function set_query_to_draft( $posts, &$query ) { + +if ( sizeof( $posts ) != 1 ) +return $posts; + +$post_status_obj = get_post_status_object(get_post_status( $posts[0])); + +if ( !$post_status_obj->name == 'draft' ) +return $posts; + +if ( $_GET['key'] != 'guest' ) +return $posts; + +$query->_draft_post = $posts; + +add_filter( 'the_posts', 'show_draft_post', null, 2 ); +} + +function show_draft_post( $posts, &$query ) { +remove_filter( 'the_posts', 'show_draft_post', null, 2 ); +return $query->_draft_post; +} + diff --git a/header.php b/header.php index a74d0c9..58a5126 100644 --- a/header.php +++ b/header.php @@ -3,21 +3,38 @@ + <?php wp_title('|', true, 'right');?><?=get_bloginfo('name')?> - + - - + + + + + + + + + + + + + + + + + + ID)):?> diff --git a/style.css b/style.css index 4326c67..86a3af0 100644 --- a/style.css +++ b/style.css @@ -718,6 +718,24 @@ a{ margin-right: 8px; } + + .vijdeo { + position:relative; + padding: 0 0 56.25% 0; + height:0; + overflow:hidden; + } + .vijdeo iframe,.vijdeo object,.vijdeo embed { + position:absolute; + top:0; + left:0; + width:100%; + height:100%; + } + + + + #fulltext img, .wp-block-image img { diff --git a/wp-future.php b/wp-future.php index 3de3a86..a1415e1 100644 --- a/wp-future.php +++ b/wp-future.php @@ -4,9 +4,10 @@ require '/vhosts/beta/vendor/autoload.php'; dbl_config('vetandlife', 'mysql:host=mysql;dbname=vetandlife', 'vetandlife', 'g-34hJk-3-er2'); +$currdate = date('Y-m-d H:i:s'); - -$future_news = db_get("SELECT ID FROM `wp_posts` WHERE `post_status` = 'future' AND `post_date` <= current_date() "); +$future_sql = "SELECT ID FROM `wp_posts` WHERE `post_status` = 'future' AND `post_date` <= '$currdate' "; +$future_news = db_get($future_sql); if (count($future_news) == 0 ){