Automatically Close wordpress media uploader after click on upload image

i am using one function for automatically insert image in post after user upload image in wordpress media uploader but problem is that wordpress media uploader is still open after user upload image. so i am trying to add function that after user click on upload image after that wordpress media uploader should me close automatically.

What I am trying to do is –

  1. User clicks "Add Media"

  2. Select an image

  3. Now wordpress media uploader should be Close automatically.

any Chanches to add this type of function by php or using jquery Any clues ?

Image Gallery – Click Button to Show Image

I’m working on an Image Gallery with buttons to show images with an [X] in the upper right corner to close the image. While the image is displayed the screen will not be darkened, but will be frozen from clicking anything except for the [X] to close the image. In the attached code there’s a call to a CustomFunction, which is where I really need help. All of the images will be smaller that 500 x 500 pixels and will be displayed in the center of the screen. I’m hoping there’s a way to use…

Image Gallery – Click Button to Show Image

SSRS reports resets the parameters to default after I click on “View Report”

We are using SSRS version 16(build 13.0.x) in Native mode.

I built a report using Report Builder with 2 parameters(independent). Everything works as it should when I run the report in Report Builder.

When I publish it to WebPortal – some random set of users have the following issue:

  1. Through WebPortal URL, they click on the report to open in browser, we have always used chrome.
  2. They populate the parameters and click on "View Report".
  3. The report starts "Loading" and immediately the parameters are reset to default(or blank) and the report area goes blank. They couldn’t even see the column header or the menu bar in the report area.

Apart from a handful of seemingly random users, everyone else have no issues.

We use SQL accounts for authentication and all users have permissions to fetch data from tables. I checked if this issue is only with certain kind of parameters, but there seems to no common denominator.

I’ve come up dry on PowerBI, Technet forums. I appreciate any help/troubleshooting steps. Thanks 🙂

WooCommerce mini cart fragments click event

I’m trying to add click event to the WooCommerce cart icon. However it doesn’t work I guess because of the WooCommerce Ajax fragments. I want to keep Ajax fragments active and just add click event on the icon.


if ( ! function_exists( 'arendelle_woo_cart_icon' ) ) {     function arendelle_woo_cart_icon() {          if ( ! arendelle_is_woocommerce_activated() ) {             return;         }          $  count = WC()->cart->get_cart_contents_count();         ?>          <div class="arendelle-menu-cart woocommerce">             <a class="arendelle-menu-cart__url arendelle-offcanvas-js-trigger" href="<?php echo esc_url( wc_get_cart_url() ); ?>" title="<?php echo esc_attr__( 'View my shopping cart', 'arendelle' ); ?>">                 <span class="arendelle-menu-cart__icon-holder">                     <i class="arendelle-icon-cart arendelle-menu-cart__icon"></i>                     <?php if ( 0 < $  count ) : ?>                         <span class="arendelle-menu-cart__count"><?php echo esc_html( $  count ); ?></span>                     <?php endif; ?>                 </span>             </a>              <?php if ( 0 < $  count ) {                 echo '<div class="arendelle-offcanvas">';                     echo '<div class="arendelle-offcanvas__panel">';                         woocommerce_mini_cart();                     echo '</div>';                     echo '<div class="arendelle-offcanvas__overlay elementor-clickable"></div>';                 echo '</div>';             } ?>         </div>         <?php      } } 


    cartOffcanvas: function() {         let trigger = document.querySelector('.arendelle-offcanvas-js-trigger');         let panel = document.querySelector('.arendelle-offcanvas__panel');         let overlay = document.querySelector('.arendelle-offcanvas__overlay');           console.log(trigger);          trigger.addEventListener('click', function(e) {             e.preventDefault();             e.stopImmediatePropagation();              console.log('clicked');             panel.classList.add('arendelle-offcanvas__panel--is-open');                  });      }, 

How to remove click ads from fresh WordPress site?

I bought a hosting and domain from Godaddy, Installed WordPress. Now the site is showing ads on every page after clicking anywhere on the pages or in the admin section as well. I have tried manual WordPress install also, changed the cPanel password, FTP password. Removed all files before fresh install. It starts showing ads immediately after install. Please suggest a solution.

How can I destroy all enemies with the click of a button?

I want to add a booster. For example, when the score is 50, I draw a Texture. When the user clicks on this Texture, I want the enemies on the screen to disappear and return to the original speed. I have completed the drawing process. How can I get this new texture to destroy all enemies on the screen when clicked? Should I do it under public boolean touchDown?

public class Game extends ApplicationAdapter implements InputProcessor { SpriteBatch batch;  Texture background;   Texture health;  Texture virus;  Texture bigvirus;  Texture medicine;  Texture radiation; Texture booster;  //new things to try private Vector2 vector2; Sprite boosterSprite;      BitmapFont font; FreeTypeFontGenerator fontGen;  Random random = new Random(); Array<Items> itemsArray = new Array<Items>();             int lives = 0; int score = 0;  float genCounter = 0; private final float startGenSpeed = 1.1f;  //başlatma hızı float genSpeed = startGenSpeed;   private double currentTime; private double gameOverTime = -1.0f;      @Override public void create () {     batch = new SpriteBatch();     background = new Texture("backgroundlungs.png");     health = new Texture("health.png");     virus = new Texture("virus.png");     bigvirus = new Texture("bigvirus.png");     medicine = new Texture("medicine.png");     radiation = new Texture("radiation.png");     booster = new Texture("booster.png");        vector2=new Vector2();     boosterSprite=new Sprite(booster);     boosterSprite.setPosition((*9,( 10)*8);         Items.radius = Math.max(, / 13f;   //resim boyutları buradan ayarlanıyor     Gdx.input.setInputProcessor(this);      fontGen = new FreeTypeFontGenerator(Gdx.files.internal("robotobold.ttf"));     FreeTypeFontGenerator.FreeTypeFontParameter params = new FreeTypeFontGenerator.FreeTypeFontParameter();     params.color = Color.WHITE;     params.size = 50;     params.characters = "0123456789 ScreCutoplay:.+-";     font = fontGen.generateFont(params);  }    @Override public void render () {     batch.begin();     batch.draw(background,0,0,,;       double newTime = TimeUtils.millis() / 1000.0;     System.out.println("newTime: " + newTime);     double frameTime = Math.min(newTime - currentTime,0.3);     System.out.println("frameTime: " + frameTime);     float deltaTime = (float) frameTime;     System.out.println("deltaTime: " + deltaTime);     currentTime = newTime;       if (lives <= 0 && gameOverTime == 0f) {         //gameo         gameOverTime = currentTime;     }      if (lives > 0 ) {         //game mode          genSpeed -= deltaTime * 0.0075f;    //item yoğunluğunu buradan ayarliyoruz.          System.out.println("genspeed: " + genSpeed);         System.out.println("gencounter: " + genCounter);          if (genCounter <= 0f) {             genCounter = genSpeed;             addItem();         } else {             genCounter -= deltaTime;         }          for (int i = 0; i< lives; i++) {             batch.draw(health,i*30f + 20f,,25f,25f);         }          for (Items items : itemsArray) {             items.update(deltaTime);              switch (items.type) { //dikdörtgen sıkıntı yapabilir.                 case REGULAR:                     batch.draw(virus,items.getPos().x, items.getPos().y, Items.radius,Items.radius);                     break;                 case EXTRA:                     batch.draw(bigvirus,items.getPos().x, items.getPos().y, Items.radius,Items.radius);                     break;                 case ENEMY:                     batch.draw(radiation,items.getPos().x, items.getPos().y, Items.radius,Items.radius);                     break;                 case LIFE:                     batch.draw(medicine,items.getPos().x, items.getPos().y, Items.radius,Items.radius);                     break;               }               if ( lives > 0 && score >= 10 ) {                  boosterSprite.draw(batch);              }                       boolean holdives = false;         Array<Items> toRemove = new Array<Items>();         for (Items items: itemsArray) {             if (items.outOfScreen()) {                 toRemove.add(items);                  if ( && items.type == REGULAR) {                     lives--;                     holdives = true;                     break;                 }              }         }          if (holdives) {             for (Items f : itemsArray) {        = false;             }         }          for (Items f : toRemove) {             itemsArray.removeValue(f,true);         }        }        font.draw(batch,"Score: " + score, 40,50);     if (lives <= 0) {         font.draw(batch,"Cut to play",*0.43f,*0.5f);     }       batch.end(); }  private  void addItem() {     float pos = random.nextFloat() * Math.max(,;      Items item = new Items(new Vector2(pos,-Items.radius),new Vector2(( * 0.5f - pos) * 0.3f + (random.nextFloat() - 0.5f),*0.5f));      float type = random.nextFloat();     if (type > 0.98) {         item.type = Items.Type.LIFE;     }else if (type > 0.88) {         item.type = Items.Type.EXTRA;     }else if (type > 0.809) {         item.type = Items.Type.ENEMY;       }       itemsArray.add(item);      }      @Override public void dispose () {     batch.dispose();     font.dispose();     fontGen.dispose();   }  @Override public boolean keyDown(int keycode) {     return false; }  @Override public boolean keyUp(int keycode) {     return false; }  @Override public boolean keyTyped(char character) {     return false; }    @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) {           return false;  }   @Override public boolean touchUp(int screenX, int screenY, int pointer, int button) {       return false; }  @Override public boolean touchDragged(int screenX, int screenY, int pointer) {         if (lives <= 0  && currentTime - gameOverTime > 2f ) {         //menu mode          gameOverTime = 0f;         score = 0;         lives = 4;         genSpeed = startGenSpeed;         itemsArray.clear();          }else {         //game mode          Array<Items> toRemove = new Array<Items>();         Vector2 pos = new Vector2(screenX, - screenY);         int plusScore =0;         for (Items f: itemsArray) {              System.out.println("distance: " + pos.dst2(f.pos));             System.out.println("distance: " + f.clicked(pos));             System.out.println("distance: "+ Items.radius * Items.radius + 1);                if (f.clicked(pos)) {                 toRemove.add(f);                  switch (f.type) {                     case REGULAR:                         plusScore++;                         break;                     case EXTRA:                         plusScore+=2;                         score++;                         break;                     case ENEMY:                         lives--;                         break;                     case LIFE:                         lives++;                         break;                   }             }         }            score += plusScore * plusScore;          for (Items f : toRemove) {             itemsArray.removeValue(f,true);          }           }      return false;      }    @Override public boolean mouseMoved(int screenX, int screenY) {     return false; }  @Override public boolean scrolled(float amountX, float amountY) {     return false; } 


public class Items {

public static float radius = 60f; Vector2 vector2; public static int boostX = / 10; public static int boostY= ( 10)*9;   public enum Type {     REGULAR, EXTRA, ENEMY, LIFE, BOOSTER }  Type type; Vector2 pos,velocity;    public boolean living =true;    Items (Vector2 pos, Vector2 velocity) {     this.pos = pos;       this.velocity = velocity;      type = Type.REGULAR;  }   public boolean clicked(Vector2 click) {     if (pos.dst2(click) <= radius * radius + 1) {         return true;      }      return false; }  public final Vector2 getPos() {     return pos; }  public boolean outOfScreen() {     return (pos.y < -2f * radius); }  public void update(float dt) {     velocity.y -= dt * ( * 0.2f);     velocity.x -= dt * Math.signum(velocity.x) * 4f;       pos.mulAdd(velocity,dt); }