Skip to content

Instantly share code, notes, and snippets.

View asufian97's full-sized avatar
🎯
Focusing

Abu Sufian asufian97

🎯
Focusing
  • front-end/wordpress developer
  • Sylhet,Bangladesh
View GitHub Profile
@asufian97
asufian97 / Add Color Swatches using hex values.md
Created October 14, 2021 04:58 — forked from carolineschnapp/Add Color Swatches using hex values.md
Add Color swatches to #Brooklyn theme. Use hexadecimal values or images.

What we want

We want to go from this:

Alt text

... to that:

Alt text

@asufian97
asufian97 / function.php
Last active January 5, 2019 04:55 — forked from braginteractive/extras.php
WordPress Filter to change the Custom Logo class
/**
* Changes the class on the custom logo in the header.php
*/
function helpwp_custom_logo_output( $html ) {
$html = str_replace('custom-logo-link', 'navbar-brand', $html );
return $html;
}
add_filter('get_custom_logo', 'helpwp_custom_logo_output', 10);
@asufian97
asufian97 / shortcode.php
Created October 31, 2018 14:27 — forked from hasinhayder/shortcode.php
Learn With Hasin Hayder - Shortcode Examples
<?php
function philosophy_button( $attributes ) {
$default = array(
'type'=>'primary',
'title'=>__("Button",'philosophy'),
'url'=>'',
);
$button_attributes = shortcode_atts($default,$attributes);
@asufian97
asufian97 / style.css
Created April 3, 2018 02:53 — forked from jbutko/style.css
CSS, Safari: Target only Safari browser
@media screen and (-webkit-min-device-pixel-ratio:0) {
/* Safari and Chrome */
.flex-direction-nav-featured a{
margin-top: 4%;
}
/* Safari only override */
::i-block-chrome,.flex-direction-nav-featured a{
margin-top: 5%;
}
@asufian97
asufian97 / javascript_resources.md
Created December 4, 2017 01:25 — forked from cwulff/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@asufian97
asufian97 / foundation4-topbar-menu.php
Created November 12, 2017 00:41 — forked from awshout/foundation4-topbar-menu.php
WordPress Menu & Walker for ZURB's Foundation 4 Top Bar
<?php
add_theme_support('menus');
/**
* Register Menus
* http://codex.wordpress.org/Function_Reference/register_nav_menus#Examples
*/
register_nav_menus(array(
'top-bar-l' => 'Left Top Bar', // registers the menu in the WordPress admin menu editor
'top-bar-r' => 'Right Top Bar'
@asufian97
asufian97 / add-custom-post-type-menu.php
Created October 24, 2017 14:38 — forked from tommcfarlin/add-custom-post-type-menu.php
[WordPress] Add a custom post type menu as a child of an existing custom post type menu.
<?php
// Define the 'Portfolio' post type. This is used to represent galleries
// of photos. This will be our top-level custom post type menu
$args = array(
'labels' => array(
'all_items' => 'Gallery',
'menu_name' => 'Portfolio',
'singular_name' => 'Gallery',
'edit_item' => 'Edit Gallery',