Skip to content

Instantly share code, notes, and snippets.

View mehedidb's full-sized avatar

Mehedi Hasan Nahid mehedidb

View GitHub Profile
@mehedidb
mehedidb / parallax-translate3d.js
Created February 20, 2018 17:07 — forked from agragregra/parallax-translate3d.js
Smooth Parallax Scroll
$(window).scroll(function() {
var st = $(this).scrollTop() /10;
$(".object").css({
"transform" : "translate3d(0px, " + st + "%, .01px)",
"-webkit-transform" : "translate3d(0px, " + st + "%, .01px)"
});
});
@mehedidb
mehedidb / README.rst
Created February 26, 2018 07:06 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@mehedidb
mehedidb / WP-Problem-List.md
Last active September 22, 2018 14:42
WordPress Theme Development Problem Theme Development Requirment List.
@mehedidb
mehedidb / WP-Core-Transilation-API.php
Created February 28, 2018 13:45
WP-Core-Transilation-API, translate(), __(), _e(), _n(), _x(), _ex(), _nx(), esc_attr__(), esc_attr_e(), esc_attr_x(), esc_html__(), esc_html_e(), esc_html_x(), _n_noop(), _nx_noop(), translate_nooped_plural()
<?php
/**
* Core Translation API
*
* @package WordPress
* @subpackage i18n
* @since 1.2.0
*/
/**
@mehedidb
mehedidb / functions.php
Created February 28, 2018 17:05 — forked from i-like-robots/functions.php
Wordpress custom comment form
<?php
/**
* Comment form hidden fields
*/
function comment_form_hidden_fields()
{
comment_id_fields();
if ( current_user_can( 'unfiltered_html' ) )
{
@mehedidb
mehedidb / functions.php
Created February 28, 2018 17:11 — forked from jsit/functions.php
Customize WordPress comment form output
<?php
/**
* Rewrite the HTML for the author, email, and url comment fields
*/
function custom_comment_fields( $fields ) {
// https://codex.wordpress.org/Function_Reference/comment_form
$commenter = wp_get_current_commenter();
@mehedidb
mehedidb / comments-example.php
Created February 28, 2018 17:12 — forked from chrisguitarguy/comments-example.php
How to add custom fields to WordPress comments
<?php
/*
Plugin Name: Add Extra Comment Fields
Plugin URI: http://pmg.co/category/wordpress
Description: An example of how to add, save and edit extra comment fields in WordPress
Version: n/a
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: MIT
*/
@mehedidb
mehedidb / WP Customizer - Select
Created March 8, 2018 10:28 — forked from ajskelton/WP Customizer - Select
Add a Select field to the WordPress Customizer.
$wp_customize->add_setting( 'themeslug_select_setting_id', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'themeslug_sanitize_select',
'default' => 'value1',
) );
$wp_customize->add_control( 'themeslug_select_setting_id', array(
'type' => 'select',
'section' => 'custom_section', // Add a default or your own section
'label' => __( 'Custom Select Option' ),
@mehedidb
mehedidb / Customizer Api Fields Type.md
Created March 8, 2018 10:41
Customizer Panels and Field Types

Customizer Panels and Field Types.Refference

PANEL Here’s the basics of adding a new panel and section:

function prefix_customizer_register( $wp_customize ) {

	$wp_customize->add_panel( 'panel_id', array(
	    'priority' => 10,
@mehedidb
mehedidb / frontendDevlopmentBookmarks.md
Created May 25, 2018 13:11 — forked from obiPlabon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.