This file contains hidden or 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
| #----------------------------------------------------------------- | |
| # Check if a Page is a Child of Another Page in WordPress | |
| # Returns true if a match was found. | |
| # | |
| # @param int $pageID | |
| # | |
| # @return bool | |
| # | |
| #----------------------------------------------------------------- | |
| function is_childPage($pageID) { |
This file contains hidden or 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
| var gulp = require('gulp'), | |
| gutil = require('gulp-util'), | |
| sass = require('gulp-sass'), | |
| csso = require('gulp-csso'), | |
| uglify = require('gulp-uglify'), | |
| concat = require('gulp-concat'); | |
| gulp.task('css', function () { | |
| gulp.src('./_includes/css/*.scss') |
This file contains hidden or 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
| ;HTC Wildfire | |
| %SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C8B | |
| %CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C8B&MI_01 | |
| %SingleBootLoaderInterface% = USB_Install, USB\VID_0BB4&PID_0C94 |
This file contains hidden or 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
| #----------------------------------------------------------------- | |
| # Checks if a particular user has a role. | |
| # Returns true if a match was found. | |
| # | |
| # @param string $role Role name. | |
| # @param int $user_id (Optional) The ID of a user. Defaults to the current user. | |
| # | |
| # @return bool | |
| # | |
| #----------------------------------------------------------------- |
This file contains hidden or 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
| /** | |
| * RedirectWPRegister() | |
| * Redirect from Default wordpress register page to custom register page. | |
| */ | |
| function RedirectWPRegister(){ | |
| $request = basename($_SERVER['REQUEST_URI']); | |
| if ($request == 'wp-login.php?action=register'): | |
| wp_redirect(site_url('/?page_id=776')); | |
| exit(); | |
| endif; |
This file contains hidden or 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
| function get_term_top_most_parent($term_id, $taxonomy){ | |
| // start from the current term | |
| $parent = get_term_by( 'id', $term_id, $taxonomy); | |
| // climb up the hierarchy until we reach a term with parent = '0' | |
| while ($parent->parent != '0'){ | |
| $term_id = $parent->parent; | |
| $parent = get_term_by( 'id', $term_id, $taxonomy); | |
| } | |
| return $parent; |
This file contains hidden or 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
| <system.webServer> | |
| <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"> | |
| <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/> | |
| <dynamicTypes> | |
| <add mimeType="text/*" enabled="true"/> | |
| <add mimeType="message/*" enabled="true"/> | |
| <add mimeType="application/javascript" enabled="true"/> | |
| <add mimeType="*/*" enabled="false"/> | |
| </dynamicTypes> | |
| <staticTypes> |
This file contains hidden or 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
| <rewrite> | |
| <rules> | |
| <rule name="Redirect domain.com to www" patternSyntax="Wildcard" stopProcessing="true"> | |
| <match url="*" /> | |
| <conditions> | |
| <add input="{HTTP_HOST}" pattern="domain.com" /> | |
| </conditions> | |
| <action type="Redirect" url="http://www.domain.com/{R:0}" /> | |
| </rule> | |
| </rules> |
This file contains hidden or 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
| /*--------------------------------------------------*/ | |
| /* SMS CLICKATELL | |
| * | |
| * Http API | |
| * | |
| * @param string user | |
| * @param string password | |
| * @param int api_id | |
| * @param int/"array" to (cellphone number) / "","","" | |
| * @param string text (sms message) |