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
// sth above | |
<?php if ( $related_posts->have_posts() ): ?> | |
<h3> Related Posts</h3> | |
<ul> | |
<?php while ( $related_posts->have_posts() ): $related_posts->the_post(); ?> | |
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?> </a></li> | |
<?php endwhile; ?> | |
</ul> | |
<?php endif; ?> |
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 | |
function _foo_handle_ajax_request_for_db_data() { | |
$path = parse_url (site_url()); | |
if ( parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) === $path['path'] . '/sth' ) { | |
status_header(200); | |
// do sth | |
exit ; |
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 | |
function update() { | |
global $wpdb; | |
// get the lead detail table name | |
$lead_details_table_name = RGFormsModel::get_lead_details_table_name(); | |
// as stored in the $lead_details_table_name * 10 |
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 | |
static function _modify_gravity_form_lead_detail_table($cat_id) { | |
global $wpdb; | |
$lead_details_table_name = RGFormsModel::get_lead_details_table_name(); | |
// get new category name | |
$new_name = $_POST['name']; | |
// get db category name |