Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/twitter-.../admin
File: metabox.php
<?php
[0] Fix | Delete
if( !defined('ABSPATH') ){ exit();}
[1] Fix | Delete
add_action( 'add_meta_boxes', 'xyz_twap_add_custom_box' );
[2] Fix | Delete
$GLOBALS['edit_flag']=0;
[3] Fix | Delete
function xyz_twap_add_custom_box()
[4] Fix | Delete
{
[5] Fix | Delete
$posttype="";
[6] Fix | Delete
if(isset($_GET['post_type']))
[7] Fix | Delete
$posttype=$_GET['post_type'];
[8] Fix | Delete
[9] Fix | Delete
if($posttype=="")
[10] Fix | Delete
$posttype="post";
[11] Fix | Delete
[12] Fix | Delete
if(isset($_GET['action']) && $_GET['action']=="edit" && !empty($_GET['post'])) /// empty check added for fixing client scenario
[13] Fix | Delete
{
[14] Fix | Delete
$postid=intval($_GET['post']);
[15] Fix | Delete
[16] Fix | Delete
[17] Fix | Delete
$get_post_meta=get_post_meta($postid,"xyz_twap",true);
[18] Fix | Delete
if($get_post_meta==1){
[19] Fix | Delete
$GLOBALS['edit_flag']=1;
[20] Fix | Delete
}
[21] Fix | Delete
global $wpdb;
[22] Fix | Delete
$table='posts';
[23] Fix | Delete
$accountCount = $wpdb->query($wpdb->prepare( 'SELECT * FROM '.$wpdb->prefix.$table.' WHERE id=%d and post_status!=%s LIMIT %d,%d',array($postid,'draft',0,1) )) ;
[24] Fix | Delete
if($accountCount>0){
[25] Fix | Delete
$GLOBALS['edit_flag']=1;
[26] Fix | Delete
}
[27] Fix | Delete
$posttype=get_post_type($postid);
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
[31] Fix | Delete
if ($posttype=="page")
[32] Fix | Delete
{
[33] Fix | Delete
[34] Fix | Delete
$xyz_twap_include_pages=get_option('xyz_twap_include_pages');
[35] Fix | Delete
if($xyz_twap_include_pages==0)
[36] Fix | Delete
return;
[37] Fix | Delete
}
[38] Fix | Delete
else if($posttype=="post")
[39] Fix | Delete
{
[40] Fix | Delete
$xyz_twap_include_posts=get_option('xyz_twap_include_posts');
[41] Fix | Delete
if($xyz_twap_include_posts==0)
[42] Fix | Delete
return;
[43] Fix | Delete
}
[44] Fix | Delete
else if($posttype!="post")
[45] Fix | Delete
{
[46] Fix | Delete
[47] Fix | Delete
$xyz_twap_include_customposttypes=get_option('xyz_twap_include_customposttypes');
[48] Fix | Delete
[49] Fix | Delete
[50] Fix | Delete
$carr=explode(',', $xyz_twap_include_customposttypes);
[51] Fix | Delete
if(!in_array($posttype,$carr))
[52] Fix | Delete
return;
[53] Fix | Delete
[54] Fix | Delete
}
[55] Fix | Delete
$xyz_twap_tw_app_sel_mode=get_option('xyz_twap_tw_app_sel_mode');
[56] Fix | Delete
$xyz_twap_smapsoln_userid=get_option('xyz_twap_smapsoln_userid');
[57] Fix | Delete
if(((get_option('xyz_twap_twconsumer_id')!="" && get_option('xyz_twap_twconsumer_secret')!="" && get_option('xyz_twap_tw_id')!="" && get_option('xyz_twap_current_twappln_token')!="" && get_option('xyz_twap_twaccestok_secret')!="" && $xyz_twap_tw_app_sel_mode==0 )|| ( $xyz_twap_tw_app_sel_mode==1 && !empty($xyz_twap_smapsoln_userid))) && get_option('xyz_twap_twpost_permission')==1)
[58] Fix | Delete
add_meta_box( "xyz_twap", '<strong>WP Twitter Auto Publish </strong>', 'xyz_twap_addpostmetatags') ;
[59] Fix | Delete
}
[60] Fix | Delete
function xyz_twap_addpostmetatags()
[61] Fix | Delete
{
[62] Fix | Delete
$imgpath= plugins_url()."/twitter-auto-publish/images/";
[63] Fix | Delete
$heimg=$imgpath."support.png";
[64] Fix | Delete
$xyz_twap_catlist=get_option('xyz_twap_include_categories');
[65] Fix | Delete
// if (is_array($xyz_twap_catlist))
[66] Fix | Delete
// $xyz_twap_catlist=implode(',', $xyz_twap_catlist);
[67] Fix | Delete
?>
[68] Fix | Delete
<script>
[69] Fix | Delete
function displaycheck_twap()
[70] Fix | Delete
{
[71] Fix | Delete
var tcheckid=jQuery("input[name='xyz_twap_twpost_permission']:checked").val();
[72] Fix | Delete
if(tcheckid==1)
[73] Fix | Delete
{
[74] Fix | Delete
[75] Fix | Delete
document.getElementById("twmf_twap").style.display='';
[76] Fix | Delete
document.getElementById("twmftarea_twap").style.display='';
[77] Fix | Delete
document.getElementById("twai_twap").style.display='';
[78] Fix | Delete
}
[79] Fix | Delete
else
[80] Fix | Delete
{
[81] Fix | Delete
[82] Fix | Delete
document.getElementById("twmf_twap").style.display='none';
[83] Fix | Delete
document.getElementById("twmftarea_twap").style.display='none';
[84] Fix | Delete
document.getElementById("twai_twap").style.display='none';
[85] Fix | Delete
}
[86] Fix | Delete
[87] Fix | Delete
[88] Fix | Delete
}
[89] Fix | Delete
[90] Fix | Delete
[91] Fix | Delete
</script>
[92] Fix | Delete
<script type="text/javascript">
[93] Fix | Delete
function detdisplay_twap(id)
[94] Fix | Delete
{
[95] Fix | Delete
document.getElementById(id).style.display='';
[96] Fix | Delete
}
[97] Fix | Delete
function dethide_twap(id)
[98] Fix | Delete
{
[99] Fix | Delete
document.getElementById(id).style.display='none';
[100] Fix | Delete
}
[101] Fix | Delete
[102] Fix | Delete
[103] Fix | Delete
jQuery(document).ready(function() {
[104] Fix | Delete
displaycheck_twap();
[105] Fix | Delete
[106] Fix | Delete
var xyz_twap_twpost_permission=jQuery("input[name='xyz_twap_twpost_permission']:checked").val();
[107] Fix | Delete
XyzTwapToggleRadio(xyz_twap_twpost_permission,'xyz_twap_twpost_permission');
[108] Fix | Delete
var wp_version='<?php echo XYZ_TWAP_WP_VERSION; ?>';
[109] Fix | Delete
if (wp_version <= '5.3') {
[110] Fix | Delete
jQuery('#category-all').bind("DOMSubtreeModified",function(){
[111] Fix | Delete
twap_get_categorylist(1);
[112] Fix | Delete
});
[113] Fix | Delete
[114] Fix | Delete
twap_get_categorylist(1);twap_get_categorylist(2);
[115] Fix | Delete
jQuery('#category-all').on("click",'input[name="post_category[]"]',function() {
[116] Fix | Delete
twap_get_categorylist(1);
[117] Fix | Delete
});
[118] Fix | Delete
[119] Fix | Delete
jQuery('#category-pop').on("click",'input[type="checkbox"]',function() {
[120] Fix | Delete
twap_get_categorylist(2);
[121] Fix | Delete
});
[122] Fix | Delete
/////////gutenberg category selection
[123] Fix | Delete
jQuery(document).on('change', 'input[type="checkbox"]', function() {
[124] Fix | Delete
twap_get_categorylist(2);
[125] Fix | Delete
});
[126] Fix | Delete
}
[127] Fix | Delete
});
[128] Fix | Delete
[129] Fix | Delete
/****************** Code to reload metabox content in Gutenberg editor ******************/
[130] Fix | Delete
jQuery(document).ready(function($) {
[131] Fix | Delete
const appuntiStatusChange = ( function(){
[132] Fix | Delete
const isSavingMetaBoxes = wp.data.select( 'core/edit-post' ).isSavingMetaBoxes;
[133] Fix | Delete
var wasSaving = false;
[134] Fix | Delete
return {
[135] Fix | Delete
refreshMetabox: function(){
[136] Fix | Delete
var isSaving = isSavingMetaBoxes();
[137] Fix | Delete
if ( wasSaving && ! isSaving ) {
[138] Fix | Delete
//console.log("Post changed and saved.");
[139] Fix | Delete
var xyz_twap_default_selection_edit="<?php echo esc_html(get_option('xyz_twap_default_selection_edit'));?>";
[140] Fix | Delete
if(xyz_twap_default_selection_edit==0 && jQuery("input[name='xyz_twap_twpost_permission']:checked").val()==1) {
[141] Fix | Delete
document.getElementById("twmf_twap").style.display='none';
[142] Fix | Delete
document.getElementById("twmftarea_twap").style.display='none';
[143] Fix | Delete
document.getElementById("twai_twap").style.display='none';
[144] Fix | Delete
jQuery('#xyz_twap_twpost_permission_0').prop('checked',true);
[145] Fix | Delete
jQuery('#xyz_twap_twpost_permission_yes').removeClass('xyz_twap_toggle_on');
[146] Fix | Delete
jQuery('#xyz_twap_twpost_permission_yes').addClass('xyz_twap_toggle_off');
[147] Fix | Delete
jQuery('#xyz_twap_twpost_permission_no').removeClass('xyz_twap_toggle_off');
[148] Fix | Delete
jQuery('#xyz_twap_twpost_permission_no').addClass('xyz_twap_toggle_on');
[149] Fix | Delete
}
[150] Fix | Delete
else if(xyz_twap_default_selection_edit==1 && jQuery("input[name='xyz_twap_twpost_permission']:checked").val()==0) {
[151] Fix | Delete
document.getElementById("twmf_twap").style.display='';
[152] Fix | Delete
document.getElementById("twmftarea_twap").style.display='';
[153] Fix | Delete
document.getElementById("twai_twap").style.display='';
[154] Fix | Delete
jQuery('#xyz_twap_twpost_permission_1').prop('checked',true);
[155] Fix | Delete
jQuery('#xyz_twap_twpost_permission_no').removeClass('xyz_twap_toggle_on');
[156] Fix | Delete
jQuery('#xyz_twap_twpost_permission_no').addClass('xyz_twap_toggle_off');
[157] Fix | Delete
jQuery('#xyz_twap_twpost_permission_yes').removeClass('xyz_twap_toggle_off');
[158] Fix | Delete
jQuery('#xyz_twap_twpost_permission_yes').addClass('xyz_twap_toggle_on');
[159] Fix | Delete
}
[160] Fix | Delete
}
[161] Fix | Delete
wasSaving = isSaving;
[162] Fix | Delete
},
[163] Fix | Delete
}
[164] Fix | Delete
})();
[165] Fix | Delete
wp.data.subscribe( appuntiStatusChange.refreshMetabox );
[166] Fix | Delete
});
[167] Fix | Delete
/*************************************************************************************/
[168] Fix | Delete
function twap_get_categorylist(val)
[169] Fix | Delete
{
[170] Fix | Delete
var flag=true;
[171] Fix | Delete
var cat_list="";var chkdArray=new Array();var cat_list_array=new Array();
[172] Fix | Delete
var posttype="<?php echo get_post_type() ;?>";
[173] Fix | Delete
if(val==1){
[174] Fix | Delete
jQuery('input[name="post_category[]"]:checked').each(function() {
[175] Fix | Delete
cat_list+=this.value+",";flag=false;
[176] Fix | Delete
});
[177] Fix | Delete
}else if(val==2)
[178] Fix | Delete
{
[179] Fix | Delete
jQuery('#category-pop input[type="checkbox"]:checked').each(function() {
[180] Fix | Delete
cat_list+=this.value+",";flag=false;
[181] Fix | Delete
});
[182] Fix | Delete
jQuery('.editor-post-taxonomies__hierarchical-terms-choice input[type="checkbox"]:checked').each(function() { //gutenberg category checkbox
[183] Fix | Delete
cat_list+=this.value+",";flag=false;
[184] Fix | Delete
});
[185] Fix | Delete
if(flag){
[186] Fix | Delete
<?php
[187] Fix | Delete
if (isset($_GET['post']))
[188] Fix | Delete
$postid=intval($_GET['post']);
[189] Fix | Delete
if (isset($GLOBALS['edit_flag']) && $GLOBALS['edit_flag']==1 && !empty($postid)){
[190] Fix | Delete
$defaults = array('fields' => 'ids');
[191] Fix | Delete
$categ_arr=wp_get_post_categories( $postid, $defaults );
[192] Fix | Delete
$categ_str=implode(',', $categ_arr);
[193] Fix | Delete
?>
[194] Fix | Delete
cat_list+='<?php echo $categ_str; ?>';
[195] Fix | Delete
<?php }?> flag=false;
[196] Fix | Delete
[197] Fix | Delete
}
[198] Fix | Delete
}
[199] Fix | Delete
if (cat_list.charAt(cat_list.length - 1) == ',') {
[200] Fix | Delete
cat_list = cat_list.substr(0, cat_list.length - 1);
[201] Fix | Delete
}
[202] Fix | Delete
jQuery('#cat_list').val(cat_list);
[203] Fix | Delete
[204] Fix | Delete
var xyz_twap_catlist="<?php echo $xyz_twap_catlist;?>";
[205] Fix | Delete
if(xyz_twap_catlist!="All")
[206] Fix | Delete
{
[207] Fix | Delete
cat_list_array=xyz_twap_catlist.split(',');
[208] Fix | Delete
var show_flag=1;
[209] Fix | Delete
var chkdcatvals=jQuery('#cat_list').val();
[210] Fix | Delete
chkdArray=chkdcatvals.split(',');
[211] Fix | Delete
[212] Fix | Delete
for(var x=0;x<chkdArray.length;x++) {
[213] Fix | Delete
[214] Fix | Delete
if(inArray(chkdArray[x], cat_list_array))
[215] Fix | Delete
{
[216] Fix | Delete
show_flag=1;
[217] Fix | Delete
break;
[218] Fix | Delete
}
[219] Fix | Delete
else
[220] Fix | Delete
{
[221] Fix | Delete
show_flag=0;
[222] Fix | Delete
continue;
[223] Fix | Delete
}
[224] Fix | Delete
[225] Fix | Delete
}
[226] Fix | Delete
[227] Fix | Delete
if(show_flag==0 && posttype=="post")
[228] Fix | Delete
jQuery('#xyz_twMetabox').hide();
[229] Fix | Delete
else
[230] Fix | Delete
jQuery('#xyz_twMetabox').show();
[231] Fix | Delete
}
[232] Fix | Delete
}
[233] Fix | Delete
function inArray(needle, haystack) {
[234] Fix | Delete
var length = haystack.length;
[235] Fix | Delete
for(var i = 0; i < length; i++) {
[236] Fix | Delete
if(haystack[i] == needle) return true;
[237] Fix | Delete
}
[238] Fix | Delete
return false;
[239] Fix | Delete
}
[240] Fix | Delete
[241] Fix | Delete
[242] Fix | Delete
</script>
[243] Fix | Delete
<table class="xyz_twap_metalist_table">
[244] Fix | Delete
<input type="hidden" name="cat_list" id="cat_list" value="">
[245] Fix | Delete
<input type="hidden" name="xyz_twap_post" id="xyz_twap_post" value="0" >
[246] Fix | Delete
<tr id="xyz_twMetabox"><td colspan="2" >
[247] Fix | Delete
<?php
[248] Fix | Delete
$taccess_token_secret=get_option('xyz_twap_twaccestok_secret');
[249] Fix | Delete
$xyz_twap_tw_app_sel_mode=get_option('xyz_twap_tw_app_sel_mode');
[250] Fix | Delete
$xyz_twap_smapsoln_userid=get_option('xyz_twap_smapsoln_userid');
[251] Fix | Delete
if(get_option('xyz_twap_twpost_permission')==1 && ( ($xyz_twap_tw_app_sel_mode==1 && !empty($xyz_twap_smapsoln_userid)) || ($xyz_twap_tw_app_sel_mode==0 && !empty($taccess_token_secret)))) {
[252] Fix | Delete
$postid=0;
[253] Fix | Delete
if (isset($_GET['post']))
[254] Fix | Delete
$postid=intval($_GET['post']);
[255] Fix | Delete
$post_permission=1;
[256] Fix | Delete
$get_post_meta_future_data='';
[257] Fix | Delete
if (get_option('xyz_twap_default_selection_edit')==2 && isset($GLOBALS['edit_flag']) && $GLOBALS['edit_flag']==1 && !empty($postid))
[258] Fix | Delete
$get_post_meta_future_data=get_post_meta($postid,"xyz_twap_future_to_publish",true);
[259] Fix | Delete
if (!empty($get_post_meta_future_data)&& isset($get_post_meta_future_data['xyz_twap_twpost_permission']))
[260] Fix | Delete
{
[261] Fix | Delete
$post_permission=$get_post_meta_future_data['xyz_twap_twpost_permission'];
[262] Fix | Delete
$post_twitter_image_permission=$get_post_meta_future_data['xyz_twap_twpost_image_permission'];
[263] Fix | Delete
$messagetopost=$get_post_meta_future_data['xyz_twap_twmessage'];
[264] Fix | Delete
}
[265] Fix | Delete
else {
[266] Fix | Delete
$post_twitter_image_permission=get_option('xyz_twap_twpost_image_permission');
[267] Fix | Delete
$messagetopost=get_option('xyz_twap_twmessage');
[268] Fix | Delete
}
[269] Fix | Delete
?>
[270] Fix | Delete
<table class="xyz_twap_meta_acclist_table"><!-- TW META -->
[271] Fix | Delete
[272] Fix | Delete
[273] Fix | Delete
<tr>
[274] Fix | Delete
<td colspan="2" class="xyz_twap_pleft15 xyz_twap_meta_acclist_table_td"><strong><?php _e('Twitter','twitter-auto-publish'); ?></strong>
[275] Fix | Delete
</td>
[276] Fix | Delete
</tr>
[277] Fix | Delete
[278] Fix | Delete
<tr><td colspan="2" valign="top">&nbsp;</td></tr>
[279] Fix | Delete
[280] Fix | Delete
<tr valign="top">
[281] Fix | Delete
<td class="xyz_twap_pleft15" width="60%"><?php _e('Enable auto publish posts to my twitter account','twitter-auto-publish'); ?>
[282] Fix | Delete
</td>
[283] Fix | Delete
<td class="switch-field">
[284] Fix | Delete
<label id="xyz_twap_twpost_permission_yes"><input type="radio" name="xyz_twap_twpost_permission" id="xyz_twap_twpost_permission_1" value="1" <?php if($post_permission==1) echo 'checked';?>/><?php _e('Yes','twitter-auto-publish'); ?></label>
[285] Fix | Delete
<label id="xyz_twap_twpost_permission_no"><input type="radio" name="xyz_twap_twpost_permission" id="xyz_twap_twpost_permission_0" value="0" <?php if($post_permission==0) echo 'checked';?>/><?php _e('No','twitter-auto-publish'); ?></label>
[286] Fix | Delete
</td>
[287] Fix | Delete
</tr>
[288] Fix | Delete
[289] Fix | Delete
<tr valign="top" id="twai_twap">
[290] Fix | Delete
<td class="xyz_twap_pleft15"> <?php _e('Attach image to twitter post','twitter-auto-publish'); ?>
[291] Fix | Delete
</td>
[292] Fix | Delete
<td><select id="xyz_twap_twpost_image_permission" name="xyz_twap_twpost_image_permission">
[293] Fix | Delete
<option value="0"
[294] Fix | Delete
<?php if($post_twitter_image_permission==0) echo 'selected';?>>
[295] Fix | Delete
<?php _e('No','twitter-auto-publish'); ?></option>
[296] Fix | Delete
<option value="1"
[297] Fix | Delete
<?php if($post_twitter_image_permission==1) echo 'selected';?>><?php _e('Yes','twitter-auto-publish'); ?></option>
[298] Fix | Delete
</select>
[299] Fix | Delete
</td>
[300] Fix | Delete
</tr>
[301] Fix | Delete
[302] Fix | Delete
<tr valign="top" id="twmf_twap">
[303] Fix | Delete
<td class="xyz_twap_pleft15"> <?php _e('Message format for posting','twitter-auto-publish'); ?><img src="<?php echo $heimg?>"
[304] Fix | Delete
onmouseover="detdisplay_twap('xyz_twap_informationdiv')" onmouseout="dethide_twap('xyz_twap_informationdiv')" style="width:13px;height:auto;">
[305] Fix | Delete
<div id="xyz_twap_informationdiv" class="twap_informationdiv"
[306] Fix | Delete
style="display: none; font-weight: normal;">
[307] Fix | Delete
{POST_TITLE} - <?php _e('Insert the title of your post.','twitter-auto-publish'); ?><br/>
[308] Fix | Delete
{PERMALINK} - <?php _e('Insert the URL where your post is displayed.','twitter-auto-publish'); ?><br/>
[309] Fix | Delete
{POST_EXCERPT} - <?php _e('Insert the excerpt of your post.','twitter-auto-publish'); ?><br/>
[310] Fix | Delete
{POST_CONTENT} - <?php _e('Insert the description of your post.','twitter-auto-publish'); ?><br/>
[311] Fix | Delete
{BLOG_TITLE} - <?php _e('Insert the name of your blog.','twitter-auto-publish'); ?><br/>
[312] Fix | Delete
{USER_NICENAME} - <?php _e('Insert the nicename of the author.','twitter-auto-publish'); ?><br/>
[313] Fix | Delete
{POST_ID} - <?php _e('Insert the ID of your post.','twitter-auto-publish'); ?><br/>
[314] Fix | Delete
{POST_PUBLISH_DATE} - <?php _e('Insert the publish date of your post.','twitter-auto-publish'); ?><br/>
[315] Fix | Delete
{USER_DISPLAY_NAME} - <?php _e('Insert the display name of the author.','twitter-auto-publish'); ?>
[316] Fix | Delete
</div></td>
[317] Fix | Delete
<td>
[318] Fix | Delete
<select name="xyz_twap_info" id="xyz_twap_info" onchange="xyz_twap_info_insert(this)">
[319] Fix | Delete
<option value ="0" selected="selected"> --<?php _e('Select','twitter-auto-publish'); ?>-- </option>
[320] Fix | Delete
<option value ="1">{POST_TITLE} </option>
[321] Fix | Delete
<option value ="2">{PERMALINK} </option>
[322] Fix | Delete
<option value ="3">{POST_EXCERPT} </option>
[323] Fix | Delete
<option value ="4">{POST_CONTENT} </option>
[324] Fix | Delete
<option value ="5">{BLOG_TITLE} </option>
[325] Fix | Delete
<option value ="6">{USER_NICENAME} </option>
[326] Fix | Delete
<option value ="7">{POST_ID} </option>
[327] Fix | Delete
<option value ="8">{POST_PUBLISH_DATE} </option>
[328] Fix | Delete
<option value ="9">{USER_DISPLAY_NAME} </option>
[329] Fix | Delete
</select> </td></tr>
[330] Fix | Delete
[331] Fix | Delete
<tr id="twmftarea_twap"><td>&nbsp;</td><td>
[332] Fix | Delete
<textarea id="xyz_twap_twmessage" name="xyz_twap_twmessage" style="height:80px !important;" ><?php echo esc_textarea($messagetopost);?></textarea>
[333] Fix | Delete
</td></tr>
[334] Fix | Delete
[335] Fix | Delete
</table>
[336] Fix | Delete
<?php }?>
[337] Fix | Delete
</td></tr>
[338] Fix | Delete
[339] Fix | Delete
[340] Fix | Delete
</table>
[341] Fix | Delete
<script type="text/javascript">
[342] Fix | Delete
[343] Fix | Delete
var edit_flag="<?php echo $GLOBALS['edit_flag'];?>";
[344] Fix | Delete
if(edit_flag==1)
[345] Fix | Delete
load_edit_action();
[346] Fix | Delete
if(edit_flag!=1)
[347] Fix | Delete
load_create_action();
[348] Fix | Delete
function load_edit_action()
[349] Fix | Delete
{
[350] Fix | Delete
document.getElementById("xyz_twap_post").value=1;
[351] Fix | Delete
var xyz_twap_default_selection_edit="<?php echo esc_html(get_option('xyz_twap_default_selection_edit'));?>";
[352] Fix | Delete
if(xyz_twap_default_selection_edit=="")
[353] Fix | Delete
xyz_twap_default_selection_edit=0;
[354] Fix | Delete
if(xyz_twap_default_selection_edit==1 || xyz_twap_default_selection_edit==2)
[355] Fix | Delete
return;
[356] Fix | Delete
jQuery('#xyz_twap_twpost_permission_0').attr('checked',true);
[357] Fix | Delete
displaycheck_twap();
[358] Fix | Delete
[359] Fix | Delete
[360] Fix | Delete
}
[361] Fix | Delete
function load_create_action()
[362] Fix | Delete
{
[363] Fix | Delete
document.getElementById("xyz_twap_post").value=1;
[364] Fix | Delete
var xyz_twap_default_selection_create="<?php echo esc_html(get_option('xyz_twap_default_selection_create'));?>";
[365] Fix | Delete
if(xyz_twap_default_selection_create=="")
[366] Fix | Delete
xyz_twap_default_selection_create=0;
[367] Fix | Delete
if(xyz_twap_default_selection_create==1)
[368] Fix | Delete
return;
[369] Fix | Delete
jQuery('#xyz_twap_twpost_permission_0').attr('checked',true);
[370] Fix | Delete
displaycheck_twap();
[371] Fix | Delete
}
[372] Fix | Delete
function xyz_twap_info_insert(inf){
[373] Fix | Delete
[374] Fix | Delete
var e = document.getElementById("xyz_twap_info");
[375] Fix | Delete
var ins_opt = e.options[e.selectedIndex].text;
[376] Fix | Delete
if(ins_opt=="0")
[377] Fix | Delete
ins_opt="";
[378] Fix | Delete
var str=jQuery("textarea#xyz_twap_twmessage").val()+ins_opt;
[379] Fix | Delete
jQuery("textarea#xyz_twap_twmessage").val(str);
[380] Fix | Delete
jQuery('#xyz_twap_info :eq(0)').prop('selected', true);
[381] Fix | Delete
jQuery("textarea#xyz_twap_twmessage").focus();
[382] Fix | Delete
[383] Fix | Delete
}
[384] Fix | Delete
jQuery("#xyz_twap_twpost_permission_no").click(function(){
[385] Fix | Delete
displaycheck_twap();
[386] Fix | Delete
XyzTwapToggleRadio(0,'xyz_twap_twpost_permission');
[387] Fix | Delete
[388] Fix | Delete
});
[389] Fix | Delete
jQuery("#xyz_twap_twpost_permission_yes").click(function(){
[390] Fix | Delete
displaycheck_twap();
[391] Fix | Delete
XyzTwapToggleRadio(1,'xyz_twap_twpost_permission');
[392] Fix | Delete
[393] Fix | Delete
});
[394] Fix | Delete
</script>
[395] Fix | Delete
<?php
[396] Fix | Delete
}
[397] Fix | Delete
?>
[398] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function