Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion includes/library/font-awesome/font-awesome.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public static function _icon_picker_font_media_templates( $template ) {
</div>
</div>
<a class="check" href="#" title="%s"><div class="media-modal-icon"></div></a>',
esc_attr__( 'Deselect', 'icon-picker' )
esc_attr__( 'Deselect', 'menu-icons' )
),
);

Expand Down
1 change: 1 addition & 0 deletions includes/library/form-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ final public static function create( array $field, $args = array() ) {
) {
trigger_error(
sprintf(
// translators: %1$s - the name of the class, %2$s - the type of the field.
esc_html__( '%1$s: Type %2$s is not supported, reverting to text.', 'menu-icons' ),
__CLASS__,
esc_html( $field['type'] )
Expand Down
2 changes: 2 additions & 0 deletions includes/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ public static function get_fields() {
'id' => $menu_key,
'title' => __( 'Current Menu', 'menu-icons' ),
'description' => sprintf(
// translators: %s - the name of the menu.
__( '"%s" menu settings', 'menu-icons' ),
apply_filters( 'single_term_title', $menu_term->name )
),
Expand Down Expand Up @@ -770,6 +771,7 @@ public static function _enqueue_assets() {
'all' => __( 'All', 'menu-icons' ),
'preview' => __( 'Preview', 'menu-icons' ),
'settingsInfo' => sprintf(
// translators: %2$s - a link to the Customizer with the label `the customizer`.
'<div> %1$s <p>' . esc_html__( 'Please note that the actual look of the icons on the front-end will also be affected by the style of your active theme. You can add your own CSS using %2$s.', 'menu-icons' ) . '</p></div>',
$box_data,
sprintf(
Expand Down
29 changes: 29 additions & 0 deletions menu-icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ function() {
return array( 'om-editor', 'om-image-block' );
}
);

add_filter( 'themeisle_sdk_blackfriday_data', array( __CLASS__, 'add_black_friday_data' ) );
}


Expand Down Expand Up @@ -255,6 +257,33 @@ public static function _upsell_admin_notice() {
</div>
<?php
}

/**
* Add Black Friday data.
*
* @param array $configs The configuration array for the loaded products.
*
* @return array
*/
public static function add_black_friday_data( $configs ) {
$config = $configs['default'];
$product_slug = basename(dirname(__FILE__));

// translators: %1$s - plugin name, %2$s - HTML tag, %3$s - discount, %4$s - HTML tag, %5$s - company name.
$message_template = __( 'Brought to you by the team behind %1$s— our biggest sale of the year is here: %2$sup to %3$s OFF%4$s on premium products from %5$s! Limited-time only.', 'menu-icons' );

$config['message'] = sprintf( $message_template, 'Menu Icons', '<strong>', '70%', '</strong>', '<strong>Themeisle</strong>' );
$config['sale_url'] = add_query_arg(
array(
'utm_term' => 'free',
),
tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/all-bf', 'bfcm', 'menu-icons' ) )
);

$configs[ $product_slug ] = $config;

return $configs;
}
}
add_action( 'plugins_loaded', array( 'Menu_Icons', '_load' ) );

Expand Down
21 changes: 14 additions & 7 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
<exclude-pattern>lib/*</exclude-pattern>
<exclude-pattern>tests/*</exclude-pattern>

<arg name="extensions" value="php"/>
<arg value="sp"/>
<arg name="extensions" value="php" />
<arg value="sp" />
<arg name="basepath" value="./" />
<arg name="parallel" value="20"/>
<arg name="parallel" value="20" />


<rule ref="WordPress-Core">
<exclude name="Squiz.Commenting" />
<exclude name="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceBeforeCloseParenthesis" />
<exclude
name="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceBeforeCloseParenthesis" />
<exclude name="Squiz.PHP.EmbeddedPhp" />
<exclude name="Generic.Commenting" />
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket" />
Expand All @@ -43,17 +44,23 @@
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.Arrays.ArrayDeclarationSpacing" />
<exclude name="Squiz.PHP.CommentedOutCode" />
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
</rule>
<rule ref="WordPress-Docs">

</rule>
<config name="testVersion" value="5.6-"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="menu-icons" />
</property>
</properties>
</rule>
<config name="testVersion" value="5.6-" />
<rule ref="PHPCompatibilityWP">
</rule>
<rule ref="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing">
<severity>0</severity>
</rule>

</ruleset>
</ruleset>
Loading