Skip to content

Instantly share code, notes, and snippets.

View jahir07's full-sized avatar

Jahirul Islam Mamun jahir07

  • Dhaka, Bangladesh
View GitHub Profile
#!/usr/bin/env php
<?php
foreach(glob("*.css") as $css){
echo "wp_enqueue_style( 'wptheme-{$css}', get_template_directory_uri().'/css/{$css}',null,'1.0');\n";
}
@jahir07
jahir07 / enq-js.php
Last active August 29, 2015 14:22 — forked from hasinhayder/enq-js.php
#!/usr/bin/env php
<?php
foreach(glob("*.js") as $js){
echo "wp_enqueue_script( 'wptheme-{$js}', get_template_directory_uri().'/js/{$js}', array('jquery'),'1.0',true);\n";
}
@jahir07
jahir07 / form.html
Last active August 29, 2015 14:23 — forked from AminulBD/form.html
<form class="newsletter-form top-margin-80 aw-mc-ajax-form" action="<?php echo admin_url( 'admin-ajax.php'); ?>" method="post">
<input name="action" type="hidden" value="aw_chimp_subscribe">
<div class="field-inside">
<i class="fa fa-envelope-o"></i>
<input type="text" name="email" class="email-field" placeholder="Type your email address...">
<button type="submit">
<span cLass="subscribe-text">
<?php _e( 'Subscribe', 'appsworld' ); ?>
</span>
<span cLass="ajax-loader">
@jahir07
jahir07 / form.html
Last active August 29, 2015 14:23 — forked from AminulBD/form.html
<form class="newsletter-form top-margin-80 aw-mc-ajax-form" action="<?php echo admin_url( 'admin-ajax.php'); ?>" method="post">
<input name="action" type="hidden" value="aw_chimp_subscribe">
<div class="field-inside">
<i class="fa fa-envelope-o"></i>
<input type="text" name="email" class="email-field" placeholder="Type your email address...">
<button type="submit">
<span cLass="subscribe-text">
<?php _e( 'Subscribe', 'appsworld' ); ?>
</span>
<span cLass="ajax-loader">
@jahir07
jahir07 / image-upload-field-custom-taxonomy
Created October 6, 2015 04:15 — forked from mathetos/image-upload-field-custom-taxonomy
Add Image Upload Field to Custom Taxonomy
<?php
/* Add Image Upload to Series Taxonomy */
// Add Upload fields to "Add New Taxonomy" form
function add_series_image_field() {
// this will add the custom meta field to the add new term page
?>
<div class="form-field">
<label for="series_image"><?php _e( 'Series Image:', 'journey' ); ?></label>
//disable redux dev mode
if ( ! function_exists( 'wppoliticalz_redux_disable_dev_mode_plugin' ) ) {
function wppoliticalz_redux_disable_dev_mode_plugin( $redux ) {
if ( $redux->args['opt_name'] != 'redux_demo' ) {
$redux->args['dev_mode'] = false; //helps to disable dev mode but in localhost ad still appear
$redux->args['forced_dev_mode_off'] = false; //helps to disable ad totally
}
}
add_action( 'redux/construct', 'wppoliticalz_redux_disable_dev_mode_plugin' );
<?php
/*
Register Fonts
*/
function studio_fonts_url() {
$font_url = '';
/*
Translators: If there are characters in your language that are not supported
by chosen font(s), translate this to 'off'. Do not translate into your own language.
@jahir07
jahir07 / PHP Countries Array
Created July 29, 2017 18:15 — forked from DHS/PHP Countries Array
PHP array of all country names
<?php
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island
@jahir07
jahir07 / WPGeoQuery.md
Created August 3, 2017 19:08 — forked from jackabox/WPGeoQuery.md
WordPress Geo Location Query

WP Geo Query

Quick and easy class created to modify the WP_Query on specific calls and pull in all posts within a radius from a given latitude and longitude.