Changeset 2696177
- Timestamp:
- 03/18/2022 05:52:36 PM (4 years ago)
- Location:
- socialmark/trunk
- Files:
-
- 21 edited
-
changelog.txt (modified) (1 diff)
-
freemius/includes/class-freemius.php (modified) (4 diffs)
-
freemius/includes/managers/class-fs-admin-notice-manager.php (modified) (1 diff)
-
freemius/includes/sdk/Exceptions/ArgumentNotExistException.php (modified) (1 diff)
-
freemius/includes/sdk/Exceptions/EmptyArgumentException.php (modified) (1 diff)
-
freemius/includes/sdk/Exceptions/Exception.php (modified) (1 diff)
-
freemius/includes/sdk/Exceptions/InvalidArgumentException.php (modified) (1 diff)
-
freemius/includes/sdk/Exceptions/OAuthException.php (modified) (1 diff)
-
freemius/includes/sdk/FreemiusBase.php (modified) (1 diff)
-
freemius/includes/sdk/FreemiusWordPress.php (modified) (1 diff)
-
freemius/require.php (modified) (1 diff)
-
freemius/start.php (modified) (1 diff)
-
freemius/templates/account/partials/addon.php (modified) (1 diff)
-
freemius/templates/ajax-loader.php (modified) (1 diff)
-
freemius/templates/debug.php (modified) (4 diffs)
-
freemius/templates/firewall-issues-js.php (modified) (2 diffs)
-
freemius/templates/partials/network-activation.php (modified) (1 diff)
-
freemius/templates/sticky-admin-notice-js.php (modified) (1 diff)
-
includes/frontend.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
-
socialmark.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
socialmark/trunk/changelog.txt
r2614995 r2696177 26 26 = 2.0.4 = 27 27 * Bug Fixed 28 = 2.0.5 = 29 * Bug Fixed, whatsapp and telegram support updated, freemium updated -
socialmark/trunk/freemius/includes/class-freemius.php
r2519387 r2696177 3551 3551 */ 3552 3552 static function _toggle_debug_mode() { 3553 check_admin_referer( 'fs_toggle_debug_mode' ); 3554 3553 3555 if ( ! is_super_admin() ) { 3554 3556 return; … … 3572 3574 */ 3573 3575 static function _get_debug_log() { 3576 check_admin_referer( 'fs_get_debug_log' ); 3577 3578 if ( ! is_super_admin() ) { 3579 return; 3580 } 3581 3582 $limit = min( ! empty( $_POST['limit'] ) ? absint( $_POST['limit'] ) : 200, 200 ); 3583 $offset = min( ! empty( $_POST['offset'] ) ? absint( $_POST['offset'] ) : 200, 200 ); 3584 3574 3585 $logs = FS_Logger::load_db_logs( 3575 3586 fs_request_get( 'filters', false, 'post' ), 3576 ! empty( $_POST['limit'] ) && is_numeric( $_POST['limit'] ) ? $_POST['limit'] : 200,3577 ! empty( $_POST['offset'] ) && is_numeric( $_POST['offset'] ) ? $_POST['offset'] : 03587 $limit, 3588 $offset 3578 3589 ); 3579 3590 … … 4448 4459 */ 4449 4460 function _email_about_firewall_issue() { 4461 check_admin_referer( 'fs_resolve_firewall_issues' ); 4462 4463 if ( ! current_user_can( is_multisite() ? 'manage_options' : 'activate_plugins' ) ) { 4464 return; 4465 } 4466 4450 4467 $this->_admin_notices->remove_sticky( 'failed_connect_api' ); 4451 4468 … … 4522 4539 */ 4523 4540 function _retry_connectivity_test() { 4541 check_admin_referer( 'fs_retry_connectivity_test' ); 4542 4543 if ( ! current_user_can( is_multisite() ? 'manage_options' : 'activate_plugins' ) ) { 4544 return; 4545 } 4546 4524 4547 $this->_admin_notices->remove_sticky( 'failed_connect_api_first' ); 4525 4548 -
socialmark/trunk/freemius/includes/managers/class-fs-admin-notice-manager.php
r2519387 r2696177 176 176 */ 177 177 function dismiss_notice_ajax_callback() { 178 $this->_sticky_storage->remove( $_POST['message_id'] ); 178 check_admin_referer( 'fs_dismiss_notice_action' ); 179 180 if ( ! is_numeric( $_POST['message_id'] ) ) { 181 $this->_sticky_storage->remove( $_POST['message_id'] ); 182 } 183 179 184 wp_die(); 180 185 } -
socialmark/trunk/freemius/includes/sdk/Exceptions/ArgumentNotExistException.php
r2519387 r2696177 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } 5 2 6 if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) { 3 7 exit; -
socialmark/trunk/freemius/includes/sdk/Exceptions/EmptyArgumentException.php
r2519387 r2696177 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } 5 2 6 if ( ! class_exists( 'Freemius_InvalidArgumentException' ) ) { 3 7 exit; -
socialmark/trunk/freemius/includes/sdk/Exceptions/Exception.php
r2519387 r2696177 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } 5 2 6 if ( ! class_exists( 'Freemius_Exception' ) ) { 3 7 /** -
socialmark/trunk/freemius/includes/sdk/Exceptions/InvalidArgumentException.php
r2519387 r2696177 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } 5 2 6 if ( ! class_exists( 'Freemius_Exception' ) ) { 3 7 exit; -
socialmark/trunk/freemius/includes/sdk/Exceptions/OAuthException.php
r2519387 r2696177 1 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } 5 2 6 if ( ! class_exists( 'Freemius_Exception' ) ) { 3 7 exit; -
socialmark/trunk/freemius/includes/sdk/FreemiusBase.php
r2519387 r2696177 16 16 */ 17 17 18 if ( ! defined( 'ABSPATH' ) ) { 19 exit; 20 } 21 18 22 if ( ! defined( 'FS_API__VERSION' ) ) { 19 23 define( 'FS_API__VERSION', '1' ); -
socialmark/trunk/freemius/includes/sdk/FreemiusWordPress.php
r2519387 r2696177 15 15 * under the License. 16 16 */ 17 if ( ! defined( 'ABSPATH' ) ) { 18 exit; 19 } 17 20 18 21 require_once dirname( __FILE__ ) . '/FreemiusBase.php'; -
socialmark/trunk/freemius/require.php
r2519387 r2696177 6 6 * @since 1.1.9 7 7 */ 8 9 if ( ! defined( 'ABSPATH' ) ) { 10 exit; 11 } 8 12 9 13 // Configuration should be loaded first. -
socialmark/trunk/freemius/start.php
r2519387 r2696177 16 16 * @var string 17 17 */ 18 $this_sdk_version = '2.4. 2';18 $this_sdk_version = '2.4.3'; 19 19 20 20 #region SDK Selection Logic -------------------------------------------------------------------- -
socialmark/trunk/freemius/templates/account/partials/addon.php
r2519387 r2696177 1 1 <?php 2 3 if ( ! defined( 'ABSPATH' ) ) { 4 exit; 5 } 6 2 7 /** 3 8 * @var array $VARS -
socialmark/trunk/freemius/templates/ajax-loader.php
r2519387 r2696177 1 <?php 2 if ( ! defined( 'ABSPATH' ) ) { 3 exit; 4 } 5 ?> 1 6 <div class="fs-ajax-loader" style="display: none"><?php for ( $i = 1; $i <= 8; $i ++ ) : ?><div class="fs-ajax-loader-bar fs-ajax-loader-bar-<?php echo $i ?>"></div><?php endfor ?></div> -
socialmark/trunk/freemius/templates/debug.php
r2519387 r2696177 38 38 $.post( ajaxurl, { 39 39 action: 'fs_toggle_debug_mode', 40 // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline. 41 _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_toggle_debug_mode' ) ); ?>, 40 42 is_on : ($(this).hasClass( 'fs-on' ) ? 1 : 0) 41 43 }, function ( response ) { … … 112 114 $.post(ajaxurl, { 113 115 action : 'fs_get_db_option', 114 _wpnonce : '<?php echo wp_create_nonce( 'fs_get_db_option' ) ?>', 116 // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline. 117 _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_get_db_option' ) ); ?>, 115 118 option_name: optionName 116 119 }, function (response) { … … 132 135 $.post(ajaxurl, { 133 136 action : 'fs_set_db_option', 134 _wpnonce : '<?php echo wp_create_nonce( 'fs_set_db_option' ) ?>', 137 // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline. 138 _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_set_db_option' ) ); ?>, 135 139 option_name : optionName, 136 140 option_value: optionValue … … 725 729 $.post(ajaxurl, { 726 730 action : 'fs_get_debug_log', 731 // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline. 732 _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_get_debug_log' ) ); ?>, 727 733 filters: filters, 728 734 offset : offset, -
socialmark/trunk/freemius/templates/firewall-issues-js.php
r2519387 r2696177 23 23 ajaxActionSuffix = notice.attr( 'data-manager-id' ).replace( ':', '-' ); 24 24 25 var data = { 26 action : 'fs_resolve_firewall_issues_' + ajaxActionSuffix, 27 error_type: error_type 28 }; 25 var data = { 26 action : 'fs_resolve_firewall_issues_' + ajaxActionSuffix, 27 // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline. 28 _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_resolve_firewall_issues' ) ); ?>, 29 error_type: error_type 30 }; 29 31 30 32 if ( 'squid' === error_type ) { … … 40 42 41 43 if ( 'retry_ping' === error_type ) { 42 data.action = 'fs_retry_connectivity_test_' + ajaxActionSuffix; 44 data.action = 'fs_retry_connectivity_test_' + ajaxActionSuffix; 45 // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline. 46 data._wpnonce = <?php echo wp_json_encode( wp_create_nonce( 'fs_retry_connectivity_test' ) ); ?>; 43 47 } 44 48 -
socialmark/trunk/freemius/templates/partials/network-activation.php
r2519387 r2696177 1 1 <?php 2 3 if ( ! defined( 'ABSPATH' ) ) { 4 exit; 5 } 6 2 7 /** 3 8 * @var array $VARS -
socialmark/trunk/freemius/templates/sticky-admin-notice-js.php
r2519387 r2696177 24 24 notice.fadeOut( 'fast', function() { 25 25 var data = { 26 action : 'fs_dismiss_notice_action_' + ajaxActionSuffix, 26 action : 'fs_dismiss_notice_action_' + ajaxActionSuffix, 27 // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline. 28 _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_dismiss_notice_action' ) ); ?>, 27 29 message_id: id 28 30 }; -
socialmark/trunk/includes/frontend.php
r2614995 r2696177 56 56 { 57 57 if (!is_front_page() && !is_home()) { 58 echo "rankmath"; 58 59 function socialmark_change_rankmath_og_img_url($attachment_url) 59 60 { … … 186 187 } 187 188 $socialmark_overlay_position = get_option('default_socialmark_position'); 188 if(isset($socialmark_overlay_image) && !file_exists($socialmark_overlay_image)){ 189 if(wp_get_attachment_url(get_post_thumbnail_id($post_id))){ 190 //return wp_get_attachment_url(get_post_thumbnail_id($post_id)); 191 return 'attachment'; 192 } 193 } 189 //will be updated later 190 // if(isset($socialmark_overlay_image) && !file_exists($socialmark_overlay_image)){ 191 // if(wp_get_attachment_url(get_post_thumbnail_id($post_id))){ 192 // //return wp_get_attachment_url(get_post_thumbnail_id($post_id)); 193 // return 'attachment'; 194 // } 195 // } 194 196 if (isset($socialmark_overlay_image) && isset($socialmark_main_image) && isset($socialmark_overlay_position)) { 195 197 $socialmark_src_url = $socialmark_overlay_image; … … 288 290 } 289 291 socialmark_imagecopymerge_alpha($socialmark_dest, $socialmark_src, $socialmark_xaxis, $socialmark_yaxis, 0, 0, $socialmark_src_w, $socialmark_src_h, 100); 290 imagejpeg($socialmark_dest, SOCIALMARK_UPLOAD . '/' . $socialmark_name . '.jpg'); 292 // imagejpeg($socialmark_dest, SOCIALMARK_UPLOAD . '/' . $socialmark_name . '.jpg'); 293 // $socialmark_og_image_url = $socialmark_name . '.jpg'; 294 if (imagesx($socialmark_dest) <= imagesy($socialmark_dest)) { 295 $socialmark_background = "#FFFFFF"; 296 $socialmark_im = imagecreatetruecolor(1200, 630); 297 298 // fill the image with the color you want 299 $color = '0x' . ltrim($socialmark_background, '#'); 300 imagefilledrectangle($socialmark_im, 0, 0, 1200, 630, hexdec($color)); 301 $socialmark_re_width = imagesx($socialmark_dest); 302 $socialmark_re_height = imagesy($socialmark_dest); 303 $socialmark_width_re_ratio = $socialmark_width / $socialmark_width; 304 // $resized_width = 500; //suppose 500 is max width or height 305 // $resized_height = 500/$ratio; 306 //} 307 //else { 308 $socialmark_resized_width = 630 * $socialmark_width_re_ratio; 309 $socialmark_resized_height = 630; 310 //$image = imagecreatefromjpeg('shirt.jpg'); 311 312 $sm_resized_image = imagecreatetruecolor($socialmark_resized_width, $socialmark_resized_height); 313 $left = (1200 - $socialmark_resized_width) / 2; 314 imagecopyresampled($sm_resized_image, $socialmark_dest, 0, 0, 0, 0, $socialmark_resized_width, $socialmark_resized_height, $socialmark_re_width, $socialmark_re_height); 315 // set the headers and output the image 316 imagecopymerge($socialmark_im, $sm_resized_image, $left, 0, 0, 0, $socialmark_resized_width, $socialmark_resized_height, 100); 317 imagejpeg($socialmark_im, SOCIALMARK_UPLOAD . '/' . $socialmark_name . '.jpg'); 318 $socialmark_og_image_url = $socialmark_name . '.jpg'; 319 320 }else{ 321 $socialmark_crop_array = array('x' =>0 , 'y' => $socialmark_extra, 'width' => imagesx($socialmark_dest), 'height'=> imagesy($socialmark_dest)-$socialmark_extra*2); 322 imagejpeg(imagecrop($socialmark_dest, $socialmark_crop_array), SOCIALMARK_UPLOAD . '/' . $socialmark_name . '.jpg'); 291 323 $socialmark_og_image_url = $socialmark_name . '.jpg'; 324 } 325 292 326 update_post_meta( 293 327 $post_id, -
socialmark/trunk/readme.txt
r2614995 r2696177 5 5 Tested up to: 5.7.1 6 6 Requires PHP: 5.3.0 or higher 7 Stable tag: 2.0. 47 Stable tag: 2.0.5 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 143 143 = 2.0.2 = 144 144 * Force url replace enable/disable, twitter card image support for yoast SEO 145 = 2.0.4 =145 = 2.0.4 = 146 146 * Bug Fixed 147 = 2.0.5 = 148 * Bug Fixed, whatsapp and telegram support updated, freemium updated -
socialmark/trunk/socialmark.php
r2614995 r2696177 5 5 * Plugin URI: https://shawonpro.com/socialmark-wp-plugin/ 6 6 * Description: Easy way to add/change overlay/watermark to Facebook, Twitter, open graph post preview images. 7 * Version: 2.0. 47 * Version: 2.0.5 8 8 * Author: ShawonPro 9 9 * Author URI: https://shawonpro.com/
Note: See TracChangeset
for help on using the changeset viewer.