Skip to content

Commit

Permalink
tagging v2.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarveshmrao committed Nov 2, 2024
1 parent f11a363 commit 41cc342
Show file tree
Hide file tree
Showing 28 changed files with 962 additions and 6 deletions.
16 changes: 14 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: sarveshmrao
Donate link: https://sarveshmrao.in
Tags: Discord, invite, link, vanity, URL, Discord Invite Links, Vanity URL
Requires at least: 5.2
Tested up to: 6.3
Tested up to: 6.6
Requires PHP: 7.2
Stable tag: 2.5.1
Stable tag: 2.5.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -63,6 +63,12 @@ You can ask for help in WordPress Plugin Support Page.

== Changelog ==

= 2.5.3 =
WP Version Upgrade

= 2.5.2 =
Bug fixes

= 2.5.1 =
Major bug fixes: Discord Login issue fixed, webhook not getting posted fixed, other bugs fixed.

Expand All @@ -83,6 +89,12 @@ Initial stable version.

== Upgrade Notice ==

= 2.5.2 =
Minor Bug fixed. Update recommended.

= 2.5.2 =
Important bugs fixed.

= 2.5.1 =
Must upgrade for Discord issues to get fixed.

Expand Down
19 changes: 19 additions & 0 deletions tags/2.5.3/assets/discord_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions tags/2.5.3/assets/dsc-oauth.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
.dsc-btn {
-webkit-text-size-adjust: 100%;
line-height: 1.618;
text-rendering: optimizeLegibility;
font-weight: 400;
font-family: "Raleway", sans-serif !important;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
text-align: center;
word-wrap: normal;
box-sizing: border-box;
background: #7289da !important;
border: none !important;
padding: 8px 14px 8px 10px !important;
margin: 10px 0 20px !important;
display: inline-block !important;
color: #ffffff !important;
font-size: 14px !important;
text-transform: none !important;
text-decoration: none !important;
transition: background 0.3s ease !important;
white-space: normal !important;
border-radius: 5px;
}
.dsc-btn-text {
-webkit-text-size-adjust: 100%;
line-height: 1.618;
text-rendering: optimizeLegibility;
font-weight: 400;
font-family: "Raleway", sans-serif !important;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
text-align: center;
word-wrap: normal;
color: #ffffff !important;
font-size: 14px !important;
text-transform: none !important;
white-space: normal !important;
box-sizing: border-box;
}
.dsc-btn-icon {
-webkit-text-size-adjust: 100%;
line-height: 1.618;
text-rendering: optimizeLegibility;
font-weight: 400;
font-family: "Raleway", sans-serif !important;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
text-align: center;
word-wrap: normal;
color: #ffffff !important;
font-size: 14px !important;
text-transform: none !important;
white-space: normal !important;
box-sizing: border-box;
background-image: url("discord_icon.svg") !important;
background-repeat: no-repeat !important;
background-size: 100% !important;
display: inline-block !important;
height: 20px !important;
width: 20px !important;
vertical-align: middle !important;
margin: -1px 10px 0 0 !important;
}
Binary file added tags/2.5.3/assets/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tags/2.5.3/assets/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tags/2.5.3/assets/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tags/2.5.3/assets/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tags/2.5.3/assets/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tags/2.5.3/assets/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tags/2.5.3/assets/screenshot-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tags/2.5.3/assets/screenshot-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tags/2.5.3/assets/screenshot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tags/2.5.3/assets/styles.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions tags/2.5.3/includes/color-picker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
jQuery(document).ready(function($){
$('.smr-discord-embed-color-picker').wpColorPicker();
});
29 changes: 29 additions & 0 deletions tags/2.5.3/includes/colorPicker.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

/**
* This file is included with WP Discord Invite WordPress Plugin (https://wordpress.com/plugins/wp-discord-invite), Developed by Sarvesh M Rao (https://sarveshmrao.in/).
* This file is licensed under Generl Public License v2 (GPLv2) or later.
* Using the code on whole or in part against the license can lead to legal prosecution.
*
* Sarvesh M Rao
* https://sarveshmrao.in/
*/

if (!defined("ABSPATH")) {
exit();
}

add_action("admin_enqueue_scripts", "smr_discord_enqueue_color_picker");
function smr_discord_enqueue_color_picker($hook_suffix)
{
// first check that $hook_suffix is appropriate for your admin page
wp_enqueue_style("wp-color-picker");
wp_enqueue_script(
"my-script-handle",
plugins_url("color-picker.js", __FILE__),
["wp-color-picker"],
false,
true
);
}
?>
142 changes: 142 additions & 0 deletions tags/2.5.3/includes/countPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<?php

/**
* This file is included with WP Discord Invite WordPress Plugin (https://wordpress.com/plugins/wp-discord-invite), Developed by Sarvesh M Rao (https://sarveshmrao.in/).
* This file is licensed under Generl Public License v2 (GPLv2) or later.
* Using the code on whole or in part against the license can lead to legal prosecution.
*
* Sarvesh M Rao
* https://sarveshmrao.in/
*/

if (!defined("ABSPATH")) {
exit();
}

//COUNT PAGE START
function smr_discord_count_page()
{
?>
<div class="wrap">
<img src="<?php echo plugin_dir_url(__FILE__) .
"./../assets/icon-128x128.png"; ?>"></img>
<h2>WP Discord Invite Link Click Count</h2>
<script type="text/javascript">var $j = jQuery.noConflict();</script>
<table class="form-table">


<tr valign="top">
<th scope="row">Link: </th>
<td><p><?php echo get_option("siteurl") . "/" . get_option("smr_discord_uri"); ?></p></td>
</tr>

<tr valign="top">
<th scope="row">Click Count</th>
<td><p><?php echo get_option("smr_discord_click_count"); ?></p></td>
</tr>

<tr valign="top">
<th scope="row">Last Click</th>
<td><p><?php echo time_elapsed_string(
get_option("smr_discord_link_last_click")
) .
" (" .
get_option("smr_discord_link_last_click") .
")"; ?></p></td>
</tr>
<tr valign="top">
<th scope="row">Last Reset</th>
<td><p><?php echo time_elapsed_string(
get_option("smr_discord_click_count_last_reset")
) .
" (" .
get_option("smr_discord_click_count_last_reset") .
")"; ?></p></td>
</tr>
</table>
<div>
<form method="post" action="options.php">
<?php settings_fields("smr-discord-count-group"); ?>
<input type="hidden" name="smr_discord_click_count" value="0" />
<input type="hidden" name="smr_discord_click_count_last_reset" value="<?php echo current_time(
"Y-m-d h:i:sa"
); ?>" />

<p class="submit">
<input type="submit" class="button-primary" value="<?php _e(
"Reset Click Count (Irreversible)"
); ?>" />
</p>
</form>
</div>

<form method="post" action="options.php">
<?php settings_fields("smr-discord-webhook-group");
if(isset($_POST['wp-discord-invite-oauth']) && isset($_POST['webhook'])) {
$webhook = sanitize_url($_POST['webhook'], array('https'));
}
?>
<h2>WP Discord Invite Link Click Webhook</h2>
<p>Sends a webhook to Discord when the invite link is clicked</p>
<table class="form-table">


<tr valign="top">
<th scope="row">Enable Webhook </th>
<td><input type="checkbox" name="smr_discord_webhook_enable" value="1"<?php if(isset($_POST['wp-discord-invite-oauth']) && isset($webhook)) {
echo "checked=\"checked\"";
} else { checked(
1 == get_option("smr_discord_webhook_enable")
); } ?> /><span class="dashicons dashicons-editor-help" onclick="$j('#wp_discord_webhook-desc').toggleClass('hidden');"></span>
<p class="description hidden" id="wp_discord_webhook-desc">Check to enable webhook option. <br /><a href="https://docs.sarveshmrao.in/en/wp-discord-invite#webhook">More Info in Docs</a></p></td>
</tr>

<tr valign="top">
<th scope="row">Discord Webhook URL </th>
<td><input type="text" name="smr_discord_webhook_url" value="<?php if(isset($_POST['wp-discord-invite-oauth']) && isset($webhook)) {
echo $webhook;
} else { echo get_option(
"smr_discord_webhook_url"
);} ?>" /><span class="dashicons dashicons-editor-help" onclick="$j('#wp_discord_webhook-url-desc').toggleClass('hidden');"></span><br />
<p class="description hidden" id="wp_discord_webhook-url-desc">Webhook URL to post to a Discord Channel <br /><a href="https://docs.sarveshmrao.in/en/wp-discord-invite#webhook">More Info in Docs</a></p>
<a class="dsc-btn" rel="nofollow" href="https://utils.sarveshmrao.in/wp-discord-invite-oauth/?redirect=<?php echo admin_url(); ?>" title="Login with Discord">
<span class="dsc-btn-icon"></span>

<span class="dsc-btn-text">Login with Discord</span>
</a>
</td>
</tr>

</table>
<?php
wp_enqueue_style(
"CssForDscOAuth",
plugin_dir_url(__FILE__) . "./../assets/dsc-oauth.css"
);
?>
<p class="submit">
<input type="submit" class="button-primary" id="count_save_changes" value="<?php _e(
"Save Changes"
); ?>" />
</p>
<?php
if(isset($_POST['wp-discord-invite-oauth']) && isset($webhook)) {
echo("<body onload=\"redirFunction()\"></body>");
echo("<script> function redirFunction() {
document.getElementById(\"count_save_changes\").click();
} </script>");
}
?>

</form>



<div><p>If you enjoy using this plugin please leave a review <a href="https://wordpress.org/support/plugin/wp-discord-invite/reviews/">here</a>. That would motivate me a lot.</p></div>
<div><p>Created with <span class="dashicons dashicons-heart"></span> by <a href="https://sarveshmrao.in">Sarvesh M Rao</a>.</p></div>
</div>
<?php
}
//COUNT PAGE END

?>
Loading

0 comments on commit 41cc342

Please sign in to comment.