function easy_media_gnl_shortcode($attsn) { if (easy_get_option('easymedia_disen_plug') == '1') { extract(shortcode_atts(array('med' => -1, 'size' => ''), $attsn)); ob_start(); $paged = get_query_var('paged') ? get_query_var('paged') : 1; // for pagination $deff_img_limit = easy_get_option('easymedia_img_size_limit'); // get the default image size limit $theopt = easy_get_option('easymedia_frm_size'); $imwidth = stripslashes($theopt['width']); $imheight = stripslashes($theopt['height']); if ($med > '0') { $finid = explode(",", $med); $medinarr = $finid; $emargs = emg_gallery_gen($finid, $paged); } $emg_query = new WP_Query($emargs); if ($emg_query->have_posts()) { $mediauniqueid = emgRandomString(6); //Random class for fitText echo '<div class="pagwrap"><div class="easycontainer emgclearfix">'; echo '<div class="rig">'; while ($emg_query->have_posts()) { $emg_query->the_post(); $images = get_post_meta(get_the_id(), 'easmedia_metabox_media_gallery', true); $isresize = get_post_meta(get_the_id(), 'easmedia_metabox_media_gallery_opt1', true); if (is_array($images)) { $ig = 0; foreach ($images as $img_id) { $img = wp_get_attachment_image_src($img_id, 'full'); $img_url = easymedia_imgresize($img[0], $deff_img_limit, $isresize, $img[1], $img[2]); $img_url = explode(",", $img_url); $img_info = get_post($img_id); $ext = pathinfo($img[0], PATHINFO_EXTENSION); $filenm = basename($img[0], "." . $ext); $emgthumbimg = easymedia_resizer($img[0], $img[1], $img[2], $imwidth, $imheight, true); if (get_post_meta(get_the_id(), 'easmedia_metabox_media_gallery_opt2', true) == 'on') { $thumbttl = $img_info->post_title; $thumbttl = esc_html(esc_js($thumbttl)); } else { $thumbttl = get_post_meta(get_the_id(), 'easmedia_metabox_title', true); } emg_gallery_markup($imwidth, $imheight, get_the_id() . '-' . $img_id, $img_url[0], $emgthumbimg, $filenm, stripslashes($thumbttl)); } } else { echo '<div style="display:none"></div>'; } ?> <?php } } else { echo '<div class="easymedia_center">'; echo '<div class="view"><img src="' . plugins_url('images/ajax-loader.gif', __FILE__) . '" width="32" height="32"/></div>'; $contnt = ob_get_clean(); return $contnt; } wp_reset_postdata(); echo '<div style="clear:both;"></div>'; echo '</div></div>'; // @since 1.3.75 if (emg_get_aff_option('emg_affiliate_info', 'emg_aff_id', '')) { echo '<span class="emg-aff-link">Powered by <a href="https://secure.ghozylab.com/demo/?ref=' . emg_get_aff_option('emg_affiliate_info', 'emg_aff_id', '') . '&goto=emg" target="_blank">Easy Media Gallery Plugin</a></span>'; } echo '</div>'; // JS emg_put_script(); // Dinamic CSS echo '<style>/*Dynamic CSS - By GhozyLab*/'; echo emg_dynamic_css_generator(); echo '</style>'; $content = ob_get_clean(); return $content; } else { ob_start(); echo '<div style="display: none;"></div>'; $contnt = ob_get_clean(); return $contnt; } }
function emg_earn_xtra_money() { wp_enqueue_script('emg-wnew'); $aff_id = emg_get_aff_option('emg_affiliate_info', 'emg_aff_id', ''); $aff_name = emg_get_aff_option('emg_affiliate_info', 'emg_aff_name', ''); $aff_email = emg_get_aff_option('emg_affiliate_info', 'emg_aff_email', ''); if ($aff_id != '') { $iscon = 'style="display:none;"'; $isdis = ''; $ists = 'Connected'; $intext = 'Disconnect'; $dnonce = 'data-nonce="' . wp_create_nonce('emgaffiliate') . '"'; $dcmd = 'data-cmd="emg_affiliate_dis"'; } else { $iscon = ''; $isdis = 'display:none;'; $ists = ''; $intext = 'Connect'; $dnonce = 'data-nonce="' . wp_create_nonce('emgaffiliate') . '"'; $dcmd = 'data-cmd="emg_affiliate_con"'; } ob_start(); ?> <div id="emg-not-yet" <?php echo $iscon; ?> > <h3>If you don't have a GhozyLab Affiliate account, you can sign up today for free <a href="https://secure.ghozylab.com/affiliate-area/" target="_blank">here</a></h3> <h4 style="font-style:italic; color: #666;">Hurry Up! Join with GhozyLab Affiliate with 6,000 affiliates and pays out over $200,000 per year! Earn EXTRA MONEY and get 30% affiliate share from every sale you make!</h4> <p class="emg-iscon" style="font-style:italic; color:#666; border-bottom: 1px dotted #CCC; margin-top: 35px; padding-bottom: 5px;"><?php _e('Fill your Affiliate Account Email or Payment Email and press Connect button to start earn extra Money with us!', 'easy-media-gallery'); ?> </p> </div> <div id="emg-aff-registered" style="width: auto;<?php echo $isdis; ?> "> <h3 id="emg-aff-holder">Hi, <?php echo $aff_name . ' ( ' . $aff_email . ' )'; ?> </h3> <hr /> </div> <form method="post"> <?php settings_fields('emg_aff_section'); ?> <table class="form-table"> <tbody> <tr valign="top"> <th style="width:155px !important;" scope="row" valign="top"> <?php _e('Account Email or Payment Email', 'easy-media-gallery'); ?> </th> <td> <input id="emg_aff_email" name="emg_aff_email" type="text" class="regular-text" value="<?php esc_attr_e($aff_email); ?> " /> <label id="is-status" style="color:green; font-style:italic;" class="description" for="emg_aff_section_email"><?php echo $ists; ?> </label> <?php if (false !== $aff_id) { ?> <?php wp_nonce_field('emg_aff_section_nonce', 'emg_aff_section_nonce'); ?> <br /><input style="margin-top: 10px;" <?php echo $dnonce; ?> <?php echo $dcmd; ?> type="submit" class="button-secondary" id="emg-aff" name="emg-aff" value="<?php echo $intext; ?> "/><span id="loader"></span><br /><br /> <span class="emg-aff-note">NOTE: To respect <a href="https://wordpress.org/plugins/about/guidelines/" target="_blank">Plugin Guidelines</a> ( point 10 ) so by pressing the connect button that means you are agree to displaying <strong>Powered by</strong> link in your gallery footer</span> <?php } ?> </td> </tr> </tbody> </table> </form> <hr style="margin-bottom:20px;"> <div class="feature-section"> <img src="<?php echo EASYMEDG_PLUGIN_URL . 'includes/images/aff-sc.jpg'; ?> " class="emg-affiliate-screenshots"/> <h4><?php _e('How does it work?', 'easy-media-gallery'); ?> </h4> <ul style="margin-left: 30px;list-style-type: circle;"> <p><?php _e('After successfully registered with our Affiliate program what you have to do just :', 'easy-media-gallery'); ?> </p> <li><?php _e('Fill your Affiliate Account Email or Payment Email in field above and Hit Connect button', 'easy-media-gallery'); ?> </li> <li><?php _e('After connected you will see green connected status', 'easy-media-gallery'); ?> </li> <li><?php _e('Check your gallery and you will find your affiliate link in the bottom of your gallery like in the right side screenshot', 'easy-media-gallery'); ?> </li> <li><?php _e('Now when individuals follow that link and subsequently make a purchase, you will be credited for the transaction and you will receive a payout', 'easy-media-gallery'); ?> </li> <li><?php _e('Congratulations! You are ready to start to earn extra money with us :)', 'easy-media-gallery'); ?> </li> </ul> </div> <?php echo ob_get_clean(); }