Forum Replies Created

Viewing 11 replies - 31 through 41 (of 41 total)
  • Plugin Author Ignacio Cruz Moreno

    (@igmoweb)

    Hi luquerias.

    Sorru for the very late. I just released a new version and it should be fixed.

    Thanks.

    Thread Starter Ignacio Cruz Moreno

    (@igmoweb)

    Oh, true, true, I don’t know what I was thinking about. A filter would be the best option.

    Thanks a lot, Brandon.

    Thread Starter Ignacio Cruz Moreno

    (@igmoweb)

    What would be the difference? We would need to remove the filter right after is added by Jetpack and before the information is displayed.

    Filter or action, both are the same.We need a hook after the file is loaded or change the way the texts are displayed.

    Let me know if my approach is wrong.

    Thanks.

    Thread Starter Ignacio Cruz Moreno

    (@igmoweb)

    Sorry for the very late here.

    Just imagine that you want to change the description of one of the modules. Let’s say, for instance, that we are going to change Carousel description module.

    Currently, this is the description of Carousel included in module-info.php:

    function jetpack_carousel_more_info() {
    ?>
    	<div class="jp-info-img">
    		<img class="jp-info-img" src="<?php echo plugins_url( basename( dirname( dirname( __FILE__ ) ) ) . '/_inc/images/screenshots/carousel.png' ) ?>" alt="<?php esc_attr_e( 'Gallery Carousel Screenshot', 'jetpack' ) ?>" width="300" height="188" />
    	</div>
    
        <p><?php esc_html_e( 'With Carousel active, any standard WordPress galleries you have embedded in posts or pages will launch a gorgeous full-screen photo browsing experience with comments and EXIF metadata.', 'jetpack' ); ?></p>
    <?php
    }
    
    add_action( 'jetpack_learn_more_button_carousel', 'jetpack_carousel_learn_more_button' );
    add_action( 'jetpack_module_more_info_carousel', 'jetpack_carousel_more_info' );

    So , the idea is to remove those actions and put my own ones, I use a mu-plugin for that:

    remove_action( 'jetpack_learn_more_button_carousel', 'jetpack_carousel_learn_more_button' );
    remove_action( 'jetpack_module_more_info_carousel', 'jetpack_carousel_more_info' );

    But that did, ehm, nothing. The information is still there. But that’s logicall, when I remove those filters, modules-info.php is still not loaded.

    Let’s search then for a hook that is fired right after the file is included so I can remove those hooks. The file is included in class.jetpack-admin.php among other two files. Let’s see the code:

    function get_modules() {
    		include_once( JETPACK__PLUGIN_DIR . 'modules/module-info.php' );
    		$available_modules = $this->jetpack->get_available_modules();
    		$active_modules    = $this->jetpack->get_active_modules();
    		$modules           = array();
    
    		foreach ( $available_modules as $module ) {
    ...
    // Save the modules info in an array
    ...
    }

    Well, there’s not a hook there so the hooks included in modules-info.php are a little useless.

    There are several options to fix this and one of them would be to add a new action at the end of the module-info.php file:

    do_action( 'jetpack_module_info_loaded' );

    Or similar, of course. That hook will allow me to remove the actions that module-info.php added:

    add_action( 'jetpack_module_info_loaded', 'jetpack_hooks_remove_current_module_info_actions' );
    function jetpack_hooks_remove_current_module_info_actions() {
       remove_action( 'jetpack_learn_more_button_carousel', 'jetpack_carousel_learn_more_button' );
       remove_action( 'jetpack_module_more_info_carousel', 'jetpack_carousel_more_info' );
    }

    I don’t know if is clear enough 🙂

    Thanks.

    Thread Starter Ignacio Cruz Moreno

    (@igmoweb)

    Thanks Brandon!

    Thread Starter Ignacio Cruz Moreno

    (@igmoweb)

    Thanks Brandon.

    Thread Starter Ignacio Cruz Moreno

    (@igmoweb)

    Thanks Richard.

    We’ll use the contact form.

    And yes, we are updated to 2.9.3, thanks for asking.

    In our site, Jetpack is tuned so it does not timeout our servers but most changes are captions, styles and branding stuff. We haven’t touched anything in the connection (just timeout as far as I remember).

    Thanks!

    Plugin Author Ignacio Cruz Moreno

    (@igmoweb)

    Arreglado.

    El plugin es muy sencillito pero este año quiero empezar a añadirle más cosas por eso de que cumpla algunas leyes y tal.

    Gracias por todo.

    Plugin Author Ignacio Cruz Moreno

    (@igmoweb)

    Anda, pues no, es un error. Ahora mismo lo cambio. Lo he probado en la 3.8.1 :). Muchas gracias por tu contestación.

    Plugin Author Ignacio Cruz Moreno

    (@igmoweb)

    Hi KTC_88.

    I know it’s late, I didn0t see your comment until I updated the plugin. I’d like to know how you would like to have this in the frontend. Maybe via a widget? Shortcode? Integration with another plugin that brings the account to the front end?

    Cheers.

    Plugin Author Ignacio Cruz Moreno

    (@igmoweb)

    Hi zinc1314.

    I don’t know if it’s too late but do you remember what wasn’t working? Would be possible for you to test with the latest version?

    Please, before voting one star, try to put in contact to the developer of the plugin (me in this case).

    Cheers.

Viewing 11 replies - 31 through 41 (of 41 total)