Making WordPress.org

Changeset 9716


Ignore:
Timestamp:
04/13/2020 11:29:39 PM (22 months ago)
Author:
coffee2code
Message:

Developer: Enable link button for user contributed notes input form.

Props keesiemeijer, DrewAPicture.
Fixes #3912.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
Files:
3 edited

Legend:

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

    r9433 r9716  
    7070        // Adds hidden fields to a comment form for editing
    7171        add_filter( 'comment_form_submit_field',       array( __CLASS__, 'add_hidden_fields' ), 10, 2 );
     72
     73        // Disable the search query in the insert link modal window
     74        add_filter( 'wp_link_query_args',              array( __CLASS__, 'disable_link_query' ) );
    7275    }
    7376
     
    215218
    216219        return $submit_field . self::get_edit_fields( $comment_id, $instance = 0 );
     220    }
     221
     222    /**
     223     * Disable the search query in the insert link modal window.
     224     *
     225     * The search query field in the link modal is hidden with CSS.
     226     *
     227     * @param array $query An array of WP_Query arguments.
     228     */
     229    public static function disable_link_query( $query ) {
     230        $query['post__in'] = array(0);
     231        return $query;
    217232    }
    218233
     
    319334                'textarea_rows' => 8,
    320335                'quicktags'     => array(
    321                     'buttons' => 'strong,em,ul,ol,li'
     336                    'buttons' => 'strong,em,ul,ol,li,link'
    322337                ),
    323338                'teeny'         => true,
     
    398413                'textarea_rows' => 3,
    399414                'quicktags'     => array(
    400                     'buttons' => 'strong,em'
     415                    'buttons' => 'strong,em,link'
    401416                ),
    402417                'editor_css'    => self::get_editor_style(),
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss

    r9645 r9716  
    18611861}
    18621862
     1863/** WP editor link button modal **/
     1864
     1865#wp-link-wrap {
     1866    height: 210px !important;
     1867    margin-top: -125px !important;
     1868
     1869    @media screen and (max-height: 520px) {
     1870        margin-top: inherit !important;
     1871    }
     1872}
     1873
     1874#link-selector {
     1875    #search-panel,
     1876    #wplink-link-existing-content,
     1877    #link-options .link-target {
     1878        display: none;
     1879    }
     1880}
    18631881
    18641882/** Handbook **/
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css

    r9645 r9716  
    22422242}
    22432243
     2244/** WP editor link button modal **/
     2245#wp-link-wrap {
     2246  height: 210px !important;
     2247  margin-top: -125px !important;
     2248}
     2249
     2250@media screen and (max-height: 520px) {
     2251  #wp-link-wrap {
     2252    margin-top: inherit !important;
     2253  }
     2254}
     2255
     2256#link-selector #search-panel,
     2257#link-selector #wplink-link-existing-content,
     2258#link-selector #link-options .link-target {
     2259  display: none;
     2260}
     2261
    22442262/** Handbook **/
    22452263aside[id^="handbook"] .widget-title,
Note: See TracChangeset for help on using the changeset viewer.