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 | |
/* | |
Copyright 2018 - Pirenko Studio | |
MIT License | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CO |
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 | |
/** | |
* Get all type posts | |
* | |
* @return void | |
* @author alispx | |
**/ | |
function alispx_get_type_posts_data( $post_type = 'post' ) { |
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
<html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<style> | |
.container { | |
display: flex; | |
flex-direction: row; | |
max-width: 100%; |
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 to functions.php. Replace country_code with a CCTLD | |
*/ | |
function wp_job_manager_region_bias() { | |
return 'country_code'; | |
} | |
add_filter( 'job_manager_geolocation_region_cctld', 'wp_job_manager_region_bias' ); |
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 | |
/* | |
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. |
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
/** | |
* Return an array of fields which will repeat (have multiple rows) | |
* | |
* Subfields should be named group_fieldname[] | |
* | |
* @return array | |
*/ | |
function get_custom_repeated_field_fields() { | |
return array( | |
'field1' => array( |
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
// global.js | |
// Global debug logger | |
var debug = true, | |
log = function(s){ | |
if(debug) { | |
console.log(s); | |
} | |
}; |
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 | |
$options = array( | |
'required' => array('id','equals',array( 1,3 ) ) // Multiple values | |
); | |
$options = array( | |
'required' => array('id','equals', array( 1 ) ) // Single value | |
); |
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 | |
/** | |
* Lightens/darkens a given colour (hex format), returning the altered colour in hex format.7 | |
* @param str $hex Colour as hexadecimal (with or without hash); | |
* @percent float $percent Decimal ( 0.2 = lighten by 20%(), -0.4 = darken by 40%() ) | |
* @return str Lightened/Darkend colour as hexadecimal (with hash); | |
*/ | |
function color_luminance( $hex, $percent ) { | |
// validate hex string |
NewerOlder