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
orphan=$(pacman -Qdtq); [ -n "$orphan" ] && sudo pacman -Rns $orphan; sudo pacman -Scc --noconfirm; sudo rm -rf /tmp/*; sudo journalctl --vacuum-time=1d |
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 | |
/* | |
This is main file example of new empty module for PrestaShop 1.7 (yeah, 1.7 not 1.6); | |
There you need to change name of module, name of class, and 'ANY_VALUE' for those what you need; | |
This code you can copy to your main file and that is! Work! | |
Addition information you can find at: [[[http://doc.prestashop.com/display/PS16/Creating+a+first+module]]] where I taught it | |
*/ |
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 | |
require('./config/config.inc.php'); | |
//$tmp = new ProductCore(); | |
$product = new ProductCore(); | |
$product->ean13 = 9999999999999; | |
$product->name = array((int)Configuration::get('PS_LANG_DEFAULT') => 'Test importu');; | |
$product->link_rewrite = array((int)Configuration::get('PS_LANG_DEFAULT') => 'test-importu'); | |
$product->id_category = 2; |
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
/** | |
* Register widget area. | |
* | |
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar | |
*/ | |
function [name_of_theme]_widgets_init() | |
{ | |
register_sidebar(array( | |
'name' => esc_html__('Name of widget area', '[name_of_theme]'), | |
'id' => '[widget_area_unique_name]', //OnLy LoWeRcAsE!!!!!!!!!!!!!!!!!! else not save widgets on area |
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
/* | |
* example of simple widget | |
*/ | |
// Creating the widget popularNews | |
class nameOfWidget extends WP_Widget | |
{ | |
function __construct() | |
{ |
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 | |
require_once '../../../wp-load.php'; | |
$bloginfo = get_bloginfo('template_url'); | |
$jsonString = stripslashes($_POST['filter']); | |
$filterObj = new Filter($jsonString); | |
/* |
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 | |
$args = array( | |
'post_type' => 'product', | |
'stock' => 1, | |
'posts_per_page' => 9, | |
'orderby' => 'date', | |
'order' => 'DESC'); | |
$loop = new WP_Query($args); | |
while ($loop->have_posts()) : $loop->the_post(); | |
global $product; |
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
###################### | |
# Change html pagenavi for transform like bootstrap | |
###################### | |
//attach our function to the wp_pagenavi filter | |
add_filter( 'wp_pagenavi', 'wd_pagination', 10, 2 ); | |
//customize the PageNavi HTML before it is output | |
function wd_pagination($html) { | |
$out = ''; |
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
<ul> | |
<div id="container"> | |
<div id="content" role="main"> | |
<?php | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$args = array('category_name' => 'news', | |
'paged' => $paged, 'post_type' => 'post'); | |
$postslist = new WP_Query($args); |