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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/twitter-.../admin
File: settings.php
<tr valign="top">
[500] Fix | Delete
[501] Fix | Delete
<td colspan="1"><?php _e('Publish wordpress `posts` to twitter','twitter-auto-publish'); ?>
[502] Fix | Delete
</td>
[503] Fix | Delete
<td class="switch-field">
[504] Fix | Delete
<label id="xyz_twap_include_posts_yes"><input type="radio" name="xyz_twap_include_posts" value="1" <?php if($xyz_twap_include_posts==1) echo 'checked';?>/> <?php _e('Yes','twitter-auto-publish'); ?> </label>
[505] Fix | Delete
<label id="xyz_twap_include_posts_no"><input type="radio" name="xyz_twap_include_posts" value="0" <?php if($xyz_twap_include_posts==0) echo 'checked';?>/> <?php _e('No','twitter-auto-publish'); ?> </label>
[506] Fix | Delete
</td>
[507] Fix | Delete
</tr>
[508] Fix | Delete
<?php
[509] Fix | Delete
$xyz_twap_hide_custompost_settings='';
[510] Fix | Delete
$args=array(
[511] Fix | Delete
'public' => true,
[512] Fix | Delete
'_builtin' => false
[513] Fix | Delete
);
[514] Fix | Delete
$output = 'names'; // names or objects, note names is the default
[515] Fix | Delete
$operator = 'and'; // 'and' or 'or'
[516] Fix | Delete
$post_types=get_post_types($args,$output,$operator);
[517] Fix | Delete
[518] Fix | Delete
$ar1=explode(",",$xyz_twap_include_customposttypes);
[519] Fix | Delete
$cnt=count($post_types);
[520] Fix | Delete
if($cnt==0)
[521] Fix | Delete
$xyz_twap_hide_custompost_settings = 'style="display: none;"';//echo 'NA';
[522] Fix | Delete
?>
[523] Fix | Delete
<tr valign="top" <?php echo $xyz_twap_hide_custompost_settings;?>>
[524] Fix | Delete
[525] Fix | Delete
<td colspan="1"> <?php _e('Select wordpress custom post types for auto publish','twitter-auto-publish'); ?></td>
[526] Fix | Delete
<td><?php
[527] Fix | Delete
foreach ($post_types as $post_type ) {
[528] Fix | Delete
[529] Fix | Delete
echo '<input type="checkbox" name="post_types[]" value="'.$post_type.'" ';
[530] Fix | Delete
if(in_array($post_type, $ar1))
[531] Fix | Delete
{
[532] Fix | Delete
echo 'checked="checked"/>';
[533] Fix | Delete
}
[534] Fix | Delete
else
[535] Fix | Delete
echo '/>';
[536] Fix | Delete
[537] Fix | Delete
echo $post_type.'<br/>';
[538] Fix | Delete
[539] Fix | Delete
}
[540] Fix | Delete
?>
[541] Fix | Delete
</td>
[542] Fix | Delete
</tr>
[543] Fix | Delete
[544] Fix | Delete
[545] Fix | Delete
<tr><td><h2> <?php _e('Advanced Settings','twitter-auto-publish'); ?></h2></td></tr>
[546] Fix | Delete
[547] Fix | Delete
<tr valign="top" id="selPostCat">
[548] Fix | Delete
[549] Fix | Delete
<td colspan="1"> <?php _e('Select post categories for auto publish','twitter-auto-publish'); ?>
[550] Fix | Delete
</td>
[551] Fix | Delete
<td class="switch-field">
[552] Fix | Delete
<input type="hidden" value="<?php echo esc_html($xyz_twap_include_categories);?>" name="xyz_twap_sel_cat"
[553] Fix | Delete
id="xyz_twap_sel_cat">
[554] Fix | Delete
<label id="xyz_twap_include_categories_no">
[555] Fix | Delete
<input type="radio" name="xyz_twap_cat_all" id="xyz_twap_cat_all" value="All" onchange="rd_cat_chn(1,-1)" <?php if($xyz_twap_include_categories=="All") echo "checked"?>> <?php _e('All','twitter-auto-publish'); ?><font style="padding-left: 10px;"></font></label>
[556] Fix | Delete
<label id="xyz_twap_include_categories_yes">
[557] Fix | Delete
<input type="radio" name="xyz_twap_cat_all" id="xyz_twap_cat_all" value="" onchange="rd_cat_chn(1,1)" <?php if($xyz_twap_include_categories!="All") echo "checked"?>> <?php _e('Specific','twitter-auto-publish'); ?></label>
[558] Fix | Delete
<br /> <br /> <div class="scroll_checkbox" id="cat_dropdown_span">
[559] Fix | Delete
<?php
[560] Fix | Delete
$args = array(
[561] Fix | Delete
'show_option_all' => '',
[562] Fix | Delete
'show_option_none' => '',
[563] Fix | Delete
'orderby' => 'name',
[564] Fix | Delete
'order' => 'ASC',
[565] Fix | Delete
'show_last_update' => 0,
[566] Fix | Delete
'show_count' => 0,
[567] Fix | Delete
'hide_empty' => 0,
[568] Fix | Delete
'child_of' => 0,
[569] Fix | Delete
'exclude' => '',
[570] Fix | Delete
'echo' => 0,
[571] Fix | Delete
'selected' => '1 3',
[572] Fix | Delete
'hierarchical' => 1,
[573] Fix | Delete
'id' => 'xyz_twap_catlist',
[574] Fix | Delete
'class' => 'postform',
[575] Fix | Delete
'depth' => 0,
[576] Fix | Delete
'tab_index' => 0,
[577] Fix | Delete
'taxonomy' => 'category');
[578] Fix | Delete
[579] Fix | Delete
if(count(get_categories($args))>0)
[580] Fix | Delete
{
[581] Fix | Delete
$xyz_twap_include_categories=explode(',', $xyz_twap_include_categories);
[582] Fix | Delete
$twap_categories=get_categories($args);
[583] Fix | Delete
foreach ($twap_categories as $twap_cat)
[584] Fix | Delete
{
[585] Fix | Delete
$cat_id[]=$twap_cat->cat_ID;
[586] Fix | Delete
$cat_name[]=$twap_cat->cat_name;
[587] Fix | Delete
?>
[588] Fix | Delete
<input type="checkbox" name="xyz_twap_catlist[]" value="<?php echo $twap_cat->cat_ID;?>" <?php if(is_array($xyz_twap_include_categories)) if(in_array($twap_cat->cat_ID, $xyz_twap_include_categories)) echo "checked" ?>/><?php echo $twap_cat->cat_name; ?>
[589] Fix | Delete
<br/><?php }
[590] Fix | Delete
}
[591] Fix | Delete
else
[592] Fix | Delete
_e('NIL','twitter-auto-publish');
[593] Fix | Delete
?><br /> <br /> </div>
[594] Fix | Delete
</td>
[595] Fix | Delete
</tr>
[596] Fix | Delete
<tr valign="top">
[597] Fix | Delete
<td> <?php _e('Add twitter cards while posting to twitter','twitter-auto-publish'); ?> <img src="<?php echo $heimg?>"
[598] Fix | Delete
onmouseover="detdisplay_twap('xyz_smap_free_enforce_card')" onmouseout="dethide_twap('xyz_smap_free_enforce_card')" style="width:13px;height:auto;">
[599] Fix | Delete
<div id="xyz_smap_free_enforce_card" class="twap_informationdiv" style="display: none;">* <?php _e('By crawling twitter card specific meta tags, twitter can generate a summarised preview of the tweeted link.','twitter-auto-publish'); ?><br/> * <?php _e('To generate tweet preview of post,set <b>Attach media to twitter post</b> as <b>No</b>','twitter-auto-publish'); ?> </div></td>
[600] Fix | Delete
<td class="switch-field">
[601] Fix | Delete
<label id="xyz_smap_free_enforce_twitter_cards_yes"><input type="radio" name="xyz_smap_free_enforce_twitter_cards" value="1" <?php if($xyz_smap_free_enforce_twitter_cards==1) echo 'checked';?>/> <?php _e('Yes','twitter-auto-publish'); ?> </label>
[602] Fix | Delete
<label id="xyz_smap_free_enforce_twitter_cards_no"><input type="radio" name="xyz_smap_free_enforce_twitter_cards" value="0" <?php if($xyz_smap_free_enforce_twitter_cards==0) echo 'checked';?>/> <?php _e('No','twitter-auto-publish'); ?> </label>
[603] Fix | Delete
</td>
[604] Fix | Delete
</tr>
[605] Fix | Delete
[606] Fix | Delete
<tr valign="top">
[607] Fix | Delete
[608] Fix | Delete
<td scope="row" colspan="1" width="50%"> <?php _e('Auto publish on editing posts/pages/custom post types','twitter-auto-publish'); ?>
[609] Fix | Delete
</td>
[610] Fix | Delete
<td>
[611] Fix | Delete
<input type="radio" name="xyz_twap_default_selection_edit" value="1" <?php if($xyz_twap_default_selection_edit==1) echo 'checked';?>/> <?php _e('Enabled','twitter-auto-publish'); ?>
[612] Fix | Delete
<br/><input type="radio" name="xyz_twap_default_selection_edit" value="0" <?php if($xyz_twap_default_selection_edit==0) echo 'checked';?>/> <?php _e('Disabled','twitter-auto-publish'); ?>
[613] Fix | Delete
<br/><input type="radio" name="xyz_twap_default_selection_edit" value="2" <?php if($xyz_twap_default_selection_edit==2) echo 'checked';?>/> <?php _e('Use settings from post creation or post updation','twitter-auto-publish'); ?>
[614] Fix | Delete
</td>
[615] Fix | Delete
</tr>
[616] Fix | Delete
<tr valign="top">
[617] Fix | Delete
[618] Fix | Delete
<td scope="row" colspan="1" width="50%"> <?php _e('Auto publish on creating posts/pages/custom post types','twitter-auto-publish'); ?>
[619] Fix | Delete
</td>
[620] Fix | Delete
<td>
[621] Fix | Delete
<input type="radio" name="xyz_twap_default_selection_create" value="1" <?php if($xyz_twap_default_selection_create==1) echo 'checked';?>/> <?php _e('Enabled','twitter-auto-publish'); ?>
[622] Fix | Delete
<br/><input type="radio" name="xyz_twap_default_selection_create" value="0" <?php if($xyz_twap_default_selection_create==0) echo 'checked';?>/> <?php _e('Disabled','twitter-auto-publish'); ?>
[623] Fix | Delete
</td>
[624] Fix | Delete
</tr>
[625] Fix | Delete
<tr valign="top">
[626] Fix | Delete
[627] Fix | Delete
<td scope="row" colspan="1" width="50%"> <?php _e('Enable SSL peer verification in remote requests','twitter-auto-publish'); ?> </td>
[628] Fix | Delete
<td class="switch-field">
[629] Fix | Delete
<label id="xyz_twap_peer_verification_yes"><input type="radio" name="xyz_twap_peer_verification" value="1" <?php if($xyz_twap_peer_verification==1) echo 'checked';?>/> <?php _e('Yes','twitter-auto-publish'); ?> </label>
[630] Fix | Delete
<label id="xyz_twap_peer_verification_no"><input type="radio" name="xyz_twap_peer_verification" value="0" <?php if($xyz_twap_peer_verification==0) echo 'checked';?>/> <?php _e('No','twitter-auto-publish'); ?> </label>
[631] Fix | Delete
</td>
[632] Fix | Delete
</tr>
[633] Fix | Delete
[634] Fix | Delete
<tr valign="top">
[635] Fix | Delete
<td scope="row" colspan="1"> <?php _e('Apply filters during publishing','twitter-auto-publish'); ?> </td>
[636] Fix | Delete
<td>
[637] Fix | Delete
<?php
[638] Fix | Delete
$ar2=explode(",",$xyz_twap_apply_filters);
[639] Fix | Delete
for ($i=0;$i<3;$i++ ) {
[640] Fix | Delete
$filVal=$i+1;
[641] Fix | Delete
[642] Fix | Delete
if($filVal==1)
[643] Fix | Delete
$filName='the_content';
[644] Fix | Delete
else if($filVal==2)
[645] Fix | Delete
$filName='the_excerpt';
[646] Fix | Delete
else if($filVal==3)
[647] Fix | Delete
$filName='the_title';
[648] Fix | Delete
else $filName='';
[649] Fix | Delete
[650] Fix | Delete
echo '<input type="checkbox" name="xyz_twap_applyfilters[]" value="'.$filVal.'" ';
[651] Fix | Delete
if(in_array($filVal, $ar2))
[652] Fix | Delete
{
[653] Fix | Delete
echo 'checked="checked"/>';
[654] Fix | Delete
}
[655] Fix | Delete
else
[656] Fix | Delete
echo '/>';
[657] Fix | Delete
[658] Fix | Delete
echo '<label>'.$filName.'</label><br/>';
[659] Fix | Delete
[660] Fix | Delete
}
[661] Fix | Delete
[662] Fix | Delete
?>
[663] Fix | Delete
</td>
[664] Fix | Delete
</tr>
[665] Fix | Delete
<tr><td><h2> <?php _e('Other Settings','twitter-auto-publish'); ?></h2></td></tr>
[666] Fix | Delete
[667] Fix | Delete
<tr valign="top">
[668] Fix | Delete
[669] Fix | Delete
<td colspan="1"> <?php _e('Enable credit link to author','twitter-auto-publish'); ?>
[670] Fix | Delete
</td>
[671] Fix | Delete
<td class="switch-field">
[672] Fix | Delete
<label id="xyz_credit_link_yes"><input type="radio" name="xyz_credit_link" value="twap" <?php if($xyz_credit_link=='twap') echo 'checked';?>/> <?php _e('Yes','twitter-auto-publish'); ?> </label>
[673] Fix | Delete
<label id="xyz_credit_link_no"><input type="radio" name="xyz_credit_link" value="<?php echo $xyz_credit_link!='twap'?$xyz_credit_link:0;?>" <?php if($xyz_credit_link!='twap') echo 'checked';?>/> <?php _e('No','twitter-auto-publish'); ?> </label>
[674] Fix | Delete
</td>
[675] Fix | Delete
</tr>
[676] Fix | Delete
[677] Fix | Delete
[678] Fix | Delete
[679] Fix | Delete
[680] Fix | Delete
<tr valign="top">
[681] Fix | Delete
[682] Fix | Delete
<td colspan="1"> <?php _e('Enable premium version ads','twitter-auto-publish'); ?>
[683] Fix | Delete
</td>
[684] Fix | Delete
<td class="switch-field">
[685] Fix | Delete
<label id="xyz_twap_premium_version_ads_yes"><input type="radio" name="xyz_twap_premium_version_ads" value="1" <?php if($xyz_twap_premium_version_ads==1) echo 'checked';?>/> <?php _e('Yes','twitter-auto-publish'); ?> </label>
[686] Fix | Delete
<label id="xyz_twap_premium_version_ads_no"><input type="radio" name="xyz_twap_premium_version_ads" value="0" <?php if($xyz_twap_premium_version_ads==0) echo 'checked';?>/> <?php _e('No','twitter-auto-publish'); ?> </label>
[687] Fix | Delete
</td>
[688] Fix | Delete
</tr>
[689] Fix | Delete
[690] Fix | Delete
[691] Fix | Delete
<tr>
[692] Fix | Delete
[693] Fix | Delete
<td id="bottomBorderNone">
[694] Fix | Delete
[695] Fix | Delete
[696] Fix | Delete
</td>
[697] Fix | Delete
[698] Fix | Delete
[699] Fix | Delete
<td id="bottomBorderNone"><div style="height: 50px;">
[700] Fix | Delete
<input type="submit" class="submit_twap_new" style="margin-top: 10px;" value="<?php _e('Update Settings','twitter-auto-publish'); ?>" name="bsettngs" /></div></td>
[701] Fix | Delete
</tr>
[702] Fix | Delete
[703] Fix | Delete
[704] Fix | Delete
</table>
[705] Fix | Delete
</form>
[706] Fix | Delete
</div>
[707] Fix | Delete
[708] Fix | Delete
</div>
[709] Fix | Delete
[710] Fix | Delete
<?php if (is_array($xyz_twap_include_categories))
[711] Fix | Delete
$xyz_twap_include_categories1=implode(',', $xyz_twap_include_categories);
[712] Fix | Delete
else
[713] Fix | Delete
$xyz_twap_include_categories1=$xyz_twap_include_categories;
[714] Fix | Delete
?>
[715] Fix | Delete
<script type="text/javascript">
[716] Fix | Delete
//drpdisplay();
[717] Fix | Delete
var catval='<?php echo esc_html($xyz_twap_include_categories1); ?>';
[718] Fix | Delete
var custtypeval='<?php echo esc_html($xyz_twap_include_customposttypes); ?>';
[719] Fix | Delete
var get_opt_cats='<?php echo esc_html(get_option('xyz_twap_include_posts'));?>';
[720] Fix | Delete
jQuery(document).ready(function() {
[721] Fix | Delete
<?php if(isset($_POST['bsettngs'])) {?>
[722] Fix | Delete
document.getElementById("xyz_twap_basic_tab_settings").click();
[723] Fix | Delete
<?php }
[724] Fix | Delete
else {?>
[725] Fix | Delete
document.getElementById("xyz_twap_default_tab_settings").click();
[726] Fix | Delete
<?php }?>
[727] Fix | Delete
[728] Fix | Delete
[729] Fix | Delete
if(catval=="All")
[730] Fix | Delete
jQuery("#cat_dropdown_span").hide();
[731] Fix | Delete
else
[732] Fix | Delete
jQuery("#cat_dropdown_span").show();
[733] Fix | Delete
[734] Fix | Delete
if(get_opt_cats==0)
[735] Fix | Delete
jQuery('#selPostCat').hide();
[736] Fix | Delete
else
[737] Fix | Delete
jQuery('#selPostCat').show();
[738] Fix | Delete
var xyz_credit_link=jQuery("input[name='xyz_credit_link']:checked").val();
[739] Fix | Delete
if(xyz_credit_link=='twap')
[740] Fix | Delete
xyz_credit_link=1;
[741] Fix | Delete
else
[742] Fix | Delete
xyz_credit_link=0;
[743] Fix | Delete
XyzTwapToggleRadio(xyz_credit_link,'xyz_credit_link');
[744] Fix | Delete
[745] Fix | Delete
var xyz_twap_cat_all=jQuery("input[name='xyz_twap_cat_all']:checked").val();
[746] Fix | Delete
if (xyz_twap_cat_all == 'All')
[747] Fix | Delete
xyz_twap_cat_all=0;
[748] Fix | Delete
else
[749] Fix | Delete
xyz_twap_cat_all=1;
[750] Fix | Delete
XyzTwapToggleRadio(xyz_twap_cat_all,'xyz_twap_include_categories');
[751] Fix | Delete
[752] Fix | Delete
[753] Fix | Delete
var toggle_element_ids=['xyz_twap_twpost_image_permission','xyz_smap_free_enforce_twitter_cards','xyz_twap_twpost_permission','xyz_twap_include_pages','xyz_twap_include_posts','xyz_twap_peer_verification','xyz_twap_premium_version_ads'];
[754] Fix | Delete
[755] Fix | Delete
jQuery.each(toggle_element_ids, function( index, value ) {
[756] Fix | Delete
checkedval= jQuery("input[name='"+value+"']:checked").val();
[757] Fix | Delete
XyzTwapToggleRadio(checkedval,value);
[758] Fix | Delete
});
[759] Fix | Delete
var xyz_twap_app_sel_mode=jQuery("input[name='xyz_twap_app_sel_mode']:checked").val();
[760] Fix | Delete
if(xyz_twap_app_sel_mode !=0){
[761] Fix | Delete
jQuery('.xyz_twap_twitter_settings').hide();
[762] Fix | Delete
jQuery('#xyz_twap_app_creation_note').hide();
[763] Fix | Delete
jQuery('#xyz_twap_conn_to_xyzscripts').show();
[764] Fix | Delete
jQuery('.xyz_twap_twitter_auth').show();
[765] Fix | Delete
}
[766] Fix | Delete
else{
[767] Fix | Delete
jQuery('.xyz_twap_twitter_settings').show();
[768] Fix | Delete
jQuery('#xyz_twap_app_creation_note').show();
[769] Fix | Delete
jQuery('#xyz_twap_conn_to_xyzscripts').hide();
[770] Fix | Delete
jQuery('.xyz_twap_twitter_auth').hide();
[771] Fix | Delete
}
[772] Fix | Delete
jQuery("input[name='xyz_twap_app_sel_mode']").click(function(){
[773] Fix | Delete
var xyz_twap_app_sel_mode=jQuery("input[name='xyz_twap_app_sel_mode']:checked").val();
[774] Fix | Delete
if(xyz_twap_app_sel_mode !=0){
[775] Fix | Delete
jQuery('#xyz_twap_app_creation_note').hide();
[776] Fix | Delete
jQuery('.xyz_twap_twitter_settings').hide();
[777] Fix | Delete
jQuery('#xyz_twap_conn_to_xyzscripts').show();
[778] Fix | Delete
jQuery('.xyz_twap_twitter_auth').show();
[779] Fix | Delete
}
[780] Fix | Delete
else{
[781] Fix | Delete
jQuery('#xyz_twap_app_creation_note').show();
[782] Fix | Delete
jQuery('.xyz_twap_twitter_settings').show();
[783] Fix | Delete
jQuery('#xyz_twap_conn_to_xyzscripts').hide();
[784] Fix | Delete
jQuery('.xyz_twap_twitter_auth').hide();
[785] Fix | Delete
}
[786] Fix | Delete
});
[787] Fix | Delete
window.addEventListener('message', function(e) {
[788] Fix | Delete
xyz_twap_ProcessChildMessage(e.data);
[789] Fix | Delete
} , false);
[790] Fix | Delete
});
[791] Fix | Delete
[792] Fix | Delete
function setcat(obj)
[793] Fix | Delete
{
[794] Fix | Delete
var sel_str="";
[795] Fix | Delete
for(k=0;k<obj.options.length;k++)
[796] Fix | Delete
{
[797] Fix | Delete
if(obj.options[k].selected)
[798] Fix | Delete
sel_str+=obj.options[k].value+",";
[799] Fix | Delete
}
[800] Fix | Delete
[801] Fix | Delete
[802] Fix | Delete
var l = sel_str.length;
[803] Fix | Delete
var lastChar = sel_str.substring(l-1, l);
[804] Fix | Delete
if (lastChar == ",") {
[805] Fix | Delete
sel_str = sel_str.substring(0, l-1);
[806] Fix | Delete
}
[807] Fix | Delete
[808] Fix | Delete
document.getElementById('xyz_twap_sel_cat').value=sel_str;
[809] Fix | Delete
[810] Fix | Delete
}
[811] Fix | Delete
[812] Fix | Delete
//var d1='<?php // echo esc_html($xyz_twap_include_categories1);?>';
[813] Fix | Delete
// splitText = d1.split(",");
[814] Fix | Delete
// jQuery.each(splitText, function(k,v) {
[815] Fix | Delete
// jQuery("#xyz_twap_catlist").children("option[value="+v+"]").attr("selected","selected");
[816] Fix | Delete
// });
[817] Fix | Delete
[818] Fix | Delete
function rd_cat_chn(val,act)
[819] Fix | Delete
{
[820] Fix | Delete
if(val==1)
[821] Fix | Delete
{
[822] Fix | Delete
if(act==-1)
[823] Fix | Delete
jQuery("#cat_dropdown_span").hide();
[824] Fix | Delete
else
[825] Fix | Delete
jQuery("#cat_dropdown_span").show();
[826] Fix | Delete
}
[827] Fix | Delete
[828] Fix | Delete
}
[829] Fix | Delete
[830] Fix | Delete
function xyz_twap_info_insert(inf){
[831] Fix | Delete
[832] Fix | Delete
var e = document.getElementById("xyz_twap_info");
[833] Fix | Delete
var ins_opt = e.options[e.selectedIndex].text;
[834] Fix | Delete
if(ins_opt=="0")
[835] Fix | Delete
ins_opt="";
[836] Fix | Delete
var str=jQuery("textarea#xyz_twap_twmessage").val()+ins_opt;
[837] Fix | Delete
jQuery("textarea#xyz_twap_twmessage").val(str);
[838] Fix | Delete
jQuery('#xyz_twap_info :eq(0)').prop('selected', true);
[839] Fix | Delete
jQuery("textarea#xyz_twap_twmessage").focus();
[840] Fix | Delete
[841] Fix | Delete
}
[842] Fix | Delete
function xyz_twap_show_postCategory(val)
[843] Fix | Delete
{
[844] Fix | Delete
if(val==0)
[845] Fix | Delete
jQuery('#selPostCat').hide();
[846] Fix | Delete
else
[847] Fix | Delete
jQuery('#selPostCat').show();
[848] Fix | Delete
}
[849] Fix | Delete
var toggle_element_ids=['xyz_twap_twpost_image_permission','xyz_smap_free_enforce_twitter_cards','xyz_twap_twpost_permission','xyz_twap_include_pages','xyz_twap_include_posts','xyz_twap_peer_verification','xyz_credit_link','xyz_twap_premium_version_ads','xyz_twap_include_categories'];
[850] Fix | Delete
[851] Fix | Delete
jQuery.each(toggle_element_ids, function( index, value ) {
[852] Fix | Delete
jQuery("#"+value+"_no").click(function(){
[853] Fix | Delete
XyzTwapToggleRadio(0,value);
[854] Fix | Delete
if(value=='xyz_twap_include_posts')
[855] Fix | Delete
xyz_twap_show_postCategory(0);
[856] Fix | Delete
});
[857] Fix | Delete
jQuery("#"+value+"_yes").click(function(){
[858] Fix | Delete
XyzTwapToggleRadio(1,value);
[859] Fix | Delete
if(value=='xyz_twap_include_posts')
[860] Fix | Delete
xyz_twap_show_postCategory(1);
[861] Fix | Delete
});
[862] Fix | Delete
});
[863] Fix | Delete
function xyz_twap_open_tab(evt, xyz_twap_form_div_id) {
[864] Fix | Delete
var i, xyz_twap_tabcontent, xyz_twap_tablinks;
[865] Fix | Delete
tabcontent = document.getElementsByClassName("xyz_twap_tabcontent");
[866] Fix | Delete
for (i = 0; i < tabcontent.length; i++) {
[867] Fix | Delete
tabcontent[i].style.display = "none";
[868] Fix | Delete
}
[869] Fix | Delete
tablinks = document.getElementsByClassName("xyz_twap_tablinks");
[870] Fix | Delete
for (i = 0; i < tablinks.length; i++) {
[871] Fix | Delete
tablinks[i].className = tablinks[i].className.replace(" active", "");
[872] Fix | Delete
}
[873] Fix | Delete
document.getElementById(xyz_twap_form_div_id).style.display = "block";
[874] Fix | Delete
evt.currentTarget.className += " active";
[875] Fix | Delete
}
[876] Fix | Delete
function twap_popup_connect_to_xyzscripts()
[877] Fix | Delete
{
[878] Fix | Delete
var childWindow = null;
[879] Fix | Delete
var twap_xyzscripts_url='<?php echo "https://smap.xyzscripts.com/index.php?page=index/register";?>';
[880] Fix | Delete
childWindow = window.open(twap_xyzscripts_url, "Connect to xyzscripts", "toolbar=yes,scrollbars=yes,resizable=yes,left=500,width=600,height=600");
[881] Fix | Delete
return false;
[882] Fix | Delete
}
[883] Fix | Delete
function twap_popup_tw_auth(domain_name,xyz_twap_smapsoln_userid,xyzscripts_user_id,xyzscripts_hash_val,auth_secret_key,request_hash)
[884] Fix | Delete
{
[885] Fix | Delete
if(xyzscripts_user_id==''|| xyzscripts_hash_val=='')
[886] Fix | Delete
{
[887] Fix | Delete
if(jQuery('#system_notice_area').length==0)
[888] Fix | Delete
jQuery('body').append('<div class="system_notice_area_style0" id="system_notice_area"></div>');
[889] Fix | Delete
jQuery("#system_notice_area").html(xyz_script_twap_var.html3);
[890] Fix | Delete
jQuery("#system_notice_area").append('<span id="system_notice_area_dismiss"> <?php _e('Dismiss','twitter-auto-publish'); ?> </span>');
[891] Fix | Delete
jQuery("#system_notice_area").show();
[892] Fix | Delete
jQuery('#system_notice_area_dismiss').click(function() {
[893] Fix | Delete
jQuery('#system_notice_area').animate({
[894] Fix | Delete
opacity : 'hide',
[895] Fix | Delete
height : 'hide'
[896] Fix | Delete
}, 500);
[897] Fix | Delete
});
[898] Fix | Delete
return false;
[899] Fix | Delete
}
[900] Fix | Delete
else{
[901] Fix | Delete
var childWindow = null;
[902] Fix | Delete
var smap_licence_key='';
[903] Fix | Delete
var account_id=0;
[904] Fix | Delete
var smap_solution_url='<?php echo XYZ_TWAP_SMAPSOLUTION_AUTH_URL;?>';
[905] Fix | Delete
childWindow = window.open(smap_solution_url+"authorize-twitter/twitter.php?smap_tw_auth_id="+xyz_twap_smapsoln_userid+"&account_id="+account_id+
[906] Fix | Delete
"&domain_name="+domain_name+"&xyzscripts_user_id="+xyzscripts_user_id+"&smap_licence_key="+smap_licence_key+"&auth_secret_key="+auth_secret_key+"&free_plugin_source=twap&request_hash="+request_hash, "SmapSolutions Authorization", "toolbar=yes,scrollbars=yes,resizable=yes,left=500,width=600,height=600");
[907] Fix | Delete
return false; }
[908] Fix | Delete
}
[909] Fix | Delete
function xyz_twap_ProcessChildMessage(message) {
[910] Fix | Delete
var messageType = message.slice(0,5);
[911] Fix | Delete
if(messageType==="error")
[912] Fix | Delete
{
[913] Fix | Delete
message=message.substring(6);
[914] Fix | Delete
if(jQuery('#system_notice_area').length==0)
[915] Fix | Delete
jQuery('body').append('<div class="system_notice_area_style0" id="system_notice_area"></div>');
[916] Fix | Delete
jQuery("#system_notice_area").html(message+' <span id="system_notice_area_dismiss"> <?php _e('Dismiss','twitter-auto-publish'); ?> </span>');
[917] Fix | Delete
jQuery("#system_notice_area").show();
[918] Fix | Delete
jQuery('#system_notice_area_dismiss').click(function() {
[919] Fix | Delete
jQuery('#system_notice_area').animate({
[920] Fix | Delete
opacity : 'hide',
[921] Fix | Delete
height : 'hide'
[922] Fix | Delete
}, 500);
[923] Fix | Delete
});
[924] Fix | Delete
}
[925] Fix | Delete
var obj1=jQuery.parseJSON(message);
[926] Fix | Delete
if(obj1.content && obj1.userid && obj1.xyzscripts_user)
[927] Fix | Delete
{
[928] Fix | Delete
var xyz_userid=obj1.userid;var xyz_user_hash=obj1.content;
[929] Fix | Delete
var xyz_twap_xyzscripts_accinfo_nonce= '<?php echo wp_create_nonce('xyz_twap_xyzscripts_accinfo_nonce');?>';
[930] Fix | Delete
var dataString = {
[931] Fix | Delete
action: 'xyz_twap_xyzscripts_accinfo_auto_update',
[932] Fix | Delete
xyz_userid: xyz_userid ,
[933] Fix | Delete
xyz_user_hash: xyz_user_hash,
[934] Fix | Delete
dataType: 'json',
[935] Fix | Delete
_wpnonce: xyz_twap_xyzscripts_accinfo_nonce
[936] Fix | Delete
};
[937] Fix | Delete
jQuery("#connect_to_xyzscripts").hide();
[938] Fix | Delete
jQuery("#ajax-save-xyzscript_acc").show();
[939] Fix | Delete
jQuery.post(ajaxurl, dataString ,function(response) {
[940] Fix | Delete
if(response==1)
[941] Fix | Delete
alert(xyz_script_twap_var.alert3);
[942] Fix | Delete
else{
[943] Fix | Delete
var base_url = '<?php echo admin_url('admin.php?page=twitter-auto-publish-settings');?>';
[944] Fix | Delete
window.location.href = base_url+'&msg=1';
[945] Fix | Delete
}
[946] Fix | Delete
});
[947] Fix | Delete
}
[948] Fix | Delete
if((obj1.xyz_tw_username) && (obj1.xyz_tw_user_id)){
[949] Fix | Delete
var secretkey=obj1.xyz_secretkey;
[950] Fix | Delete
var smapsoln_userid=obj1.xyz_smapsoln_userid;
[951] Fix | Delete
var xyz_tw_user_id=obj1.xyz_tw_user_id;
[952] Fix | Delete
var xyz_twap_xyzscripts_hash_val=obj1.xyz_smap_xyzscripts_hash_val;
[953] Fix | Delete
var xyz_twap_xyzscripts_user_id=obj1.xyz_smap_xyzscripts_user_id;
[954] Fix | Delete
var xyz_tw_username=obj1.xyz_tw_username;
[955] Fix | Delete
var xyz_twap_tw_selected_pages_nonce= '<?php echo wp_create_nonce('xyz_twap_tw_account_details_nonce');?>';
[956] Fix | Delete
var dataString = {
[957] Fix | Delete
action: 'xyz_twap_tw_account_details_auto_update',
[958] Fix | Delete
twap_secretkey: secretkey,
[959] Fix | Delete
xyz_twap_xyzscripts_user_id: xyz_twap_xyzscripts_user_id,
[960] Fix | Delete
smapsoln_userid:smapsoln_userid,
[961] Fix | Delete
xyz_tw_user_id:xyz_tw_user_id,
[962] Fix | Delete
xyz_tw_username:xyz_tw_username,
[963] Fix | Delete
xyz_twap_xyzscripts_hash_val:xyz_twap_xyzscripts_hash_val,
[964] Fix | Delete
dataType: 'json',
[965] Fix | Delete
_wpnonce: xyz_twap_tw_selected_pages_nonce
[966] Fix | Delete
};
[967] Fix | Delete
jQuery.post(ajaxurl, dataString ,function(response)
[968] Fix | Delete
{
[969] Fix | Delete
if(response==-1)
[970] Fix | Delete
alert(xyz_script_twap_var.alert3);
[971] Fix | Delete
else
[972] Fix | Delete
{
[973] Fix | Delete
var base_url = '<?php echo admin_url('admin.php?page=twitter-auto-publish-settings');?>';//msg -
[974] Fix | Delete
window.location.href = base_url+'&msg=2';
[975] Fix | Delete
}
[976] Fix | Delete
});
[977] Fix | Delete
}
[978] Fix | Delete
}
[979] Fix | Delete
</script>
[980] Fix | Delete
[981] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function