WordPress.org

Making WordPress.org

Changeset 7552


Ignore:
Timestamp:
07/31/2018 04:51:55 AM (3 years ago)
Author:
tellyworth
Message:

Gutenberg: make Download button non-editable so it's clickable from the editor.

See #3703

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/functions.php

    r7549 r7552  
    5757    add_action( 'wp_enqueue_scripts', 'gutenberg_editor_scripts_and_styles' );
    5858
     59    add_action( 'enqueue_block_editor_assets', function() {
     60        wp_enqueue_script( 'button-readonly', get_template_directory_uri() . '/js/button-readonly.js', array(), null );
     61    } );
     62
    5963    // Disable use XML-RPC
    6064    add_filter( 'xmlrpc_enabled', '__return_false' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/gutenfront-content.php

    r7545 r7552  
    2525<!-- /wp:spacer -->' . "\n\n";
    2626
    27 $content .= '<!-- wp:button {"align":"center","backgroundColor":"dark-blue"} -->
    28 <div class="wp-block-button aligncenter"><a class="wp-block-button__link has-background has-dark-blue-background-color" href="' . "https://{$localised_domain}/plugins/gutenberg/" . '">' . __( "Download Gutenberg Today", 'gutenbergtheme' ) . '</a></div>
    29 <!-- /wp:button -->' . "\n\n";
     27$content .= '<!-- wp:wporg/download-button -->
     28<div class="wp-block-wporg-download-button wp-block-button aligncenter"><a class="wp-block-button__link has-background has-strong-blue-background-color" href="' . "https://{$localised_domain}/plugins/gutenberg/" . '" style="background-color:rgb(0,115,170)">' . __( "Download Gutenberg Today", 'gutenbergtheme' ) . '</a></div>
     29<!-- /wp:wporg/download-button -->' . "\n\n";
    3030
    3131$content .= '<!-- wp:paragraph {"align":"center","fontSize":"small","className":"gutenberg-landing\u002d\u002dbutton-disclaimer"} -->
Note: See TracChangeset for help on using the changeset viewer.