E-namad & Shamed Logo Manager Shortcodes

Below, you’ll find a detailed guide on how to add the E-namad & Shamed Logo Manager Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the E-namad & Shamed Logo Manager Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the E-namad & Shamed Logo Manager Plugin and the shortcodes it provides:

Plugin Icon
E-namad & Shamed Logo Manager

"E-namad & Shamed Logo Manager is a handy WordPress plugin that allows users to seamlessly manage and display E-namad and Shamed logos on their website."

★★★★★ (6) Active Installs: 2000+ Tested with: 5.5.13 PHP Version: 7.0
Included Shortcodes:
  • [enamadlogo_shortcode]
  • [shamedlogo_shortcode]
  • [zarrinpallogo_shortcode]
  • [ywp_esl_logos]

E-namad & Shamed Logo Manager [enamadlogo_shortcode] Shortcode

The ‘enamadlogo_shortcode’ is a custom shortcode of the e-namad-shamed-logo-manager plugin. It retrieves the ‘ywp_esl_e_code’ option from the WordPress database. This shortcode displays the e-Namad logo on your website, enhancing trust among your visitors.

Shortcode: [enamadlogo_shortcode]

Examples and Usage

Basic example – The following example demonstrates the simplest way to use the enamadlogo_shortcode. It doesn’t require any additional parameters or attributes.

[enamadlogo_shortcode /]

Advanced examples

Although the enamadlogo_shortcode doesn’t inherently support additional parameters or attributes, you can create a wrapper shortcode that does. This allows you to use different e-namad logo codes based on the attributes passed to the wrapper shortcode.

Here’s an example of how you might create such a wrapper shortcode:


function ywp_enamad_logo_wrapper( $atts ) {
    $atts = shortcode_atts( array(
        'logo_code' => ''
    ), $atts, 'enamadlogo_wrapper' );

    if ( $atts['logo_code'] ) {
        update_option( 'ywp_esl_e_code', $atts['logo_code'] );
    }

    return do_shortcode( '[enamadlogo_shortcode /]' );
}
add_shortcode( 'enamadlogo_wrapper', 'ywp_enamad_logo_wrapper' );

With the above wrapper shortcode, you can now pass a logo_code attribute to control the e-namad logo code:

[enamadlogo_wrapper logo_code="your_logo_code_here" /]

Please note that this is just an illustrative example. Always make sure to sanitize and validate your inputs when working with shortcodes.

PHP Function Code

In case you have difficulties debugging what causing issues with [enamadlogo_shortcode] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'enamadlogo_shortcode', array( $this, 'ywp_enamad_logo' ) );

Shortcode PHP function:

function ywp_enamad_logo( $atts, $content = "" ) {
            return stripcslashes( get_option( 'ywp_esl_e_code' ) );
        }

Code file location:

e-namad-shamed-logo-manager/e-namad-shamed-logo-manager/index.php

E-namad & Shamed Logo Manager [shamedlogo_shortcode] Shortcode

The ShamedLogo Shortcode is a tool that retrieves and displays the ‘ywp_esl_s_code’ option from your WordPress database. This option is typically a custom logo stored as a string. It uses the stripcslashes function to eliminate any added slashes, ensuring the logo displays correctly.

Shortcode: [shamedlogo_shortcode]

Examples and Usage

Basic example – A straightforward usage of the ‘shamedlogo_shortcode’ to display the logo configured in the plugin settings.

[shamedlogo_shortcode /]

PHP Function Code

In case you have difficulties debugging what causing issues with [shamedlogo_shortcode] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'shamedlogo_shortcode', array( $this, 'ywp_shamed_logo' ) );

Shortcode PHP function:

function ywp_shamed_logo( $atts, $content = "" ) {
            return stripcslashes( get_option( 'ywp_esl_s_code' ) );
        }

Code file location:

e-namad-shamed-logo-manager/e-namad-shamed-logo-manager/index.php

E-namad & Shamed Logo Manager [zarrinpallogo_shortcode] Shortcode

The Zarrinpal Logo shortcode is a part of the e-namad-shamed-logo-manager plugin. This shortcode returns the value of the ‘ywp_esl_z_code’ option from the WordPress database. This function is beneficial when you need to display the Zarrinpal logo on different sections of your website.

Shortcode: [zarrinpallogo_shortcode]

Examples and Usage

Basic example – The shortcode ‘zarrinpallogo_shortcode’ is used to display the Zarrinpal logo on your website. It doesn’t require any parameters.

[zarrinpallogo_shortcode /]

Advanced examples

Even though the ‘zarrinpallogo_shortcode’ doesn’t require any parameters, it can accept attributes (atts) to modify its behavior. However, these attributes don’t affect the output since the function ‘ywp_zarrinpal_logo’ doesn’t use them. The attributes are only placeholders in this case.

Here is an example of using the shortcode with two dummy parameters ‘param1’ and ‘param2’:

[zarrinpallogo_shortcode param1="value1" param2="value2" /]

Again, please note that these parameters won’t affect the output of the shortcode because the function ‘ywp_zarrinpal_logo’ doesn’t use them.

PHP Function Code

In case you have difficulties debugging what causing issues with [zarrinpallogo_shortcode] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'zarrinpallogo_shortcode', array( $this, 'ywp_zarrinpal_logo' ) );

Shortcode PHP function:

function ywp_zarrinpal_logo( $atts, $content = "" ) {
            return stripcslashes( get_option( 'ywp_esl_z_code' ) );
        }

Code file location:

e-namad-shamed-logo-manager/e-namad-shamed-logo-manager/index.php

E-namad & Shamed Logo Manager [ywp_esl_logos] Shortcode

The e-namad-shamed-logo-manager plugin shortcode is used to display all logos. It calls the ywp_esl_all_logos function which returns an array of all logos.

Shortcode: [ywp_esl_logos]

Examples and Usage

Basic example – The following shortcode will display all logos without any specific parameters.

[ywp_esl_logos /]

PHP Function Code

In case you have difficulties debugging what causing issues with [ywp_esl_logos] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'ywp_esl_logos', array( $this, 'ywp_esl_all_logos' ) );

Shortcode PHP function:

function ywp_esl_all_logos( $atts, $content = "" ) {
            return array( $this, 'ywp_enamad_logo' ) . array( $this, 'ywp_shamed_logo' ) . array( $this, 'ywp_zarrinpal_logo' );
        }

Code file location:

e-namad-shamed-logo-manager/e-namad-shamed-logo-manager/index.php

Conclusion

Now that you’ve learned how to embed the E-namad & Shamed Logo Manager Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *