Making WordPress.org

Changeset 1574


Ignore:
Timestamp:
05/15/2015 12:42:23 AM (11 years ago)
Author:
iandunn
Message:

WordCamp Organizer Nags: Add a dashboard widget for the organizer survey.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-organizer-nags/wordcamp-organizer-nags.php

    r113 r1574  
    1616    public function __construct() {
    1717        $this->notices = array( 'updated' => array(), 'error' => array() );
    18        
     18
     19        add_action( 'wp_dashboard_setup', array( $this, 'create_dashboard_widgets' ) );
    1920        add_action( 'admin_notices', array( $this, 'print_admin_notices' ) );
    2021        add_action( 'admin_init',    array( $this, 'central_about_info' ) );
    2122        add_action( 'admin_init',    array( $this, 'published_attendees_schedule_pages' ) );
     23    }
     24
     25    /**
     26     * Create dashboard widgets
     27     */
     28    public function create_dashboard_widgets() {
     29        // The survey expires 2015-05-23 at 11:45pm EST
     30        if ( time() < 1432350000 ) {
     31            wp_add_dashboard_widget(
     32                'improving_tools_survey',
     33                'WordCamp Organizer Survey',
     34                array( $this, 'improving_tools_survey' )
     35            );
     36        }
     37    }
     38
     39    /**
     40     * Render the content for the WordCamp Organizer Survey dashboard widget
     41     */
     42    public function improving_tools_survey() {
     43        ?>
     44
     45        <p>We need feedback from WordCamp organizers to drive some decisions about improving WordCamp.org tools.</p>
     46
     47        <p>
     48            Please <a href="https://make.wordpress.org/community/2015/05/05/wordcamp-organizer-survey/">take the survey</a>
     49            so we can learn from your experiences.
     50        </p>
     51
     52        <?php
    2253    }
    2354
Note: See TracChangeset for help on using the changeset viewer.