Option for removing block not appearing in custom gutenberg block

I’m developing a custom gutenberg block. I’m able to get the fields to appear and I’m able to interact with it when adding it to a page. But the menu that allows you to remove the block does not appear when it’s highlighted. I’m referring to the menu in the screenshot below

enter image description here

I’m using the esnext syntax and this is what my main block js file looks like

    import "./style.scss"; import "./editor.scss";  const { __, setLocaleData } = wp.i18n; const {     registerBlockType, } = wp.blocks; const {     RichText,     MediaUpload, } = wp.editor; const { Button } = wp.components;  registerBlockType( 'tc-blocks/hero-block', {     title: __( 'Hero Block', 'tc-blocks' ),     icon: 'index-card',     category: 'layout',     attributes: {         title: {             type: 'string',             source: 'attribute',             selector: 'h2',         },         mediaID: {             type: 'number',         },         mediaURL: {             type: 'string',             source: 'attribute',             selector: 'img',             attribute: 'src',         },     },     edit: ( props ) => {         const {             className,             attributes: {                 title,                 mediaID,                 mediaURL,             },             setAttributes,         } = props;         const onChangeTitle = ( value ) => {             setAttributes( { title: value } );         };          const onSelectImage = ( media ) => {             setAttributes( {                 mediaURL: media.url,                 mediaID: media.id,             } );         };          return (             <div className={ className }>                 <RichText                     tagName="h2"                     placeholder={ __( 'Write Title…', 'tc-blocks' ) }                     value={ title }                     onChange={ onChangeTitle }                 />                 <div className="tc-image">                     <MediaUpload                         onSelect={ onSelectImage }                         allowedTypes="image"                         value={ mediaID }                         render={ ( { open } ) => (                             <Button className={ mediaID ? 'image-button' : 'button button-large' } onClick={ open }>                                 { ! mediaID ? __( 'Upload Image', 'tc-blocks' ) : <img src={ mediaURL } alt={ __( 'Upload Image', 'tc-blocks' ) } /> }                             </Button>                         ) }                     />                 </div>             </div>         );     },     save: ( props ) => {         const {             className,             attributes: {                 title,                 mediaURL,             },         } = props;         return (             <div className={ className }>                 <RichText.Content tagName="h2" value={ title } />                  {                     mediaURL && (                         <img className="tc-image" src={ mediaURL } alt={ __( 'Image', 'tc-blocks' ) } />                     )                 }             </div>         );     }, } ); 

Here’s how I’m registering the block type in my index.php file

function tc_blocks_hero_block_block_init() {     register_block_type_from_metadata( __DIR__ ); } add_action( 'init', 'tc_blocks_hero_block_block_init' ); 

And here’s my block.json file

{ "apiVersion": 2, "name": "tc-blocks/hero-block", "title": "Hero Block", "category": "widgets", "icon": "smiley", "description": "This is a header block built for a large hero image and text", "supports": {     "html": false }, "textdomain": "hero-block", "editorScript": "file:./build/index.js", "editorStyle": "file:./build/index.css", "style": "file:./build/style-index.css"  } 

I’ve compared my code to the gutenberg examples code found here https://github.com/WordPress/gutenberg-examples but I can’t seem to find any major differences that would cause an issue and I don’t see any js errors in the console.

How do I get the remove block menu to appear in my custom block?

Changes to server configuration option remote access are not supported in SQL Database Managed Instances

Having just set up our new SQL Server Managed Instance, restored a sample database for testing, and run Azure’s vulnerability assessment, it produces this high risk finding:

VA2120 – Features that may affect security should be disabled

The more SQL Server features and services you enable, the larger its surface attack area becomes, making your system more vulnerable to potential attacks. These fetures should be disabled unless it is absolutely needed in this environment.

Remediation Script:

EXECUTE sp_configure 'show advanced options', 1; RECONFIGURE WITH OVERRIDE; EXECUTE sp_configure 'remote access', 0; RECONFIGURE; EXECUTE sp_configure 'show advanced options', 0; RECONFIGURE; 

Turning to Google before doing anything, I found this Microsoft Docs article stating that (emphasis mine):

This topic is about the "Remote Access" feature. This configuration option is an obscure SQL Server to SQL Server communication feature that is deprecated, and you probably shouldn’t be using it.

Can anyone therefore please provide some clarity on the following?

  1. Why is it enabled given Microsoft’s description?
  2. Does it need to be enabled in Azure SQLMI? Because…
  3. When I run the remediation script I get this error:

Changes to server configuration option remote access are not supported in SQL Database Managed Instances.

Best option for securing 1000+ websites (SSL)

My company manages well over 1000 sites for various clients. Currently, we are paying for a Standard DV certificate for each individual site ($ 94.99 from GoDaddy). We are easily spending over $ 100k per year on SSL certificates alone.

I know there has to be a better option when securing this many websites. From GoDaddy, there is an option for using their ACME Server and automating it, is this feasible for the amount of sites I have? Should I be using a wildcard cert for our company to secure our client sites?

Is there a work-around for SetOptions having no ImageSize option?

I’d like to set the output cell size to a specified height and width or to full screen as F12 does.

 data = Reverse[Sort[RandomReal[1, 5]]]; Module[{t = 0, len = Length[data], sum = Total[data]},   Graphics[Table[{Hue[i/len], EdgeForm[Opacity[.8]],      Disk[{0, 0}, 1, {t, t += 2 Pi data[[i]]/sum}]}, {i, len}]]]  SelectionMove[EvaluationNotebook[], Next, Cell] SetOptions[NotebookSelection[EvaluationNotebook[]], Background -> Red,   TextAlignment -> Center] 

Guidelines for setting haggle test difficulty when using the tracking money option?

I have been running a game of WFRP 4e and my players haven’t really been enjoying tracking money much so I was thinking of switching to the optional tracking money rule on page 290 of the rule book.

Where some groups like to track every penny closely, perhaps even using chits or fantasy coins to represent in-game coins, others prefer to ignore all fiscal book-keeping. The game rules assume you are counting every coin, but if you wish to simplify money, you can do so using your Status. If an item costs less than your Status level — so if you have a Status of Silver 2, any item costing 2 silver shillings or less — you are assumed to be able to buy as much as needed of that item. Beyond that, you can buy a maximum of one item a day that costs more with a Haggle Test, with the difficulty set by the GM according to the cost of the item and the local markets.

My problem is that according to the rules only a gold tier character can reasonably afford a main gauche let alone other weapons so my players will need to make haggling tests however I couldn’t find a guideline for haggle tests when using this system.(And the regular haggle rules woul not be appropriate on the grounds that the most you can negotiate is a %50 off) So what I wish to ask is Are there any guidelines somewhere for setting haggle difficulty and if not what are the rules you use on your table?

Combining multiple numeric meta_key’s in an order_by query for a custom woocommerce sorting option [closed]

I would like to create a custom woocommerce product orderby sort option that combines the values of one custom numeric field

  • ‘sort_price’

with another numeric field (woocommerce regular price)

  • ‘_price’

And order the combined values in ASC order

edit: I see this forum is wordpress only, I will take this to the woocommerce plugin forum, apologies, I can’t seem to delete this.

My code so far achieves ordering by sort_price alone but I am unsure how to combine the two.

add_filter( 'woocommerce_get_catalog_ordering_args', 'custom_woocommerce_get_catalog_ordering_args' );  function custom_woocommerce_get_catalog_ordering_args( $  args ) {   $  orderby_value = isset( $  _GET['orderby'] ) ? wc_clean( $  _GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );     if ( 'random_list' == $  orderby_value ) {         $  args['orderby'] = 'meta_value_num';         $  args['order'] = 'ASC';         $  args['meta_key'] = 'sort_price';     }     return $  args; } add_filter( 'woocommerce_default_catalog_orderby_options', 'custom_woocommerce_catalog_orderby' ); add_filter( 'woocommerce_catalog_orderby', 'custom_woocommerce_catalog_orderby' ); function custom_woocommerce_catalog_orderby( $  sortby ) {     $  sortby['random_list'] = 'Price Low to High Custom';     return $  sortby; } 

there is an example in the wp codex which demonstrates using multiple meta keys but I am a little unsure of what the compare and value parts in the array are doing.

    'meta_query' => array(         'relation' => 'AND',         'state_clause' => array(             'key' => 'state',             'value' => 'Wisconsin',         ),         'city_clause' => array(             'key' => 'city',             'compare' => 'EXISTS',         ),      ),     'orderby' => array(          'city_clause' => 'ASC',         'state_clause' => 'DESC',     ), 

An option to reset content

Hi! GSA SER is a wonderful tool. @Sven&nbsp; &  @s4nt0s&nbsp;You guys are doing great with it already. This is something I came across recently.

I’m using SEO content Machine at the moment and when I want to duplicate campaigns and import/ autofill new content it always merge with old data. I was wondering, if GSA SER has an option to clear all the content like in articles it might come in handy. What I meant by content fields such as comments, bio, forum subjects, website titles and all.

I think it can be useful to save some time and add more value to the GSA SER.

Disable or remove custom option plugin through functions.php

How can I disable or remove a custom plugin’s option through functions.php?

The plugin’s option looks like this:

$  customoption = lisfinity_get_option('membership-phone'); 

I can call this with echo in every page and appears, but I want to remove this option through functions.php with a Woocommerce condition. How can I do that? I attached my bad code for example. My code works and display echo, but can’t disable option. This is my woocommerce conditional code:

        function has_bought_items() {                    $  bought = false;       $  prod_arr = array( '2881', '2887' );       $  customer_orders = get_posts( array(         'numberposts' => -1,         'meta_key'    => '_customer_user',         'meta_value'  => get_current_user_id(),         'post_type'   => 'shop_order',          'post_status' => 'wc-completed'     ) );     foreach ( $  customer_orders as $  customer_order ) {             $  order_id = method_exists( $  order, 'get_id' ) ? $  order->get_id() : $  order->id;         $  order = wc_get_order( $  customer_order );                  foreach ($  order->get_items() as $  item) {                         if ( version_compare( WC_VERSION, '3.0', '<' ) )                  $  product_id = $  item['product_id'];             else                 $  product_id = $  item->get_product_id();                           if ( in_array( $  product_id, $  prod_arr ) )                  $  bought = true;         }     }               return $  bought;         }              if ( has_bought_items() ) {   $  customoption = lisfinity_get_option('membership-phone'); delete_option($  customoption');    }   else {     echo 'dasd';  }       }   add_action( 'wp_head', 'my_custom_function' );    

Get_option use inside switch select option

I try to make inside theme custom admin panel a switch select option. but i cannot get the value of switch case. following is my code:

$  bannerchange = $  _POST['bannerchange'];  if( get_option('bannerchange') != get_option($  bannerchange)) {             $  bannerchange = update_option( 'bannerchange', get_option($  bannerchange));  }  <?php if(isset($  _POST['wphw_submit']) && $  chk):?>   <div id="message" class="updated below-h2">     <p>Content updated successfully</p>   </div>     <?php endif;?>       <form method="post" action="">  <select name="wphw_submit" onchange="this.form.submit()">      <option value="page1"<?php if ($  bannerchange == "page1") { echo " selected"; } ?>>Custom Departure</option>      <option value="page2"<?php if ($  bannerchange  == "page2") { echo " selected"; } ?>>Fixed Departure</option> </select> <noscript><input type="submit" value="Submit"></noscript>  </div> <input type="submit" name="wphw_submit" value="Save changes" class="button-primary" /> <?php  switch ($  bannerchange) {     case 'page2': ?>                  <p>two</p>          <?php         break;     case 'page1':         ?>         <p>one</p>         <?php         break;     }     ?> 

$ bannerchange get always undefined.