wordpress-sdk
wordpress-sdk copied to clipboard
Display issues caused by conflicting css classes in certain themes
Actual Behavior:
Display issues caused by conflicting css classes in certain themes
Plugin action links should be formatted correctly
The added link span in the plugin_action_links has a class named upgrade As we use the Rambo theme this results in huge buttons because the theme links a drag-drop.css which specifies:
.upgrade {
background-color: #1d4467;
border-color: #1d4467;
color: #fff !important;
cursor: pointer;
display: inline-block;
font-size: 14px;
font-weight: bold;
margin-bottom: 0px;
padding: 13px 30px 14px 29px;
text-transform: uppercase;
width: 54%;
border-radius: 2px;
text-decoration: none;
}
I suggest to change the class name (key) to something unique. Proposed solution : make the key-passed unique ($this->slug.''.$key) in class-freemius.php:
` /** * Add plugin action link. * * @author Vova Feldman (@svovaf) * @since 1.0.0 * * @param $label * @param $url * @param bool $external * @param int $priority * @param bool $key */ function add_plugin_action_link( $label, $url, $external = false, $priority = WP_FS__DEFAULT_PRIORITY, $key = false ) { $this->_logger->entrance();
if ( ! isset( $this->_action_links[ $priority ] ) ) {
$this->_action_links[ $priority ] = array();
}
if ( false === $key ) {
$key = preg_replace( "/[^A-Za-z0-9 ]/", '', strtolower( $label ) );
}
$this->_action_links[ $priority ][] = array(
'label' => $label,
'href' => $url,
'key' => $this->_slug.'_'.$key,
'external' => $external
);
}`
Versions: (*)
Freemius SDK Version: 1.2.1.7WordPress Version: 4.7.3PHP Version: 7.0.15-0ubuntu0.16.04.4MySQL Version: 5.7.17-0ubuntu0.16.04.1
Plugin / Theme: (*)
Name:Language TutorSlug:language-tutorFreemius ID:381
Additional Information:
Browser Type: FirefoxBrowser Version: 52.0.1 (64-bit)OS: Ubuntu 16.04Stack Traces: