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 | |
| if (!function_exists('array_column')) { | |
| function array_column(array $array, $columnKey, $indexKey = null) | |
| { | |
| $result = array(); | |
| foreach ($array as $subArray) { | |
| if (!is_array($subArray)) { | |
| continue; | |
| } elseif (is_null($indexKey) && array_key_exists($columnKey, $subArray)) { | |
| $result[] = $subArray[$columnKey]; |
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
| document.getElementById('google_preview').innerHTML = '<span class="google_preview_title">' + document.getElementById('theme_metatitle').value + '</span><br/><span class="google_preview_seo_url">'+ domain_name_short + script_url + seo_url + '</span><br/><span class="google_preview_page_description">'+ document.getElementById('theme_metadescription').value+'</span>'; | |
| var img_id = 'google_preview_img'; | |
| if(typeof jQuery('#'+img_id).data('qtip') == 'object') | |
| { | |
| var api = jQuery('#'+img_id).qtip("api"); | |
| change_google_preview(); | |
| } | |
| else | |
| { | |
| jQuery('#'+img_id).qtip({ |
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
| <?=$form->field($offer, 'categories_list')->dropDownList( | |
| ArrayHelper::map($categories,'id',function($value){ return str_repeat('-',count(explode('.',$value->path) )) . $value->name ;} ), | |
| ['multiple' => true]); | |
| ?> |
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
| /** | |
| * Подстовляем дефис в интервал десятичных чисел | |
| * *1, 1.2, 1.3, 1.4, 2, 3 => result 1-1.4, 2, 3* | |
| * | |
| * @param $array | |
| * @param bool $str если TRUE возврощать будет страку | |
| * | |
| * @return array|string | |
| */ | |
| public static function spacing($array, $str = FALSE) |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
NewerOlder