Пример #1
0
 function test_nprstory_get_pull_post_type()
 {
     $post_type = DS_NPR_API::nprstory_get_pull_post_type();
     $this->assertEquals('post', $post_type);
     update_option('ds_npr_pull_post_type', 'test_post_type');
     $post_type = DS_NPR_API::nprstory_get_pull_post_type();
     $this->assertEquals('test_post_type', $post_type);
 }
Пример #2
0
function nprstory_bulk_action_update_dropdown()
{
    $pull_post_type = DS_NPR_API::nprstory_get_pull_post_type();
    global $post_type;
    if ($post_type == $pull_post_type) {
        ?>
    <script type="text/javascript">
      jQuery(document).ready(function() {
        jQuery('<option>').val('updateNprStory').text('<?php 
        _e('Update NPR Story');
        ?>
').appendTo("select[name='action']");
        jQuery('<option>').val('updateNprStory').text('<?php 
        _e('Update NPR Story');
        ?>
').appendTo("select[name='action2']");
      });
    </script>
    <?php 
    }
}