Skip to content

Instantly share code, notes, and snippets.

View fencermonir's full-sized avatar

Md. Monir Hossain fencermonir

View GitHub Profile
* Downloaded or downloading
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@fencermonir
fencermonir / Create-Custom-Fields-in-Woocommerce-Checkout-Page.md
Created September 15, 2018 13:52 — forked from nadeem-khan/Create-Custom-Fields-in-Woocommerce-Checkout-Page.md
Create Custom Fields in Woocommerce Checkout Page and Display them in Orders Details Page in Admin Area

Create Custom Fields in Woocommerce Checkout Page and Display them in Orders Details Page in Admin Area with this WordPress plugin:

<?php


/**
 * Plugin Name: Flowershop - WooCommerceCustomOverrides
 * Plugin URI: http://chillopedia.com
 * Description: Overrides WooCommerce Checkout Form Fields
  • Version: 1.0
@fencermonir
fencermonir / necessary_plugins.txt
Last active December 12, 2018 10:58
List of plugin to use for wordpress site.
#setup user role : nav-menu-roles
#menu login/logout: login-or-logout-menu-item
#menu item icon: menu-icons
#tesimonial: testimonial-free
#block frontend and backend by IP: iq-block-country
@fencermonir
fencermonir / list_of_function.html
Last active October 9, 2018 12:00
Here you can find WordPress necessary functions.
1. taxonomies for a post type or post object -> <a href="https://codex.wordpress.org/Function_Reference/get_object_taxonomies">get_object_taxonomies( $object, $output )</a>
2. get the taxonomy terms of custom post type -> wp_get_object_terms( $post->ID, 'your_taxonomy', array('fields' => 'ids') ) ->https://developer.wordpress.org/reference/functions/wp_get_object_terms/
@fencermonir
fencermonir / parse_url_with_query_string.php
Created October 8, 2018 13:01
Here's a simple use of parse_url. I needed a way for a page to retain get parameters but also edit or add onto them. I also had some pages that needed the same GET paramaters so I also added a way to change the path.
function singleton_query_url($url,$get,$value){
$url = parse_url($url);
if(array_key_exists('query', $url)){
if(checkQuery($get,$url['query'])){
$url['query'] = editQuery($url['query'],$get,$value);
} else {
$url['query'] = addQuery($url['query'],$get,$value);
}
$return = $url['path'] . '?' . $url['query'];
$return = (substr($return,-1) == "&")? substr($return,0,-1) : $return;
@fencermonir
fencermonir / wp-autopopulate-taxonomy
Created October 11, 2018 14:12 — forked from brenna/wp-autopopulate-taxonomy
WordPress function to auto-populate a taxonomy with a custom post type's entries.
function custom_tax_init(){
//set some options for our new custom taxonomy
$args = array(
'label' => __( 'My Custom Taxonomy' ),
'hierarchical' => true,
'capabilities' => array(
// allow anyone editing posts to assign terms
'assign_terms' => 'edit_posts',
/* but you probably don't want anyone
@fencermonir
fencermonir / remove_admin_menu_page.php
Created October 12, 2018 11:11
To Remove CPTUI plugin's submenu page.
/**
*
* to get the main menu name
* this will give all the register main menu information
* you hove to take the [2] index for main manu name
*
**/
function monir_debug_admin_menu() {
echo '<pre>' . print_r( $GLOBALS[ 'menu' ], TRUE) . '</pre>';
}
@fencermonir
fencermonir / url.php
Created October 16, 2018 07:52
This function use to get the current url.
function get_current_url() {
$pageURL = 'http';
if (array_key_exists('HTTPS', $_SERVER) && $_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return str_replace('www.', '', $pageURL);
@fencermonir
fencermonir / tinymce_field_types.txt
Created October 24, 2018 09:59
TINYMCE available field types.
{
type : 'listbox',
name : 'listbox',
label : 'listbox',
values : [
{ text: 'Test1', value: 'test1' },
{ text: 'Test2', value: 'test2' },
{ text: 'Test3', value: 'test3' }
],
value : 'test2' // Sets the default
@fencermonir
fencermonir / dynamic_meta_box.php
Created October 27, 2018 14:08
This is a php script to add meta boxes dynamically.
<?php
add_action( 'add_meta_boxes', 'thrive_add_post_meta_boxes_child' );
function thrive_add_post_meta_boxes_child() {
add_meta_box(
'bookbound-module-video-urls',
esc_html__( 'Video Info', 'thrive' ),
'bookbound_module_video_urls',
'page',
'normal',
'default'