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
validate = (val) -> | |
# boşluk karakterlerini kaldıralım | |
v = val.replace(/\s+/g, '').toUpperCase() | |
# http://tr.wikipedia.org/wiki/Türkiye_il_plaka_kodları adresindeki bilgi kullanılmıştır. | |
regex = /// ^ | |
(0[1-9]|[1-7][0-9]|8[01]) # İl kodu | |
( | |
([A-Z])(\d{4,5}) # "99 X 9999", "99 X 99999" | |
| ([A-Z]{2})(\d{3,4}) # "99 XX 999", "99 XX 9999" |
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
<?php | |
// HWM Framework Zend Autoloader'ını kullandığı için öncelikle | |
// Autoloader'a Hwm namespace'inin varlığını bildirmeliyiz. | |
require_once 'Zend/Loader/Autoloader.php'; | |
Zend_Loader_Autoloader::getInstance()->registerNamespace('Hwm'); | |
// Varsayılan servis MaxMind olduğu için servis sağlayıcı | |
// olarak Geobytes'ı kullanacağımızı da belirtmemiz gerekiyor. | |
try { |
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
<?php | |
class WordPress_Settings | |
{ | |
/** | |
* | |
* @var array | |
*/ | |
protected $_registry; | |
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
<?php | |
// ------------------------------------------------------------------ | |
// Add all your sections, fields and settings during admin_init | |
// ------------------------------------------------------------------ | |
// | |
function eg_settings_api_init() { | |
// Add the section to reading settings so we can add our fields to it | |
add_settings_section('eg_setting_section', 'Example settings section in reading', 'eg_setting_section_callback_function', 'reading'); | |