/** * TODO : Que doit faire ce template_tag exactement? * Specs : "On prévoit de pouvoir faire des listes avec d’autres paramètres" */ function apm_get_page_by_id($page_id = 0) { return Apm::get_page($page_id); }
<?php /** * Modified version of wp-admin/includes/meta-boxes.php::page_attributes_meta_box() */ $post_type_object = get_post_type_object($post->post_type); if ($post->post_type == 'page') { $is_page_in_apm_tree = Apm::get_page_is_in_apm_tree(); if ($is_page_in_apm_tree) { $marked = Apm::get_page_flag(); $marked = $marked > 0; $page_tree_positions = Apm::get_page_tree_positions(); $page_apm_id = Apm::get_page_apm_id(); ?> <?php if (ApmAddons::addon_is_on('flagged_pages')) { ?> <div id="apm_flag_links_wrapper"> <a href="#" id="apm_unflag_page" style="<?php echo $marked ? '' : 'display:none'; ?> " rel="<?php echo $page_apm_id; ?> "><img src="<?php echo plugin_dir_url(dirname(dirname(__FILE__))); ?> img/red_tag.png" alt="<?php _e('Page flagged : click here to unflag', ApmConfig::i18n_domain); ?>