سُلَيْمَان بْن دَاوُوْد
Aug 10, 20202 min read
Exposing ACF Fields to WP REST API
Exposing ACF Fields to REST API is pretty Simple with help of hooks add_filter('rest_prepare_{post_type_key}', 'acf_to_rest_api', 10, 3);...
Exposing ACF Fields to REST API is pretty Simple with help of hooks add_filter('rest_prepare_{post_type_key}', 'acf_to_rest_api', 10, 3);...
Code for Custom Post Type function custom_product_type() { $labels = array( 'name' => _x( 'Product', 'Post Type...
Often you see that you are presented with FTP screen while updating Plugin or find following happen when you try to update a plugin Here...
function horton_login_logo() { ?> <style type="text/css"> #login h1 a, .login h1 a { background-image: url(<?php echo...
sudo scp -r -i laurenmuseHQ /var/www/html/wp-content/uploads bootcamp1@bootcamp1.ssh.wpengine.net:/home/wpe-user/sites/bootcamp1/wp-cont...
<li data-aos="fade-in" data-aos-delay="80"> <a href="mailto:info@ma.orilg?subject=<?php echo get_the_title() ; ?>&body=<?php echo...
var maxHeight = 0; jQuery(".wprevpro_t1_DIV_2").each(function(){ if (jQuery(this).height() > maxHeight) { maxHeight =...
function hollycross_scripts() { wp_enqueue_style( 'clndrcss', get_template_directory_uri() . '/css/clndr.css', array(), _S_VERSION ); ...
public static function get_juridiction_city_from_user_zip($zipcode){ global $wpdb; $sql = "SELECT * FROM ".$wpdb->prefix."dk_speakou...
public static function function get_client_ip() { $ipaddress = ''; if (getenv('HTTP_CLIENT_IP')) $ipaddress =...
function blankslate_footer_scripts() { ?> <script> jQuery(document).ready(function ($) { var deviceAgent = navigator.userAgent.toLowerCas...
<!DOCTYPE html> <html> <head> <title></title> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="article"...
AJAX call in JavaScript jQuery('#forgetpassbutton').click(function(e){ e.preventDefault(); jQuery.ajax({ type: 'POST', url :...
add_filter( 'wp_nav_menu_items', 'kd_conditional_nav_items', 10, 2 ); function kd_conditional_nav_items( $menu, $args ) { if (...
/** * Add a custom product data tab */ add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' ); function woo_new_product_tab(...
Create a POST Request $postdata = array('name'=>'Hosting Transfer','price'=> '250'); $data_json = json_encode($postdata); $headers =...
<?php file_fix_directory(dirname(__FILE__)); function file_fix_directory($dir, $nomask = array('.', '..')) { if (is_dir($dir)) { // Try...
Code to Zip <?php //echo getcwd(); die; $rootPath = realpath('/home/cififacywac8/public_html'); // Initialize archive object $zip = new...
1- Delete unapproved comment DELETE from wp_comments WHERE comment_approved IN ('0','trash','spam','post-trashed') 2- Delete all...
This code creates a sample plugin that can export users from word press based on roles So logically the hook is as below add_action(...