function get_post_template_tags_value($post = null, $args = null)
{
    $post = get_post($post);
    $template_tags = msp_get_general_post_template_tags();
    if (msp_is_plugin_active('woocommerce/woocommerce.php')) {
        $template_tags = array_merge($template_tags, msp_get_woocommerce_template_tags());
    }
    $tags_dictionary = array();
    foreach ($template_tags as $template_tag) {
        $tags_dictionary[$template_tag['name']] = msp_get_template_tag_value($template_tag['name'], $post, $args);
    }
    return $tags_dictionary;
}
Пример #2
0
 public function do_template_tag($matches)
 {
     if (!isset($matches['0'])) {
         return $matches;
     }
     $tag_name = preg_replace('/[{}]/', '', $matches['0']);
     $tag_name = msp_get_template_tag_value($tag_name, $this->post_id, $this->post_slider_args);
     $tag_name = $this->escape_square_brackets($tag_name);
     return is_array($tag_name) ? implode(',', $tag_name) : $tag_name;
 }