Making WordPress.org


Ignore:
Timestamp:
09/23/2014 06:30:18 PM (11 years ago)
Author:
coffee2code
Message:

Code Reference: rename 'Examples' to 'User Contributed Notes' in an appropriate fashion wherever present

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/user-content.php

    r817 r868  
    11<?php
    22/**
    3  * Code Reference user submitted content (comments, examples, etc).
     3 * Code Reference user submitted content (comments, notes, etc).
    44 *
    55 * @package wporg-developer
     
    1919
    2020    /**
    21      * Handles adding/removing hooks to enable comments as examples.
    22      *
    23      * Mostly gives users greater permissions in terms of comment content.
    24      *
    25      * In order to submit code examples, users must be able to post with less restrictions.
     21     * Handles adding/removing hooks to enable comments as user contributed notes.
    2622     */
    2723    public static function do_init() {
     
    3026        add_filter( 'comments_open',                    array( __CLASS__, 'prevent_invalid_comment_submissions' ), 10, 2 );
    3127
    32         // Sets whether submitting examples is open for the user
    33         add_filter( 'comments_open',                    '\DevHub\\can_user_post_example', 10, 2 );
     28        // Sets whether submitting notes is open for the user
     29        add_filter( 'comments_open',                    '\DevHub\\can_user_post_note', 10, 2 );
    3430
    3531        // Enqueue scripts and styles
     
    7167            wp_enqueue_style( 'syntaxhighlighter-theme-default' );
    7268
    73             wp_enqueue_script( 'wporg-developer-code-examples', get_template_directory_uri() . '/js/code-example.js', array(), '20140423', true );
     69            wp_enqueue_script( 'wporg-developer-user-notes', get_template_directory_uri() . '/js/user-notes.js', array(), '20140912', true );
    7470            if ( get_option( 'thread_comments' ) ) {
    7571                wp_enqueue_script( 'comment-reply' );
Note: See TracChangeset for help on using the changeset viewer.