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 ( $query->have_posts() ) { ?> | |
<?php $count = 0; ?> | |
<?php while ( $query->have_posts() ) { | |
$query->the_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
// JavaScript Document | |
function apfaddpost(posttitle,postqty,postlink,postcode,postdesc,postprice) { | |
jQuery.ajax({ | |
type: 'POST', | |
url: apfajax.ajaxurl, | |
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
function apf_post_form() | |
{ | |
?> | |
<form id="apfform" action="" method="post"enctype="multipart/form-data"> | |
<div id="apf-text"> | |
<input type="hidden" id="apflink" name="apflink" value="508"/> | |
<input type="hidden" id="apftitle" name="apftitle" value="SOI<?php the_ID();?>"/> | |
<input type="text" class="orderresult_qty" id="apfqty" name="apfqty"/> |
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
// JavaScript Document | |
function apfaddpost(posttitle,postqty,postlink,postcode,postdesc,postprice) { | |
jQuery.ajax({ | |
type: 'POST', | |
url: apfajax.ajaxurl, | |
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
define('APFSURL', WP_PLUGIN_URL."/".dirname( plugin_basename( __FILE__ ) ) ); | |
define('APFPATH', WP_PLUGIN_DIR."/".dirname( plugin_basename( __FILE__ ) ) ); | |
function apf_enqueuescripts() | |
{ | |
wp_enqueue_script('apf', APFSURL.'/js/apf.js', array('jquery')); | |
wp_localize_script( 'apf', 'apfajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); | |
} | |
add_action('wp_enqueue_scripts', apf_enqueuescripts); |
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_filter('uwpqsf_result_tempt', 'customize_output', '', 4); | |
function customize_output($results , $arg, $id, $getdata ){ | |
// The Query | |
$apiclass = new uwpqsfprocess(); | |
$query = new WP_Query( $arg ); | |
ob_start(); $result = ''; | |
// The Loop | |
if ( $query->have_posts() ) { ?> | |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |