<commit_before><?php
namespace Craft;

class ExpandedSinglesPlugin extends BasePlugin
{
    // =========================================================================
    // PLUGIN INFO
    // =========================================================================

    public function getName()
    {
        return Craft::t('Expanded Singles');
    }

    public function getVersion()
    {
        return '0.2.5';
    }

    public function getSchemaVersion()
    {
        return '1.0.0';
    }

    public function getDeveloper()
    {
        return 'Verbb';
    }

    public function getDeveloperUrl()
    {
        return 'https://verbb.io';
    }

    public function getPluginUrl()
    {
        return 'https://github.com/verbb/expanded-singles';
    }

    public function getDocumentationUrl()
    {
        return $this->getPluginUrl() . '/blob/master/README.md';
    }

    public function getReleaseFeedUrl()
    {
        return 'https://raw.githubusercontent.com/verbb/expanded-singles/master/changelog.json';
    }

    public function getSettingsHtml()
    {
        return craft()->templates->render( 'expandedsingles/settings', array(
            'settings' => $this->getSettings(),
        ) );
    }

    protected function defineSettings()
    {
        return array(
            'expandSingles' => array( AttributeType::Bool, 'default' => true ),
            'redirectToEntry' => array( AttributeType::Bool, 'default' => false ),
        );
    }


    // =========================================================================
    // HOOKS
    // =========================================================================

    public function modifyEntrySources(&$sources, $context)
    {
        // Are we in the context of index?
        if ($this->getSettings()->expandSingles && $context == 'index') {

            // Are there any Singles at all?
            if (array_key_exists('singles', $sources)) {
                craft()->expandedSingles->createSinglesList($context, $sources);
            }<commit_msg>Update Documentation URL and Release Feed<commit_after><?php
namespace Craft;

class ExpandedSinglesPlugin extends BasePlugin
{
    // =========================================================================
    // PLUGIN INFO
    // =========================================================================

    public function getName()
    {
        return Craft::t('Expanded Singles');
    }

    public function getVersion()
    {
        return '0.2.5';
    }

    public function getSchemaVersion()
    {
        return '1.0.0';
    }

    public function getDeveloper()
    {
        return 'Verbb';
    }

    public function getDeveloperUrl()
    {
        return 'https://verbb.io';
    }

    public function getPluginUrl()
    {
        return 'https://github.com/verbb/expanded-singles';
    }

    public function getDocumentationUrl()
    {
        return 'https://verbb.io/craft-plugins/expanded-singles/docs';
    }

    public function getReleaseFeedUrl()
    {
        return 'https://raw.githubusercontent.com/verbb/expanded-singles/craft-2/changelog.json';
    }

    public function getSettingsHtml()
    {
        return craft()->templates->render( 'expandedsingles/settings', array(
            'settings' => $this->getSettings(),
        ) );
    }

    protected function defineSettings()
    {
        return array(
            'expandSingles' => array( AttributeType::Bool, 'default' => true ),
            'redirectToEntry' => array( AttributeType::Bool, 'default' => false ),
        );
    }


    // =========================================================================
    // HOOKS
    // =========================================================================

    public function modifyEntrySources(&$sources, $context)
    {
        // Are we in the context of index?
        if ($this->getSettings()->expandSingles && $context == 'index') {

            // Are there any Singles at all?
            if (array_key_exists('singles', $sources)) {
                craft()->expandedSingles->createSinglesList($context, $sources);
            }
{'fraction_non_alphanumeric': 0.2532074558218349, 'fraction_numerical': 0.0031469377874606633, 'mean_word_length': 2.596170583115753, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4614166', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1013, 'n_words': 208}