Skip to content

Instantly share code, notes, and snippets.

View maheshwaghmare's full-sized avatar
🎯
Focusing

Mahesh Waghmare maheshwaghmare

🎯
Focusing
View GitHub Profile
@maheshwaghmare
maheshwaghmare / generate-downloadable-file.php
Created March 27, 2017 06:15
WordPress Generate Downloadable File
/**
* Add below code in themes functions.php OR you can add this in your plugin too.
*
* Here,
*
* - We generate the `.json` file.
* - We can change the file type as per requirement.
*/
/**
@maheshwaghmare
maheshwaghmare / wp_theme_details.php
Last active April 6, 2017 05:24
Get WordPress theme details which are hosted on wordpress.org though API call
<?php
/**
* Get wordpress.org Theme Details
*
* @see https://codex.wordpress.org/WordPress.org_API#Themes
*/
/**
* Show Theme Details
*
@maheshwaghmare
maheshwaghmare / theme-has-5-distinct-issues
Last active April 19, 2017 05:01
WordPress Theme has more that 5 distinct issues.
Hello [THEME_AUTHOR],
Thanks for uploading the theme.
When your theme reaches to the top of the [https://themes.trac.wordpress.org/report/2 Review Queue], the reviewer will be assigned and review process will follow procedures found in the [https://make.wordpress.org/themes/handbook/review/required/ Theme Review Handbook].
The ticket will be closed as `not-approved` if the theme has more than `5 distinct issues`. So, Please check your theme against Theme Review Guidelines to avoid closing of the ticket.
'''Note: This is not a theme review.'''
@maheshwaghmare
maheshwaghmare / upload-theme-update
Created April 19, 2017 05:15
WordPress Theme upload theme
Hi [THEME_AUTHOR],
You need to update the current theme version from `style.css` and [https://wordpress.org/themes/upload/ upload the theme].
@maheshwaghmare
maheshwaghmare / wordpress-screenshot-guideline
Last active May 9, 2017 04:46
WordPress Theme screenshot guideline
Hi [THEME_AUTHOR],
You need to provide the screenshot.png which is the initial preview of your theme after theme active. @see [https://make.wordpress.org/themes/handbook/review/required/#screenshot Screenshot Guidelines]
'''NOTE: THIS IS NOT A THEME REVIEW.'''
@maheshwaghmare
maheshwaghmare / bootstrap-v3.3.7-grid-css-only.css
Last active May 19, 2021 07:05
Bootstrap v3.3.7 - Grid CSS Only
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2017 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*!
* Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=ca5af87b1e75892f45ab8dff3df3bfb2)
* Config saved to config.json and https://gist.github.com/ca5af87b1e75892f45ab8dff3df3bfb2
*/
@maheshwaghmare
maheshwaghmare / body_class.php
Last active May 29, 2020 18:59
Add / Remove classes from the body_class or post_class
<?php
function wpse15850_body_class( $wp_classes, $extra_classes )
{
// List of the only WP generated classes allowed
$whitelist = array( 'home', 'blog', 'archive', 'single', 'category', 'tag', 'error404', 'logged-in', 'admin-bar' );
// List of the only WP generated classes that are not allowed
$blacklist = array( 'home', 'blog', 'archive', 'single', 'category', 'tag', 'error404', 'logged-in', 'admin-bar' );
@maheshwaghmare
maheshwaghmare / override-woocommerce-from-plugin.php
Created May 4, 2017 07:26
Override default WooCommerce templates and template parts from plugin
<?php
/**
* Override default WooCommerce templates and template parts from plugin.
*
* E.g.
* Override template 'woocommerce/loop/result-count.php' with 'my-plugin/woocommerce/loop/result-count.php'.
* Override template part 'woocommerce/content-product.php' with 'my-plugin/woocommerce/content-product.php'.
*
* Note: We used folder name 'woocommerce' in plugin to override all woocommerce templates and template parts.
* You can change it as per your requirement.
@maheshwaghmare
maheshwaghmare / social-share-url-patterns.html
Last active May 13, 2017 09:54
Social Share URL Patterns. E.g. Facebook, Twitter, Google+, Pintrest, LinkedIn, Buffer, Digg etc.
<table>
<tr>
<th> Social Profile </th>
<th> Sample Share URL </th>
<th> Sample URL </th>
</tr>
<tr>
<td> Sharer </td>
<td><a target="_blank" href="https://www.facebook.com/sharer.php?u=https://maheshwaghmare.wordpress.com/2014/09/30/how-to-minify-css-js-less-sass/"> Sharer: </a></td>
<td><i>https://www.facebook.com/sharer.php?u={url}</i></td>
@maheshwaghmare
maheshwaghmare / social-share-url-patterns.txt
Created May 13, 2017 09:54
Social Share URL Patterns. E.g. Facebook, Twitter, Google+, Pintrest, LinkedIn, Buffer, Digg etc.
Sharer : https://www.facebook.com/sharer.php?u={url}
Twitter : https://twitter.com/intent/tweet?url={url}&text={title}&via={via}&hashtags={hashtags}
Google : https://plus.google.com/share?url={url}
Pinterest : https://pinterest.com/pin/create/bookmarklet/?media={img}&url={url}&is_video={is_video}&description={title}
LinkedIn : https://www.linkedin.com/shareArticle?url={url}&title={title}
Buffer : https://buffer.com/add?text={title}&url={url}
Digg : http://digg.com/submit?url={url}&title={title}
Tumblr : https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={desc}
Reddit : https://reddit.com/submit?url={url}&title={title}
StumbleUpon : http://www.stumbleupon.com/submit?url={url}&title={title}