private function insert_post_terms($post_id, $args)
 {
     // sanitize and store method
     if (!WP_REST_API_Log_Common::is_valid_method($args['method'])) {
         $args['method'] = 'GET';
     }
     wp_set_post_terms($post_id, $args['method'], self::TAXONOMY_METHOD);
     // store status code
     $args['status'] = absint($args['status']);
     wp_set_post_terms($post_id, $args['status'], self::TAXONOMY_STATUS);
     // store the source
     wp_set_post_terms($post_id, $args['source'], self::TAXONOMY_SOURCE);
 }
 /**
  * Test that GET is a valid method
  */
 function test_valid_method()
 {
     $valid_methods = WP_REST_API_Log_Common::valid_methods();
     $this->assertTrue(WP_REST_API_Log_Common::is_valid_method('GET'));
 }
 public function add_source_dropdown($post_type)
 {
     if (WP_REST_API_Log_Db::POST_TYPE === $post_type) {
         $source = WP_REST_API_Log_DB::TAXONOMY_SOURCE;
         WP_REST_API_Log_Common::taxonomy_dropdown(__('Source', 'wp-rest-api-log'), __('All Sources', 'wp-rest-api-log'), $source, filter_input(INPUT_GET, $source, FILTER_SANITIZE_STRING));
     }
 }
}
$plugin_class_file = 'wp-rest-api-log';
$includes = array('includes/class-' . $plugin_class_file . '-common.php', 'includes/class-' . $plugin_class_file . '-db.php', 'includes/class-' . $plugin_class_file . '-post-type.php', 'includes/class-' . $plugin_class_file . '-i18n.php', 'includes/class-' . $plugin_class_file . '-controller.php', 'includes/class-' . $plugin_class_file . '-request-response-base.php', 'includes/class-' . $plugin_class_file . '-request.php', 'includes/class-' . $plugin_class_file . '-response.php', 'includes/class-' . $plugin_class_file . '-entry.php', 'includes/class-' . $plugin_class_file . '-response-base.php', 'includes/class-' . $plugin_class_file . '-delete-response.php', 'includes/class-' . $plugin_class_file . '-routes-response.php', 'includes/class-' . $plugin_class_file . '-elasticpress.php', 'includes/class-' . $plugin_class_file . '.php', 'includes/settings/class-' . $plugin_class_file . '-settings-base.php', 'includes/settings/class-' . $plugin_class_file . '-settings-general.php', 'includes/settings/class-' . $plugin_class_file . '-settings-routes.php', 'includes/settings/class-' . $plugin_class_file . '-settings-elasticpress.php', 'includes/settings/class-' . $plugin_class_file . '-settings-help.php', 'includes/settings/class-' . $plugin_class_file . '-settings.php', 'admin/class-' . $plugin_class_file . '-admin.php', 'admin/class-' . $plugin_class_file . '-admin-list-table.php');
$class_base = 'WP_REST_API_Log';
$classes = array($class_base . '_Common', $class_base . '_DB', $class_base . '_Post_Type', $class_base . '_i18n', $class_base . '_Controller', $class_base . '', $class_base . '_Admin', $class_base . '_Admin_List_Table');
/* Include classes */
foreach ($includes as $include) {
    require_once WP_REST_API_LOG_PATH . $include;
}
if (defined('WP_CLI') && WP_CLI) {
    require_once WP_REST_API_LOG_PATH . 'includes/wp-cli/setup.php';
}
/* Record the start time so we can log total millisecons */
if (class_exists('WP_REST_API_Log_Common')) {
    global $wp_rest_api_log_start;
    $wp_rest_api_log_start = WP_REST_API_Log_Common::current_milliseconds();
}
/* Instantiate classes and hook into WordPress */
foreach ($classes as $class) {
    $plugin = new $class();
    if (method_exists($class, 'plugins_loaded')) {
        add_action('plugins_loaded', array($plugin, 'plugins_loaded'), 1);
    }
}
WP_REST_API_Log_ElasticPress::plugins_loaded();
WP_REST_API_Log_Settings::plugins_loaded();
WP_REST_API_Log_Settings_General::plugins_loaded();
WP_REST_API_Log_Settings_Routes::plugins_loaded();
WP_REST_API_Log_Settings_ElasticPress::plugins_loaded();
WP_REST_API_Log_Settings_Help::plugins_loaded();
/* Activation hook */