<commit_before>#!/usr/bin/env bash

docker-entrypoint.sh "apache2"

ln -s /var/www/wordpress-ni-forms /var/www/html/wp-content/plugins/wordpress-ni-forms

# Setup site from environment
wp core install --allow-root \
    --url="$WORDPRESS_URL" \
    --title="$WORDPRESS_TITLE" \
    --admin_user="$WORDPRESS_ADMIN_USER" \
    --admin_password="$<PASSWORD>" \
    --admin_email="$WORDPRESS_ADMIN_EMAIL" \
    --skip-email

wp plugin activate --allow-root \
    wordpress-ni-forms/ni-forms \
    wordpress-ni-forms/ni-forms-honeypot

exec "$@"<commit_msg>Added checks for existing symlink and wordpress install<commit_after>#!/usr/bin/env bash

docker-entrypoint.sh "apache2"

if [ ! -L /var/www/html/wp-content/plugins/wordpress-ni-forms ]; then
    ln -s /var/www/wordpress-ni-forms /var/www/html/wp-content/plugins/wordpress-ni-forms
fi

if ! $(wp core is-installed); then
    # Setup site from environment
    wp core install --allow-root \
        --url="$WORDPRESS_URL" \
        --title="$WORDPRESS_TITLE" \
        --admin_user="$WORDPRESS_ADMIN_USER" \
        --admin_password="$<PASSWORD>" \
        --admin_email="$WORDPRESS_ADMIN_EMAIL" \
        --skip-email

    # Activate plugins to develop or test
    wp plugin activate --allow-root \
        wordpress-ni-forms/ni-forms \
        wordpress-ni-forms/ni-forms-honeypot

    wp post create --allow-root \
        --post_title="Test Form Post" \
        --post_type=post \
        --post_status=publish \
        --post_author="$WORDPRESS_ADMIN_USER" \
        ./wp-content/plugins/wordpress-ni-forms/docker/test-form
fi

exec "$@"
{'fraction_non_alphanumeric': 0.1480552070263488, 'fraction_numerical': 0.0012547051442910915, 'mean_word_length': 2.6085972850678734, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 5, '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': '7431450', 'n_tokens_mistral': 553, 'n_tokens_neox': 526, 'n_words': 93}