function getShortcodeOutput() {
ob_start();
echo "some text1\n";
echo "some text2\n";
echo "some text3\n";
echo "some text4\n";
$result = ob_get_contents();
ob_end_clean();
return $result;
}
function getShortcodeOutput() {
$result = "";
$result .= "some text1\n";
$result .= "some text2\n";
$result .= "some text3\n";
$result .= "some text4\n";
return $result;
}
function shortcodeSliderInit($atts) {
$result = '';
extract(shortcode_atts(array(
'name' => '',
'slideshow' => 0,
'animation' => 'fade',
'controlnav' => 0,
'randomize' => 0
), $atts));
if (!$name) { return FALSE; }
$slider = ale_sliders_get_slider($name);
if (!$slider) { return FALSE; }
$slider_id = sanitize_title('ale-slider-' . $slider['slug'] . '-' . wp_generate_password(5, false));
$result .= '<div id="' . $slider_id . '" class="ale-slider-slides">';
$result .= '<div class="owl-carousel owl-theme">';
foreach ($slider['slides'] as $slide) {
if ($slide['image']) {
if ($slide['url']) {
$result .= '<a href="' . $slide['url'] . '" class="swipebox">';
}
$result .= '<img src="' . $slide['image'] . '" alt="' . $slide['title'] . '" />';
if ($slide['url']) {
$result .= '</a>';
}
}
}
$result .= '</div>';
$result .= '</div>';
return $result;
}
public function save_metabox($post_id) {
$this->save_metabox1( $post_id );
$this->save_metabox2( $post_id );
$this->save_metabox3( $post_id );
}
<?php
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$args = array( 'post_type' => 'blog', 'posts_per_page' => 1, 'paged' => $paged );
$loop = new WP_Query( $args );
?>
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<div class="col-md-4">
<div class="blog-item_box">
<div class="blog-item_img-box"><img src="<?php the_field('img_blog-item') ?>" alt=""></div>
<div class="blog-item_title"><?php the_content(); ?></div>
<div class="blog-item_info"><?php the_excerpt(); ?></div><a class="blog-item_details-info" href="<?php the_permalink(); ?>">Узнать подробнее</a>
</div>
</div>
<?php endwhile; ?>
<?php the_posts_pagination(); ?>
get_posts(array(
'meta_key' => 'xxx_key',
'meta_value' => 'Брянская область'
));
get_posts(array(
'meta_query' => array(
array(
'key' => 'ххх_key',
'value' => array('Брянская область', 'Московская область'),
'compare' => 'IN'
)
)
));
var FeedParser = (function() {
function FeedParser(Feed_Table_StatsParser) {
this.DELIMITER_ROW = "~";
this.DELIMITER_CELL = "¬";
this.DELIMITER_VALUE = "÷";
this.statsParser = Feed_Table_StatsParser
}
FeedParser.prototype.parse = function(feed) {
var statsParser = this.statsParser;
statsParser.startFeed();
var rows = feed.split(this.DELIMITER_ROW);
for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
var row = rows_1[_i];
statsParser.startRow();
var cells = row.split(this.DELIMITER_CELL);
for (var _a = 0, cells_1 = cells; _a < cells_1.length; _a++) {
var cell = cells_1[_a];
var keyValue = cell.split(this.DELIMITER_VALUE);
statsParser.parse(keyValue[0], keyValue[1])
}
statsParser.endRow()
}
statsParser.endFeed();
return statsParser.getParsedModel()
};
return FeedParser
}());
function custom_wp_admin_css() {
wp_register_style('custom_wp_admin_css', get_template_directory_uri() . '/wp-admin.css', false, null);
wp_enqueue_style('custom_wp_admin_css');
}
table.users tr {
display: inline-block;
width: 33%;
}