SVN
$ svnadmin create /path/to/repo
$ svn import /path/to/local/project http://example.com/svn/truck -m "Initial import"
GIT
$ git init
$ git add .
<?php | |
/* | |
Plugin Name: Custom Column Plugin Example | |
Plugin URI: https://www.davidangulo.xyz/portfolio/ | |
Description: Add a custom column on WordPress posts. | |
Version: 1.0.0 | |
Author: David Angulo | |
Author URI: https://www.davidangulo.xyz/ | |
License: GPL2 | |
*/ |
<?php | |
/* | |
Plugin Name: Create database table | |
Plugin URI: https://www.davidangulo.xyz/portfolio/ | |
Description: A simple WordPress plugin that creates a database table on activation. | |
Version: 1.0.0 | |
Author: David Angulo | |
Author URI: https://www.davidangulo.xyz/ | |
License: GPL2 | |
*/ |
<?php | |
/* | |
Plugin Name: Simple Contact Form | |
Plugin URI: https://www.davidangulo.xyz/portfolio/ | |
Description: A very simple contact form. | |
Version: 1.0.0 | |
Author: David Angulo | |
Author URI: https://www.davidangulo.xyz/ | |
License: GPL2 | |
*/ |
<?php | |
/* | |
Plugin Name: CRUD Operations | |
Plugin URI: https://www.davidangulo.xyz/portfolio/ | |
Description: A simple plugin that allows you to perform Create (INSERT), Read (SELECT), Update and Delete operations. | |
Version: 1.0.0 | |
Author: David Angulo | |
Author URI: https://www.davidangulo.xyz/ | |
License: GPL2 | |
*/ |
<?php | |
function timeago($datetime, $full = false) { | |
date_default_timezone_set("Asia/Manila"); | |
$now = new DateTime; | |
$ago = new DateTime($datetime); | |
$diff = $now->diff($ago); | |
$diff->w = floor($diff->d / 7); | |
$diff->d -= $diff->w * 7; | |
$string = array( |
<?php | |
function resize_image($filename,$newwidth,$newheight) { | |
list($width, $height) = getimagesize($filename); | |
if(pathinfo($filename,PATHINFO_EXTENSION) == "jpg" || pathinfo($filename,PATHINFO_EXTENSION) == "jpeg") { | |
$src = imagecreatefromjpeg($filename); | |
$dst = imagecreatetruecolor($newwidth, $newheight); | |
imagecopyresampled($dst, $src, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); | |
imagejpeg($dst, $filename, 100); | |
} | |
if(pathinfo($filename,PATHINFO_EXTENSION) == "png") { |
git clone repo | |
Make changes in git repo | |
svn copy http://plugins.svn.wordpress.org/repo/trunk/ http://plugins.svn.wordpress.org/repo/tags/X.X.X.X -m "Create X.X.X.X tag" | |
svn checkout http://plugins.svn.wordpress.org/repo/trunk/ | |
delete content on trunk | |
copy from git repo to trunk | |
svn add * | |
svn commit -m "release X.X.X.X" |
git clone repo | |
Make changes in git repo | |
svn copy http://plugins.svn.wordpress.org/repo/trunk/ http://plugins.svn.wordpress.org/repo/tags/X.X.X.X -m "Create X.X.X.X tag" | |
svn checkout http://plugins.svn.wordpress.org/repo/trunk/ | |
delete content on trunk | |
copy from git repo to trunk | |
svn add * | |
svn commit -m "release X.X.X.X" |
git clone repo | |
Make changes in git repo | |
svn copy http://plugins.svn.wordpress.org/repo/trunk/ http://plugins.svn.wordpress.org/repo/tags/X.X.X.X -m "Create X.X.X.X tag" | |
svn checkout http://plugins.svn.wordpress.org/repo/trunk/ | |
delete content on trunk | |
copy from git repo to trunk | |
svn add * | |
svn commit -m "release X.X.X.X" |