- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
This file contains 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 | |
/** | |
* Template Name: Redirect to child page | |
* Description: Redirects to the top child page | |
* | |
* @package PUT YOUR THEME NAME HERE :D | |
*/ | |
global $post; |
This file contains 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 | |
add_action( 'after_switch_theme', 'theme_activated' ); | |
add_filter( 'intermediate_image_sizes_advanced', 'remove_default_sizes'); | |
function theme_activated() { | |
// Set thumbnail size in settings > media. | |
update_option( 'thumbnail_size_w', 150 ); | |
update_option( 'thumbnail_size_h', 150 ); | |
update_option( 'thumbnail_crop', 1 ); |
This file contains 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
<fieldset name="ADMIN_TEST"> | |
<field name="access" type="accesslevel" label="JFIELD_ACCESS_LABEL" description="JFIELD_ACCESS_DESC" class="span12 small" /> | |
<field name="cache_handler" type="cachehandler" default="" label="Cache Handler Field type" description="COM_CONFIG_FIELD_CACHE_HANDLER_DESC" filter="word" /> | |
<field name="mycalendar" type="calendar" default="5-10-2008" label="Select a date" description="" format="%d-%m-%Y" /> | |
<field name="captcha" type="plugins" folder="captcha" label="Captcha Selection field" description="COM_CONTACT_FIELD_CAPTCHA_DESC" default="" filter="cmd"> | |
<option value="">JOPTION_USE_DEFAULT</option> | |
<option value="0">JOPTION_DO_NOT_USE</option> | |
</field> | |
<field name="mycategory" type="category" extension="com_content" label="Select a category" description="" /> | |
<field name="show_title" type="checkbox" label="Show title" description="Show the title of the item" value="1" /> |
This file contains 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 | |
add_filter( 'post_class', 'uikit_article_class' ); | |
function my_article_class($classes) { | |
if (!is_admin()) { | |
$classes[] = 'my-class'; | |
return $classes; |
This file contains 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
add_action('admin_footer','posts_status_color'); | |
function posts_status_color() { ?> | |
<style> | |
.status-draft{background: #FCE3F2 !important;} | |
.status-pending{background: #87C5D6 !important;} | |
.status-publish{/* no background keep wp alternating colors */} | |
.status-future{background: #C6EBF5 !important;} |
This file contains 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 | |
// no direct access | |
defined('_JEXEC') or die; | |
// Variables | |
$doc = JFactory::getDocument(); | |
$user = JFactory::getUser(); | |
$template = 'templates/' . $this->template; | |
// get html head data |
This file contains 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 | |
/** | |
* Core Post API | |
* | |
* @package WordPress | |
* @subpackage Post | |
*/ | |
// | |
// Post Type Registration |
This file contains 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 | |
/** | |
* @version $Id: router.php 1618 2012-09-21 11:23:08Z lefteris.kavadas $ | |
* @package K2 | |
* @author JoomlaWorks http://www.joomlaworks.net | |
* @copyright Copyright (c) 2006 - 2012 JoomlaWorks Ltd. All rights reserved. | |
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html | |
*/ | |
// no direct access |
This file contains 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
// получаем URL параметры | |
// var allVars = $.getUrlVars(); | |
// получаем значение параметра по его имени | |
// var byName = $.getUrlVar('name'); | |
$.extend({ | |
getUrlVars: function(){ | |
var vars = [], hash; |