increase volume in ubuntu by terminal
pactl — set-sink-volume 1 150%
pactl — set-sink-volume 1 150%
function post_published_notification( $post_id, $post ) { $author = $post->post_author; /* Post author ID. */ $name = get_the_author_meta( ‘display_name’, $author ); $email = get_the_author_meta( ‘user_email’, $author ); $title = $post->post_title; $permalink = get_permalink( $post_id ); $edit = get_edit_post_link( $post_id, ” ); $to[] = sprintf( ‘%s <%s>’, $name, $email ); $subject = sprintf( ‘Published: %s’, $title …
when post is published send email to admin email Read More »
function webpushr_signup_popup(){ window.open(‘https://app.webpushr.com/signup?url=<?= site_url();?>‘,“wpushr-signup-dialog”,“width=600, height=550, resizable=0, scrollbars=0, status=0, titlebar=0, left=” + ((screen.width – 600) / 2) + “, top=” + ((screen.height – 550) / 2) ); }
function dbk_enqueue_scripts() { wp_enqueue_script( ‘debugger_custom_js’, plugins_url( ‘js/debugger-kanha.js’, __FILE__ ), array() ); //load jquery wp_enqueue_script( ‘jquery’ ); //add ajax url wp_localize_script( ‘debugger_custom_js’, ‘dbk’, array( ‘ajaxurl’ => admin_url( ‘admin-ajax.php’ ))); } add_action( ‘admin_enqueue_scripts’, ‘dbk_enqueue_scripts’ ); //for ajax call add_action( ‘wp_ajax_dbk_ajax’, ‘dbk_ajax_subscribe’ ); output function function dbk_ajax_subscribe(){ echo ‘this is ajax subscribe form’; } <script> jQuery(document).ready(function() { // …
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <link href=“https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/css/select2.css” rel=“stylesheet” /> <script src=“https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js”></script> <script src=“https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.0/js/select2.js”></script> </head> <script> $(document).ready(function () { $(“select”).select2(); $(“select”).on(“select2:select”, function (evt) { var element = evt.params.data.element; var $element = $(element); $element.detach(); $(this).append($element); $(this).trigger(“change”); }); $(‘.js-example-basic-multiple’).select2(); }); </script> <body> <form action=“” method=“get”> <select style=“max-width:910%;“ class=“js-example-basic-multiple” name=“states[]” multiple=“multiple”> <option value=“AL”>Alabama</option> <option value=“B”>BAT</option> <option …
global $wpdb; $table_name = $wpdb->prefix . “wcmnd_analytics”; $email = “[email protected]”; $sql = “SELECT email FROM $table_name WHERE email =‘$email’ “; $existEmail = $wpdb->get_var($sql); if (!$existEmail) { echo ‘not exists’; } else{ echo ‘ exists’; }
if ( class_exists( ‘WooCommerce’ ) ) { // some code} else { / more code}
function wpb_adding_scripts() { wp_register_script(‘my_amazing_script’, plugins_url(‘amazing_script.js’, __FILE__), array(‘jquery’),‘1.1’, true); wp_enqueue_script(‘my_amazing_script’); } add_action( ‘wp_enqueue_scripts’, ‘wpb_adding_scripts’ ); refre= https://developer.wordpress.org/reference/functions/wp_register_script/ function wpb_adding_styles() { wp_register_style(‘my_stylesheet’, plugins_url(‘my-stylesheet.css’, __FILE__)); wp_enqueue_style(‘my_stylesheet’); } add_action( ‘wp_enqueue_scripts’, ‘wpb_adding_styles’ );
//function for copy to clipboard data function copyToClipboard(element) { var $temp = $(“<input>”); $(“body”).append($temp); $temp.val($(element).html()).select(); document.execCommand(“copy”); $temp.remove(); $(“.copy”).html(“Copied”); } //function for copy to clipboard data function tableCopy(element,id) { var $temp = $(“<input>”); $(“body”).append($temp); $temp.val($(element).html()).select(); document.execCommand(“copy”); $temp.remove(); // $(“#showAfterCopy”).show(); // $(id).html(“Copied”); $(“#liveToast”).toast(“show”); } //kanha best function for copy to clipboard data function copyNew() { var copyTextarea …
var formData = $(‘#contact_form’).serializeArray(); formData.push({ name: “<something>”, value: “<somevalue>” });submitForm(formData); var formdata = $(‘#post-form’).serializeArray(); formdata.push({ name: “action”, value: “create_post_shortcode” }); console.log(formdata);