bulk_edit_custom_box not working

WordPress version – 5.4.2

I am working on a custom plugin where I want to add my post meta field in a quick and bulk edit post. I have written a below code. it is quite frustrating for me now because it isn’t going inside callback function of bulk_edit_custom_box as well as for quick_edit_custom_box. I am trying use this simple method and I spent almost 4 hours. I tried to rename the callback function name but still, it isn’t working. Can someone please point out what I am doing wrong here?

add_action( 'bulk_edit_custom_box', 'manage_wp_posts_be_qe_bulk_quick_edit_custom_box', 10, 2 );  function manage_wp_posts_be_qe_bulk_quick_edit_custom_box($  column_name, $  post_type) {   global $  post;   $  postMeta = get_post_meta( $  post->ID, 'accesstype_visibility', true );   if ('accesstype_visibility' == $  column_name && get_post_type() == 'location' ) {       echo  "<fieldset class=\"inline-edit-col-right\" style=\"margin-top: 0;\">";       echo    "<div class=\"inline-edit-col\">";       echo        "<div class=\"inline-edit-group\">";       echo            "<label class=\"alignleft\">";       echo                "<span class=\"title\" for=\"accesstype_visibility\">Accesstype Visibility</span>";       echo                "<input type=\"text\" name=\"accesstype_visibility\" id=\"accesstype_visibility\" value=\"{$  postMeta}\" />";       echo        "</label>";       echo    "</div>";       echo "</fieldset>";   }; } 

wp insert post not working

my wp insert post not working. In post_title and post_name he not save the variable. So at place of Service + variable , i get only "Service", why?

function mic_create_new_page() {     global $  user_ID;         $  new_post = array(             'post_title' => 'Service ' . $  secteur,             'post_content' => '[makeitseo-keyword]',             'post_status' => 'publish',             'post_date' => date('Y-m-d H:i:s'),             'post_author' => $  user_ID,             'post_type' => 'page',             'post_name' => $  slugmic         );     global $  wpdb;     $  tableau_post = array ();     $  tableau_post = mic_stock_in_array($  tableau_post); $  res = $  wpdb->get_results('select * from wp_secteurs');   foreach ( $  res as $  ville ) {     $  id = $  ville->id_secteurs;     $  secteur = $  ville->libelle;     $  slugmic = strtolower(str_replace(" ","-",$  secteur))."-s". $  id ;      if(!in_array(normalize($  slugmic), $  tableau_post))         $  post_id = wp_insert_post($  new_post);              } 


Need help with Trie insertions, I am currently working on a DSA specialization on Coursera, Strings course

I am trying the insertion operation in a Trie and a read operation for the below implementation I am having trouble with insertion.

import java.util.*; class node{ public int val; public node ptrs[]; node(){     this.val =0;     ptrs = new node[26];     for (node ptr : ptrs) {         ptr = null;     }   }     } class Tree{ public node root = new node(); public int pass =0; void insert(String s) {     node trv = root;     for (int i = 0; i < s.length(); i++) {         if (trv.ptrs[s.charAt(i) - 'A'] == null) {             trv.ptrs[s.charAt(i) - 'A'] = new node();             trv.val = ++pass;           //  System.out.println(s.charAt(i)+" val : "+trv.val);         }          trv = trv.ptrs[s.charAt(i) - 'A'];     } } private void visit(node trv){     for(int i =0;i<26;i++){         if(trv.ptrs[i]!=null){             System.out.println((char)(i+'A')+" : "+trv.val);             visit(trv.ptrs[i]);         }     } } void call(){     this.visit(root);  }  } public class trie {   public static void main(String[] args) {     Scanner sc = new Scanner(System.in);     int n = sc.nextInt();     Tree t = new Tree();     while (n-- > 0) {         String s = sc.next();         t.insert(s);     }     t.call();     sc.close();  } } 

my output :

3 ATAGA ATC GAT A : 7 T : 2 A : 6 G : 4 A : 5 C : 6 G : 7 A : 8 T : 9 

expected output :

3 ATAGA ATC GAT A : 1 T : 2 A : 3 G : 4 A : 5 C : 6 G : 7 A : 8 T : 9 

HTTP2 is enabled and working, but PHP $_SERVER[‘SERVER_PROTOCOL’] still says “HTTP/1.1”

I’ve been migrating to a new host (AWS Lightsail with a Ubuntu instance) and while everything is working just fine I’m running into a quirk that I can’t quite figure out.

I’ve enabled HTTP2 on my virtual server and confirmed that files are using that protocol (via DevTools and http2.pro):

HTTP2 working in DevTools

HTTP2 working per http2.pro

For reference, here is my server showing the Apache HTTP2 mod is enabled (and I did restart apache afterwords)

http2 mod already enabled

However, in PHP when I output $ _SERVER['SERVER_PROTOCOL'] on my server it is still showing "HTTP/1.1":


php code

But this same exact software (WordPress theme) on other servers is showing "HTTP/2.0" correctly:

http2 detected with same exact code

I believe I have my Apache2 conf files setup correctly:

Port 443:

<VirtualHost *:443>     Protocols h2 h2c http/1.1 

and just to be thorough I did Port 80 as well:

<VirtualHost *:80>     Protocols h2 h2c http/1.1 

Unfortunately I do not have access to the conf files (or ssh) on the server that is working, so I can’t cross-reference those files.

I’ve been reading a bunch of tutorials on HTTP2 to see if there is any additional setting or configuration that I may have missed, but most are showing the same instructions that I’ve implemented.

Can anyone point me in the right direction as to why this PHP "detection" is incorrectly displaying the protocol, or if there is something I missed that is preventing PHP from using HTTP2 in this one situation?

header > img not selecting working

On my website, I can't select a particular image (in order to style it to width: 180px). Note that it is currently the right size because I was forced to use inline style, but I want it be controlled with CSS.

It is an img inside of a header parent, but:

header > img

doesn't select it. Neither does img#logo (an id I put on it).

Weirdly, this works perfectly both when directly opening the site from my C: drive and while opening it using my ampps local host, also on my…

header > img not selecting working

wp_enqueue_style not working if the file is in a sub folder

I use wp astra to customize our site and have set up a child theme but for some reason, the wp_enqueue_style is not working if the file is in a subfolder.

When I view source the page, it does output the URL like this <link rel='stylesheet' id='my-css-css' href='https://my-domain-url/wp-content/themes/astra-child/assets/css/style.css?ver=1.1' media='all' /> but when I click and visit the URL I get 404 page not found.

Here’s the wp enqueue code.

wp_enqueue_style( 'my-css-css', get_stylesheet_directory_uri() . '/assets/css/style.css', array('astra-theme-css'), '1.1', 'all' ); 

This one works if I put the file inside the main folder of the child theme.

wp_enqueue_style( 'my-css-css', get_stylesheet_directory_uri() . '/style.css', array('astra-theme-css'), '1.1', 'all' ); 

Can anyone help and explain why it doesn’t work?

Thank you in advance! Cheers!

My Button Default Click Is Not Working In WordPress Using Javascript Code

I have added 2 buttons in my page and I have added the default button click code using javascript but it is not working.

This is my HTML code:

<button class="tablink" onclick="openPage('inside', this, '#0077c0')" id="defaultOpen">Inside</button> <button class="tablink" style="left:40px;" onclick="openPage('outside', this, '#0077c0')" >Outside</button> 

This is JS code added in functions.php:

function wp_head_custom_mm(){ ?>  // Get the element with id="defaultOpen" and click on it document.getElementById("defaultOpen").click();  </script>     <?php         } add_action('wp_head', 'wp_head_custom_mm'); 

But it is not working, my default button is not clicked.


Uncaught TypeError: Cannot read property ‘click’ of null

I want to button with id defaultOpen should be clicked when the website opens.

Any help is much appreciated.