Bară alba plugin wordpress.

Discutii despre tot ce nu se incadreaza in celelalte categorii.

Moderators: Moderatori ajutatori, Moderatori

Post Reply
User avatar
Iluminatii
Membru, skill +3
Membru, skill +3
Posts: 1465
Joined: 31 Mar 2014, 01:52
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Reputatie: Fost Membru Club eXtreamCS ( o luna )
Has thanked: 7 times
Been thanked: 2 times
Contact:

08 Sep 2019, 00:26

Am instalat un plugin care imi da voie sa atasez jocuri de pe steam in format Embed insa imi apar acele bari albe care nu le pot scoate oricat incerc.
Image
Stie cineva cum le pot scoate?Nu pare sa fie ceva gresit in fisierul de la plugin.
| Afiseaza codul
<?php
/*
	Plugin Name: WP Steam Shortcode
	Description: This plugin will help you to embed widgets of different Steams's and Steam Greenlight's games and apps in your posts and pages.
	Version: 1.3.1
	Author: ruLait
	Author URI: https://rulait.ru
	Plugin URI: https://github.com/rulait/wp-steam-shortcode
	Text Domain: wp-steam-shortcode
	GitHub Plugin URI: https://github.com/rulait/wp-steam-shortcode
	GitHub Branch: master
	License: MIT License
	License URI: https://github.com/ruLait/wp-steam-shor ... icense.txt
	Requires WP: 4.0
	Requires PHP: 5.3
*/  

add_shortcode('steam', 'wp_steam_shortcode');

function wp_steam_shortcode($atts) {
	extract(shortcode_atts(array(
		'item' => '',
		'subitem' => '',
		'type' => 'store',
		'width' => '100%',
		'id' => 'wp-steam-shortcode',
		'class' => 'wp-steam-shortcode',
		'text' => ''
	), $atts));

	$error = '<span style="color: red;">Error! Check the &#91;steam&#93; shortcode attributes, please.</span>';

	if (empty($subitem) === false) {
		$subitem = '/' . htmlspecialchars($subitem);
	}

	if ($type == 'store') {
		$out = '<iframe id="' . htmlspecialchars($id) . '" class="' . htmlspecialchars($class) . '" style="width: 650px; height: 190px; border: 0;" src="//store.steampowered.com/widget/' . htmlspecialchars($item) . $subitem . '?t=' . rawurlencode($text). '" scrolling="no"></iframe>';
	} else if ($type == 'greenlight') {
		$out = '<iframe id="' . htmlspecialchars($id) . '" class="' . htmlspecialchars($class) . '" style="width: 336px; height: 137px; border: 0;" src="//steamcommunity.com/sharedfiles/widget/'. htmlspecialchars($item). '" scrolling="no"></iframe>';
	} else {
		$out = $error;
	}

	if (is_numeric($item) == false || (empty($item) || empty($type)) || empty($width) || (empty($id) || empty($class))) {
		$out = $error;
	}

	return $out;
}?>
Metionez ca incerc sa le scot, nu sa le ascund.Daca le ascund imi ramane spatiu gol foarte mare pe pagina.
Copiii cu nevoi speciale nu sunt ciudati sau neobisnuiti. Ei vor ceea ce toata lumea vrea; sa fie acceptati, sa fie iubiti.
Post Reply

Return to “Discutii generale”

  • Information