Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Plugin Name: Autor wpisu
Description: Dodaje informację o autorze na końcu każdego wpisu
Author: ziemekpr0@gmail.com
Author URI: https://wpadmin.pl
*/
function wpa_post_author($content) {
<?php
/*
Plugin Name: Shortcode - autor wpisu
Description: Dodaje informację o autorze. Użycie: [wpa_post_author]
Author: ziemekpr0@gmail.com
Author URI: https://wpadmin.pl
*/
function wpa_post_author() {
@ziemekpr0
ziemekpr0 / send.php
Last active May 15, 2017 18:15
Funkcja wysyłająca wiadomości email przy pomocy frameworku CodeIgniter
<?php
function send_email($recipent_email, $subject, $message)
{
$this->load->library('email');
$this->email->from('no-reply@domena.pl', 'Nadawca');
$this->email->to($recipent_email);
$this->email->subject($subject);
$this->email->message($message);
@ziemekpr0
ziemekpr0 / config.php
Created May 15, 2017 18:03
Konfiguracja CodeIgniter do wysyłania wiadomości ze skrzynki utworzonej na serwerach nazwa.pl
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config = array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://nazwa-klienta-nazwa.nazwa.pl',
'smtp_port' => '465',
'smtp_user' => 'nazwa@domena.pl',
'smtp_pass' => 'haslo-do-skrzynki',
'mailtype' => 'html'
);
@ziemekpr0
ziemekpr0 / config.php
Created May 15, 2017 18:00
Konfiguracja CodeIgniter do wysyłania email ze skrzynki gmail
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// Aby to zadzialalo nalezy włączyć Zezwalanie mniej bezpiecznym aplikacjom na dostęp do konta
$config = array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => '465',
'smtp_user' => 'adres-skrzynki@gmail.com',
'smtp_pass' => 'haslo-do-skrzynki'
);
@ziemekpr0
ziemekpr0 / intro-wp.php
Created April 26, 2017 18:23
Strona WordPress intro z 3 linkami do artykułu na wpadmin.pl
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<?php wp_head(); ?>
<style>
@ziemekpr0
ziemekpr0 / index.php
Created January 8, 2017 19:44
Dennito v3
<?php global $theme; get_header(); ?>
<div id="main">
<?php $theme->hook('main_before'); ?>
<div id="content">
<?php $theme->hook('content_before'); ?>
@ziemekpr0
ziemekpr0 / index.php
Created January 8, 2017 15:39
Dennito dwa bloki reklamow V2
<?php global $theme; get_header(); ?>
<div id="main">
<?php $theme->hook('main_before'); ?>
<div id="content">
<?php $theme->hook('content_before'); ?>
@ziemekpr0
ziemekpr0 / index.php
Last active January 8, 2017 10:20
Kod reklamy w drugim bloku. Motyw denitto.
<?php global $theme; get_header(); ?>
<div id="main">
<?php $theme->hook('main_before'); ?>
<div id="content">
<?php $theme->hook('content_before'); ?>
<?php
/**
* Plugin Name: Title shortcode
* Description: Turns support for shortcodes placed in post/page title
* Version: 1.0
* Author: ziemekpr0
* Author Email: ziemekpr0@gmail.com
* Author URI: http://wpadmin.pl
* License: GPLv2 or later
*/