Skip to content

Instantly share code, notes, and snippets.

@mixin placeholder {
::-webkit-input-placeholder {
@content;
}
::-moz-placeholder {
@content;
}
:-ms-input-placeholder {
@content;
}
$(document).ready(() => {
$("#add_bookmark").click(() => {
// Mozilla Firefox Bookmark
window.sidebar && window.sidebar.addPanel(location.href, document.title,"");
// IE Favorite
window.external && window.external.AddFavorite(location.href, document.title);
// Opera Hotlist
if( window.opera && window.print ) {
this.title=document.title;
return true;
@foxy-develop
foxy-develop / class_foxy_loadmore.php
Created November 12, 2019 23:09
class for create ajax load more button in wordpress
<?php
class Loadmore_Button {
public $article_wrapper = 'article-card';
public $post_per_load = 6;
public $button_text = 'Показать еще';
public $button_loading_text = 'Загрузка...';
public $button_data_attr = 'data-aos="fade-up"';
public $orderby = 'date';
public $article_class = '.all-news__item';
public $button_class = 'all-news__btn-more';
@foxy-develop
foxy-develop / rss_grabber.php
Created September 19, 2019 21:30
Grab RSS to ModX resources
<?php
if ($debug) {
$modx->setLogLevel(modx::LOG_LEVEL_DEBUG);
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$tstart = $mtime;
}
@foxy-develop
foxy-develop / xml_parser.php
Created September 19, 2019 20:27
Создание страниц через ssh из xml файла Modx
<?php
set_time_limit(0); //Включаю ошибки и убираю лимит по времени
error_reporting(E_ALL);
ini_set('php_flag display_errors','on');
ini_set('php_value error_reporting', E_ALL);
ini_set('display_errors','on');
ini_set('error_reporting', E_ALL);
$handles_out = fopen('assets/xml/comand.sh', 'a+');
$import_type = "assets/xml/Parametrs.xml";
fwrite($handles_out, "#!/bin/bash \r\n");
@foxy-develop
foxy-develop / package_install.php
Last active September 19, 2019 19:57
Быстрая установка всех необходимых пакетов Modx
<?php
// provider id => array of packages
$listPackagesToInstall = array(
1 => array( // standart modx provider
'Console'
, 'HitsPage'
, 'versionX'
, 'SEO Pro'
, 'translit'