This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Post multi-dimensional array to a URL using PHP Curl. | |
* Usage: | |
* $req = new MultiDimArrayPost(); | |
* $req->postToURL('http://xyz.com/post',$_POST); | |
* | |
* @package default | |
* @author Mohsin Rasool | |
* | |
**/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Disable PHP warnings | |
Description: This plugin disables php deprecated messages and warnings, | |
Version: 0.1 | |
Author: mohsinrasool | |
Author URI: https://mohsinrasool.pk | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------------------------- | |
# .gitignore for WordPress | |
# Bare Minimum Git | |
# http://ironco.de/bare-minimum-git/ | |
# ver 20150227 | |
# | |
# This file is tailored for a WordPress project | |
# using the default directory structure | |
# | |
# This file specifies intentionally untracked files to ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Step 1: Add "mobile-tab-dropdown" to Tab module | |
* Step 2: Add following script in Divi > Theme Options > Integration > "Add code to <body> tag" | |
*/ | |
jQuery(document).ready(function () { | |
if($('.mobile-tab-dropdown').length) { | |
var html = '<div id="tabs-mobile-dropdown" class="dropdown" style="position: relative;width: 100%;margin: 10px 0;">' | |
html += '<select class="select-style " style="background: white;width: 100%;">'; | |
$('.et_pb_tabs .et_pb_tabs_controls li').each(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'bbp_get_reply_author_link', 'my_append_badges_via_filter', 10, 2 ); | |
function my_append_badges_via_filter($author_link = '', $args) { | |
# Needed to get the user ID of the person intended to be displayed. | |
$user_id = bbp_get_reply_author_id( $args['post_id'] ); | |
#Construct your output here. | |
$badge_output = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Usage: <year-select offset=0 range=10 /> | |
* | |
*/ | |
app.directive('yearSelect',function(){ | |
var currentYear = new Date().getFullYear(); | |
return { | |
restrict: 'AE', | |
replace: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Javascript added in admin screens | |
* 1. Enable the "Minor edit - dont'update translation" by WPML checkbox by default on post editing screen | |
* | |
* @return void | |
* @author mohsinrasool | |
**/ | |
add_action('admin_footer', 'mr_admin_footer'); | |
function mr_admin_footer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Angular JS datepicker fix for mssql dates | |
* | |
*/ | |
app.directive('datepickerLocaldate', ['$parse', function ($parse) { | |
var directive = { | |
restrict: 'A', | |
require: ['ngModel'], | |
link: link | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This code retrieves course data from an external API and displays it in the user's | |
* My Account area. A merchant has noticed that there's a delay when loading the page. | |
* | |
* 1) What changes would you suggest to reduce or remove that delay? | |
* 2) Is there any other code changes that you would make? | |
*/ | |
public function add_my_courses_section() { | |
// MR - Todos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This file contains the fix. | |
*/ | |
/*global wc_add_to_cart_variation_params, wc_cart_fragments_params */ | |
/*! | |
* Variations Plugin | |
*/ | |
;(function ( $, window, document, undefined ) { |
NewerOlder