function cvtx_spd_ak_recommendation($post) { $ak_recommendation = get_post_meta($post->ID, $post->post_type . '_ak_recommendation', true); $ak_konsens = get_post_meta($post->ID, $post->post_type . '_ak_konsens', true); if (!cvtx_antrag_is_decided($post->ID)) { echo cvtx_get_latex($ak_recommendation . ' ' . short_konsens($ak_konsens)); } else { echo cvtx_get_latex($ak_recommendation); } }
/** * themed output of all aenderungsantraege to given post or post_id * * @param post_id Do you want a specific posts aenderungsantraege? * */ function cvtx_spd_aenderungsantraege_action($post_id = false) { if (!isset($post_id) || !$post_id) { global $post; } else { $post = get_post($post_id); } // specify wp_query for all aenderungsantraege to given ID $loop = new WP_Query(array('post_type' => 'cvtx_aeantrag', 'meta_key' => 'cvtx_sort', 'orderby' => 'meta_value', 'order' => 'ASC', 'nopaging' => true, 'meta_query' => array(array('key' => 'cvtx_aeantrag_antrag', 'value' => $post->ID, 'compare' => '=')))); if ($loop->have_posts()) { ?> <div id="ae_antraege" class="entry-content"> <h3><?php _e('Amendments', 'cvtx'); if (isset($_GET['ae_antraege']) && $_GET['ae_antraege'] == 1) { _e(' to ', 'cvtx') . cvtx_get_short($post); } ?> </h3> <table cellpadding="3" cellspacing="0" valign="top" class="ae_antraege_table"> <tr> <th><strong><?php _e('Page', 'cvtx'); ?> </strong></th> <th><strong><?php _e('Line', 'cvtx'); ?> </strong></th> <th><strong><?php _e('Author(s)', 'cvtx'); ?> </strong></th> <th><strong><?php _e('Text', 'cvtx'); ?> </strong></th> <th><strong><?php _e('Explanation', 'cvtx'); ?> </strong></th> <th><strong><?php _e('Version AK', 'cvtx'); ?> </strong></th> </tr> <?php while ($loop->have_posts()) { $loop->the_post(); ?> <tr <?php if (cvtx_map_procedure(get_post_meta($post->ID, 'cvtx_aeantrag_verfahren', true)) === 'd') { echo 'class="withdrawn"'; } ?> > <td class="seite"><strong><?php echo get_post_meta($post->ID, 'cvtx_aeantrag_seite', true); ?> </strong></td> <td class="zeile"><strong><?php echo get_post_meta($post->ID, 'cvtx_aeantrag_zeile', true); ?> </strong></td> <td class="steller"><?php echo get_post_meta($post->ID, 'cvtx_aeantrag_steller_short', true); ?> </td> <td class="text"><?php the_content(); ?> </td> <td class="grund"><?php echo get_post_meta($post->ID, 'cvtx_aeantrag_grund', true); ?> </td> <td class="verfahren"><span class="flag <?php echo cvtx_map_procedure(get_post_meta($post->ID, 'cvtx_aeantrag_verfahren', true)); ?> "></span><span class="procedure"><span class="arrow"></span><?php echo get_post_meta($post->ID, $post->post_type . '_ak_recommendation', true) . ' ' . short_konsens(get_post_meta($post->ID, $post->post_type . '_ak_konsens', true)); $version_ak = get_post_meta($post->ID, $post->post_type . '_version_ak', true); if (is_plugin_active('html-purified/html-purified.php')) { global $cvtx_purifier, $cvtx_purifier_config; $version_ak = $cvtx_purifier->purify($version_ak, $cvtx_purifier_config); } $version_ak = trim($version_ak); if ($version_ak) { echo '<p/>' . $version_ak; } ?> </span></td> </tr> <?php } ?> </table> </div> <?php } wp_reset_postdata(); }
function cvtx_spd_format_lists($column) { global $post; switch ($column) { case 'cvtx_reader_type': echo get_post_meta($post->ID, 'cvtx_reader_type', true); break; case "cvtx_antrag_ak_konsens": echo short_konsens(get_post_meta($post->ID, 'cvtx_antrag_ak_konsens', true)); break; case "cvtx_aeantrag_ak_konsens": echo short_konsens(get_post_meta($post->ID, 'cvtx_aeantrag_ak_konsens', true)); break; } }