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
#!/usr/bin/perl | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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
{% api %} | |
{% for index, item in api %} | |
{{ item.link | url_to_hyphen | build_permalink_for 2 }} | |
{% endfor%} |
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 | |
// taruh ini dalam the loop | |
// post id adalah id post yang akan di exclude | |
if($post->ID != 5 && $post->ID != 10){ | |
echo spp(single_post_title(), 'template.html'); | |
} | |
?> |
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 | |
if(is_search()){ | |
echo spp(get_search_query(), 'metadesc.html') | |
} | |
?> |
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
DELETE * FROM `images` where local_url = ''; |
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
App::missing(function($exception) | |
{ | |
return Redirect::to('/'); | |
}); |
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 | |
Route::get('seed', function(){ | |
Artisan::call('db:seed'); | |
}); |
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
{% video %} | |
{% for index, v in videos %} | |
<iframe class="youtube-player" type="text/html" width="560" height="315" src="http://www.youtube.com/embed/{{ v.link | get_video_id }}" frameborder="0"> | |
</iframe> | |
<p><img src="http://img.youtube.com/vi/{{ v.link | get_video_id }}/hqdefault.jpg" align="left"/>{{ v.title }}. | |
<br> | |
<strong>Download {{ v.title }}</strong> | |
<a href="http://keepvid.com/?url={{ v.link }}">MP4</a> | | |
<a href="http://keepvid.com/?url={{ v.link }}">FLV</a> | | |
<a href="http://keepvid.com/?url={{ v.link }}">3GP</a> | |
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
{% api %}{% image %} | |
{% for index, item in api%} | |
{% for imageindex, image in images %} | |
{% if index < 5 %} | |
{% if index == imageindex %} | |
<div class="entry clearfix"> | |
<a href="{{ item.link }}" rel="nofollow" title="{{ item.title }}"><img src="{{ image.mediaurl }}" alt="{{ image.title }}"></a> | |
<h2 class="post-title"><a rel="nofollow" href="{{ item.link }}" title="{{ item.title }}">{{ item.title }}</a></h2> |
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
function fb_change_search_url_rewrite() { | |
if ( is_search() && ! empty( $_GET['s'] ) ) { | |
$keywords = get_query_var( 's' ); | |
list($first_word) = explode(' ', trim($keywords)); | |
wp_redirect( home_url( $first_word ) . urlencode( $keywords ) ); | |
exit(); | |
} | |
} | |
add_action( 'template_redirect', 'fb_change_search_url_rewrite' ); |