Changeset 3046302
- Timestamp:
- 03/06/2024 11:55:39 AM (2 years ago)
- Location:
- sided
- Files:
-
- 39 added
- 3 edited
-
tags/1.3.5 (added)
-
tags/1.3.5/admin (added)
-
tags/1.3.5/admin/css (added)
-
tags/1.3.5/admin/css/blockstyles.css (added)
-
tags/1.3.5/admin/css/styles.css (added)
-
tags/1.3.5/admin/css/styles.scss (added)
-
tags/1.3.5/assets (added)
-
tags/1.3.5/assets/css (added)
-
tags/1.3.5/assets/css/daterangepicker.css (added)
-
tags/1.3.5/assets/js (added)
-
tags/1.3.5/assets/js/daterangepicker.min.js (added)
-
tags/1.3.5/assets/js/jquery.simplePagination.min.js (added)
-
tags/1.3.5/assets/js/jquery.validate.min.js (added)
-
tags/1.3.5/assets/screenshot-1.jpg (added)
-
tags/1.3.5/assets/screenshot-2.jpg (added)
-
tags/1.3.5/env.php (added)
-
tags/1.3.5/includes (added)
-
tags/1.3.5/includes/block-editor (added)
-
tags/1.3.5/includes/block-editor/index.js (added)
-
tags/1.3.5/includes/block-editor/index.jsx (added)
-
tags/1.3.5/includes/block-editor/sided-block-editor.php (added)
-
tags/1.3.5/partials (added)
-
tags/1.3.5/partials/functions.php (added)
-
tags/1.3.5/partials/includes (added)
-
tags/1.3.5/partials/includes/imgs (added)
-
tags/1.3.5/partials/includes/imgs/sided_favicon.jpg (added)
-
tags/1.3.5/partials/includes/sided-authenticate-apikey.php (added)
-
tags/1.3.5/partials/includes/sided-common-header.php (added)
-
tags/1.3.5/partials/includes/sided-settings-header.php (added)
-
tags/1.3.5/partials/sided-create-debate-from-block.php (added)
-
tags/1.3.5/partials/sided-create-debate.php (added)
-
tags/1.3.5/partials/sided-dashboard.php (added)
-
tags/1.3.5/partials/sided-debates.php (added)
-
tags/1.3.5/partials/sided-edit-debate.php (added)
-
tags/1.3.5/partials/sided-edit-draft.php (added)
-
tags/1.3.5/partials/sided-settings.php (added)
-
tags/1.3.5/partials/sided-shortcode-to-embed.php (added)
-
tags/1.3.5/readme.txt (added)
-
tags/1.3.5/sided.php (added)
-
trunk/partials/functions.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/sided.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sided/trunk/partials/functions.php
r3045866 r3046302 55 55 56 56 } else { 57 $url = SIDED_API_URL . '/admin/embedPlacement/getEmbed/' . $embed_placement_option['placement_id'] . '?clientId=' . $sided_selected_network; 58 $args = array('timeout' => 50, 59 'method' => 'GET', 60 'headers' => array('Content-Type' => 'application/json', 61 'x-source-type' => 'wp-plugin', 62 'x-private-access-token' => get_option('sided_sided_private_access_token')), 63 'data_format' => 'body', 57 // $url = SIDED_API_URL . '/admin/embedPlacement/getEmbed/' . $embed_placement_option['placement_id'] . '?clientId=' . $sided_selected_network; 58 // $args = array('timeout' => 50, 59 // 'method' => 'GET', 60 // 'headers' => array('Content-Type' => 'application/json', 61 // 'x-source-type' => 'wp-plugin', 62 // 'x-private-access-token' => get_option('sided_sided_private_access_token')), 63 // 'data_format' => 'body', 64 // ); 65 // $response = wp_remote_post($url, $args); 66 // $response_arr = json_decode($response['body']); 67 // if ($response_arr->status == 'success') { 68 // $embed_code = $response_arr->data->html; 69 // echo htmlentities($embed_code);die(); 70 // $content = get_the_content(); 71 // add_filter('the_content', function ($content) use ($embed_code) { 72 // return add_after_post_content($content, $embed_code); 73 // }, 12); 74 // } 75 } 76 } 77 } 78 } 79 80 add_filter('the_content', function ($content) { 81 if (is_single()) { 82 $sided_selected_network = get_option('sided_sided_selected_network'); 83 $sided_embed_placement_options = get_option('sided_sided_embed_placement_options'); 84 unset($sided_embed_placement_options['updated_at']); 85 86 foreach ($sided_embed_placement_options as $embed_placement_option) { 87 if ($embed_placement_option['active'] == 'true' && $embed_placement_option['embed_location_on_page'] !== 'sidebar') { 88 return sprintf( 89 '%s<div class="sided-widget" clientId="%d" placementId="%d"></div>', 90 $content, 91 $sided_selected_network, 92 $sided_selected_network 64 93 ); 65 $response = wp_remote_post($url, $args); 66 $response_arr = json_decode($response['body']); 67 if ($response_arr->status == 'success') { 68 $embed_code = $response_arr->data->html; 69 $content = get_the_content(); 70 add_filter('the_content', function ($content) use ($embed_code) { 71 return add_after_post_content($content, $embed_code); 72 }, 12); 73 } 74 } 75 } 76 } 77 } 94 } 95 } 96 } 97 }, 12); 78 98 79 99 function add_send_cat_script() { -
sided/trunk/readme.txt
r3045869 r3046302 5 5 Requires at least: 4.7 6 6 Tested up to: 6.2 7 Stable tag: 1.3. 47 Stable tag: 1.3.5 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 38 38 39 39 == Changelog == 40 = 1.3.5 = 41 * Optimizations 42 40 43 = 1.3.4 = 41 44 * Remove embeds from pages (keep it on posts only) -
sided/trunk/sided.php
r3045869 r3046302 4 4 * Plugin URI: https://sided.co/ 5 5 * Description: It is a wordpress plugin to embed sided polls in your Wordpress website. 6 * Version: 1.3. 46 * Version: 1.3.5 7 7 * Author: Sided 8 8 **/ 9 9 10 define( 'SIDED_VERSION', '1.3. 4' );10 define( 'SIDED_VERSION', '1.3.5' ); 11 11 define( 'SIDED_PLUGIN', __FILE__ ); 12 12 define( 'SIDED_PLUGIN_DIR', untrailingslashit( dirname( SIDED_PLUGIN ) ) );
Note: See TracChangeset
for help on using the changeset viewer.