This file contains hidden or 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
div.post-content { display:none; } a.continue-button { color: white; } |
This file contains hidden or 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 | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; //this line only needed for pagination | |
$args = array( | |
'cat' => 7, | |
'paged' => $paged //this line only needed for pagination | |
); | |
// The Query | |
$the_query = new WP_Query( $args ); | |
// The Loop |
This file contains hidden or 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 | |
/* | |
INSTRUCTIONS: | |
Use at your own risk. Backup your database before continuing. | |
1. Copy code to a file in the root of your website. | |
2. Change YOUR_SITE_ROOT to a value that makes sense. | |
3. Execute by visiting the page. Verify before/after results. | |
4. Change MAKE_CHANGES_TO_SITE to true and execute it again. |
This file contains hidden or 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 | |
/** | |
* Ban/Limit Email Domains for Gravity Form Email Fields | |
* http://gravitywiz.com/2012/11/11/banlimit-email-domains-for-gravity-form-email-fields/ | |
*/ | |
class GWEmailDomainControl { | |
private $_args; | |
function __construct($args) { |
This file contains hidden or 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 | |
$newOrder->ip = Yii::app()->request->userHostAddress; |
This file contains hidden or 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 | |
$this->render('//site/error', array('message' => 'hata mesajı', 'code' => '123')); |
This file contains hidden or 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 | |
$dataProvider=new CActiveDataProvider('Post', array( | |
'criteria'=>array( | |
'condition'=>'status=1', | |
'order'=>'create_time DESC', | |
'with'=>array('author'), | |
), | |
'pagination'=>array( | |
'pageSize'=>20, | |
), |
This file contains hidden or 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 | |
/* | |
doctrine ile kodlama yaparken mümkün oldukça array olarak döndürelim | |
--------------------------------------------------------------------- | |
*/ | |
public function getUserId($username) { | |
$user = Doctrine_Query::create() | |
->select('u.id, u.user_name') | |
->from('User u') |
This file contains hidden or 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 | |
// calculate start and end dates of the week | |
// 0 = Sunday | |
echo date("Y-m-d", strtotime(date("Y").'W'.date('W')."0")); | |
// 7 = Saturday | |
echo date("Y-m-d", strtotime(date("Y").'W'.date('W')."7")); |