Skip to content

Instantly share code, notes, and snippets.

View New custom post type wordpres.php
$labels = array (
'name' => _x ( 'Orase', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x ( 'Oras', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __ ( 'Orase', 'text_domain' ),
'parent_item_colon' => __ ( 'Oras parinte:', 'text_domain' ),
'all_items' => __ ( 'Toate orasele', 'text_domain' ),
'view_item' => __ ( 'Vezi orase', 'text_domain' ),
'add_new_item' => __ ( 'Adauga oras', 'text_domain' ),
'add_new' => __ ( 'Oras nou', 'text_domain' ),
'edit_item' => __ ( 'Editeaza oras', 'text_domain' ),
View new taxonomy wordpress.php
$labels = array (
'name' => _x ( 'Orase', 'taxonomy general name' ),
'singular_name' => _x ( 'Oras', 'taxonomy singular name' ),
'search_items' => __ ( 'Cauta orase' ),
'all_items' => __ ( 'Toate orasele' ),
'parent_item' => __ ( 'Oras parinte' ),
'parent_item_colon' => __ ( 'Oras parinte:' ),
'edit_item' => __ ( 'Editeaza oras' ),
'update_item' => __ ( 'Actualizeaza oras' ),
'add_new_item' => __ ( 'Adauna oras' ),
View placeholder.css
{selctor}::-webkit-input-placeholder { /* WebKit browsers */
color:#ddd !important;
}
{selctor}:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color:#ddd !important;
}
{selctor}::-moz-placeholder { /* Mozilla Firefox 19+ */
color:#ddd !important;
}
{selctor}:-ms-input-placeholder { /* Internet Explorer 10+ */
@Dexterstat
Dexterstat / new_gist_file.js
Created Apr 17, 2014
reached button jquery javascript
View new_gist_file.js
$(document).ready(function() {
$(window).scroll(function() {
if ($('body').height() <= ($(window).height() + $(window).scrollTop())) {
alert('Bottom reached!');
}
});
});
View Wp_ajax admin.php
add_action("wp_ajax_nopriv_refresh_tag", "refresh_tag_function");
add_action("wp_ajax_refresh_tag", "refresh_tag_function");
function refresh_tag_function()
{
}
@Dexterstat
Dexterstat / htmls+css
Created Apr 15, 2014
position middle horizontal and vertical
View htmls+css
<div class="loginDiv"></div>
.loginDiv {
position: absolute;
left: 50%;
top: 50%;
text-align: center;
background-image: url('Images/loginBox.png');
width:546px;
height:265px;
@Dexterstat
Dexterstat / wp_query.php
Created Apr 15, 2014
wp_query select post that are specific to a caetgory, with a taxonomy and numer of post and page numver
View wp_query.php
$args = array(
'post_type' => 'post',
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'movie_genre',
'field' => 'slug',
'terms' => array( 'action', 'comedy' )
),
array(
@Dexterstat
Dexterstat / currentdate.js
Created Mar 6, 2014
Current date on javascript
View currentdate.js
var currentDate = new Date()
var day = currentDate.getDate()
var month = currentDate.getMonth() + 1
var year = currentDate.getFullYear()
View get_post_by_title.php
/**
* Get id from post title
*
* @version 0.01
* @access internal
* @author Agavriloaie Marius <contact@dexblog.ro>
*
* @param none
* @return none
* =====================================================================================================
View loadedgooglemaps.js
google.maps.event.addListenerOnce(theMap, 'tilesloaded', function(){
//action
});