php


Can't seem to return comment as a string


I need to return the comment form as a string so I can append it to a modal with js.
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
$fields = array(
'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Your name' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
'<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>',
'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email address' ) . '</label> ' . ( $req ? '<span class="required">*</span>' : '' ) .
'<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /><br /><span>We\'ll only send you an email when someone has commented on your post.</span></p>',
);
$comments_args = array(
'fields' => $fields,
'title_reply'=>'Post a comment',
'label_submit' => 'Post comment'
);
comment_form($comments_args, intval($_SESSION['thePostId']));
Have tried get_comment_form() but I get error.
Can anyone help cheers

Related Links

PHP Port Scanning
What is the difference between include and require except warning and fatel error [duplicate]
How to query the count result in this scenario in MYSQL/SQL?
Laravel User relations stoped working
Call to undefined method Illuminate\Database\Query\Builder::beforeFilter()
Override action in wordpress
PostgreSQL unable to divide?
Sending XML in SOAP with PHP
php sessions from one php page to another
Rotate an image on same page
How to make a MySQL generated table interactive PHP
Wordpress - $query, how to order users by lastname
Ajax - multi-lingual pages with forms
how to generate students mark ledger from 3 tables- Student,Mark,Subject
How to call function from different javascript page in php
Symfony : route containing '/'

Categories

HOME
plesk
functional-programming
couchdb
adobe
visual-studio-2010
apk
informatica
lvm
openfoam
facebook-android-sdk
ag-grid
firebase-database
kurento
azure-logic-apps
siesta
lda
twitter-oauth
fasm
slide
amazon-emr
live-streaming
pygobject
playframework-2.0
pickle
office-ui-fabric
node-webkit
data-type-conversion
dashdb
bsd
el
coreldraw
fido-u2f
pdf.js
dragula
fstar
offline-caching
basex
adapter
sparkle
bitbake
social-networking
winsock
instructions
plantuml
om-next
directfb
autoencoder
wdk
variable-variables
unification
text-decorations
python-sounddevice
oauth2
stat
game-center
oauth2-playground
raytracing
code-push
jshint
absolute
liteide
sonarqube5.2
webalizer
non-linear-regression
http-basic-authentication
lvalue
ltrace
maatwebsite-excel
mifos
ternary-operator
nunit-console
qpixmap
seadragon
lovefield
cryptojs
in-app-billing
ibm-was
cfwheels
asp.net-web-api-helppages
css-paged-media
blockquote
libz
abstract-factory
azure-xplat-cli
innerhtml
python-curses
ildasm
utf8-decode
object-code
webmethod
squeezebox
distributed-r
git-reset
jini
infinite
disjoint-union
google-code-prettify
2d-vector
icenium
xalan
cgrectmake
gitx
story
platform-independent
gaelyk
aptitude
eaccelerator
mongrel
facebook-fbml
projectpier
tacit-programming
gtktextview
gui-designer

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App