• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

how to youtube api data to print in toolset metabox using a button click before save-post

phpwordpressbuttonclickmeta-boxesdevtoolset


PHP Snippet 1:

<script>
    jQuery('.Import').live('click', function(e) {
        e.preventDefault();
        jQuery('#save').click();
    });
              
    </script>

PHP Snippet 2:

$ytURL = get_post_meta(get_the_ID(), 'wpcf-song-av', true);

PHP Snippet 3:

$ytURL = $_POST['ytext'];

PHP Snippet 4:

<input id="textbox_id" name="ytext" placeholder="YT ID here" type="text" />
<input type="submit"  name="Import" class="Import" id="Import"  />

Related Snippets

Laravel - Browser displays message again when I press back button

Toggle between a textbox and a select using PHP

Shortcode or PHP inside a shortcode in Wordpress

How to create a cookie to store the timestamp of when a page is first loaded with php

Store multiple fields in JSON column (Nova CMS)

How to use React Router with Laravel?

Sum column values from multiple arrays

I'm trying to write a clean url for my website using the $_SERVER['REQUEST_URI'] in php

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

Docker image build with PHP zip extension shows "bundled libzip is deprecated" warning

Get WooCommerce products from specific category

How can I convert from a{a{} b{}} to a[a[],b[]] using php preg_match?

PHP header location absolute URL

PHP: remove filename from path

Symfony autowiring issues since docker update

About Contact Privacy policy Terms and conditions