<commit_before><?php

/* Get post objects for select field options */
function get_post_objects( $query_args ) {
  $args = wp_parse_args( $query_args, array(
      'post_type' => 'project',
    ) );
  $posts = get_posts( $args );
  $post_options = array();
  if ( $posts ) {
    foreach ( $posts as $post ) {
      $post_options [ $post->ID ] = $post->post_title;
    }
  }
  return $post_options;
}


/**
 * Include and setup custom metaboxes and fields.
 *
 * @category YourThemeOrPlugin
 * @package  Metaboxes
 * @license  http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
 * @link     https://github.com/WebDevStudios/CMB2
 */

/**
 * Hook in and add metaboxes. Can only happen on the 'cmb2_init' hook.
 */
add_action( 'cmb2_init', 'igv_cmb_metaboxes' );
function igv_cmb_metaboxes() {

  // Start with an underscore to hide fields from custom fields list
  $prefix = '_igv_';

  if (isset($_GET['post'])) {
    $post_ID = $_GET['post'];
  } else {
    $post_ID = null;
  }

  $parent_args = array(
    'post_type' => 'project'
  );

  $gallery_args = array(
    'post_type'   => 'photograph',
    'meta_query' => array(
      array(
        'key' => '_igv_parent',
        'value' => $post_ID,
        'type' => 'NUMERIC',
        'compare' => '='
      )
    )
  );

  /**
   * Metaboxes declarations here
   * Reference: https://github.com/WebDevStudios/CMB2/blob/master/example-functions.php
   */

  $gallery = new_cmb2_box( array(
      'id'            => $prefix . 'gallery_metabox',
      'title'         => __( 'Gallery', 'cmb2' ),
      'object_types'  => array( 'project', ), // Post type
      'context'       => 'normal',
      'priority'      => 'high',<commit_msg>get any post status for photo parent<commit_after><?php

/* Get post objects for select field options */
function get_post_objects( $query_args ) {
  $args = wp_parse_args( $query_args, array(
      'post_type' => 'project',
    ) );
  $posts = get_posts( $args );
  $post_options = array();
  if ( $posts ) {
    foreach ( $posts as $post ) {
      $post_options [ $post->ID ] = $post->post_title;
    }
  }
  return $post_options;
}


/**
 * Include and setup custom metaboxes and fields.
 *
 * @category YourThemeOrPlugin
 * @package  Metaboxes
 * @license  http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
 * @link     https://github.com/WebDevStudios/CMB2
 */

/**
 * Hook in and add metaboxes. Can only happen on the 'cmb2_init' hook.
 */
add_action( 'cmb2_init', 'igv_cmb_metaboxes' );
function igv_cmb_metaboxes() {

  // Start with an underscore to hide fields from custom fields list
  $prefix = '_igv_';

  if (isset($_GET['post'])) {
    $post_ID = $_GET['post'];
  } else {
    $post_ID = null;
  }

  $parent_args = array(
    'post_type' => 'project',
    'post_status' => 'any'
  );

  $gallery_args = array(
    'post_type'   => 'photograph',
    'meta_query' => array(
      array(
        'key' => '_igv_parent',
        'value' => $post_ID,
        'type' => 'NUMERIC',
        'compare' => '='
      )
    )
  );

  /**
   * Metaboxes declarations here
   * Reference: https://github.com/WebDevStudios/CMB2/blob/master/example-functions.php
   */

  $gallery = new_cmb2_box( array(
      'id'            => $prefix . 'gallery_metabox',
      'title'         => __( 'Gallery', 'cmb2' ),
      'object_types'  => array( 'project', ), // Post type
      'context'       => 'normal',
      'priority'      => 'high',
{'fraction_non_alphanumeric': 0.16334200636021973, 'fraction_numerical': 0.004625614339404453, 'mean_word_length': 2.649789029535865, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 34, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7176483', 'n_tokens_mistral': 1258, 'n_tokens_neox': 1229, 'n_words': 267}